Go to the documentation of this file.
77 Info<<
"processor" << procI <<
nl;
82 Info<<
"\tMesh bounds : " << bbs[0] <<
nl;
85 Info<<
"\t " << bbs[i]<<
nl;
88 Info<<
"\tSurface bounding box : " << surfBb[procI] <<
nl
89 <<
"\tTriangles : " << nFaces[procI] <<
nl
90 <<
"\tVertices : " <<
nPoints[procI]
98 int main(
int argc,
char *argv[])
102 "redistribute a triSurface"
110 "preserve surface outside of mesh bounds"
115 runTime.functionObjects().off();
119 const label distType =
122 Info<<
"Reading surface from " << surfFileName <<
nl <<
nl
123 <<
"Using distribution method "
124 << distTypeName <<
nl <<
endl;
126 const bool keepNonMapped =
args.
options().found(
"keepNonMapped");
130 Info<<
"Preserving surface outside of mesh bounds." <<
nl <<
endl;
134 Info<<
"Removing surface outside of mesh bounds." <<
nl <<
endl;
141 <<
"Please run this program on the decomposed case."
142 <<
" It will read surface " << surfFileName
143 <<
" and decompose it such that it overlaps the mesh bounding box."
196 const fileName actualPath(io.filePath());
198 localPath.replace(runTime.rootPath() +
'/',
"");
203 if (actualPath == io.objectPath())
205 Info<<
"Loading local (decomposed) surface " << localPath <<
nl <<
endl;
210 Info<<
"Loading undecomposed surface " << localPath
211 <<
" on master only" <<
endl;
228 dict.
add(
"distributionType", distTypeName);
229 dict.
add(
"mergeDistance", SMALL);
245 Info<<
"Before redistribution:" <<
endl;
250 Info<<
"Redistributing surface" <<
nl <<
endl;
267 Info<<
"After redistribution:" <<
endl;
static SLList< string > validArgs
A list of valid (mandatory) arguments.
Simple random number generator.
virtual const pointField & points() const
Return raw points.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
A class for handling words, derived from string.
A class for handling file names.
static void addNote(const string &)
Add extra notes for the usage information.
#define forAll(list, i)
Loop across all elements in list.
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
static const boundBox invertedBox
A very large inverted boundBox: min/max == +/- VGREAT.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
Standard boundBox + extra functionality for use in octree.
static bool & parRun()
Is this a parallel run?
static const NamedEnum< distributionType, 3 > distributionTypeNames_
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
static void scatter(const List< commsStruct > &comms, T &Value, const int tag, const label comm)
Scatter data. Distribute without modification. Reverse of gather.
A surface mesh consisting of general polygon faces.
IOoject and searching on triSurface.
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< treeBoundBox > meshBb(1, treeBoundBox(boundBox(coarseMesh.points(), false)).extend(rndGen, 1e-3))
const Foam::HashTable< string > & options() const
Return options.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Triangulated surface description with patch information.
treeBoundBox extend(Random &, const scalar s) const
Return slightly wider bounding box.
int main(int argc, char *argv[])
fileCheckTypes
Types of communications.
A list of keyword definitions, which are a keyword followed by any number of values (e....
const double e
Elementary charge.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
errorManipArg< error, int > exit(error &err, const int errNo=1)
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
static bool master(const label communicator=0)
Am I the master process.
static fileCheckTypes fileModificationChecking
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.
static const boundBox greatBox
A very large boundBox: min/max == -/+ VGREAT.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
IOoject and searching on distributed triSurface. All processor hold (possibly overlapping) part of th...
A bounding box defined in terms of the points at its extremities.
void clear()
Delete object (if the pointer is valid) and set pointer to NULL.
void reset(T *=0)
If object pointer already set, delete object and set to given.
void size(const label)
Override size to be inconsistent with allocated storage.
Foam::argList args(argc, argv)
cachedRandom rndGen(label(0), -1)
bool add(entry *, bool mergeEntry=false)
Add a new entry.