80 Info<<
"processor" << proci <<
nl
81 <<
"\tMesh bounds : " << bbs[0] <<
nl;
84 Info<<
"\t " << bbs[i]<<
nl;
86 Info<<
"\tSurface bounding box : " << surfBb[proci] <<
nl
87 <<
"\tTriangles : " << nFaces[proci] <<
nl
88 <<
"\tVertices : " <<
nPoints[proci]
96 int main(
int argc,
char *argv[])
100 "redistribute a triSurface"
108 "preserve surface outside of mesh bounds"
117 Info<<
"Reading surface from " << surfFileName <<
nl <<
nl
118 <<
"Using distribution method "
120 <<
" " << distType <<
nl <<
endl;
122 const bool keepNonMapped =
args.
options().found(
"keepNonMapped");
126 Info<<
"Preserving surface outside of mesh bounds." <<
nl <<
endl;
130 Info<<
"Removing surface outside of mesh bounds." <<
nl <<
endl;
137 <<
"Please run this program on the decomposed case."
138 <<
" It will read surface " << surfFileName
139 <<
" and decompose it such that it overlaps the mesh bounding box."
169 const fileName actualPath(io.filePath());
171 localPath.replace(runTime.rootPath() +
'/',
"");
173 if (actualPath == io.objectPath(
false))
175 Info<<
"Loading local (decomposed) surface " << localPath <<
nl <<
endl;
179 Info<<
"Loading undecomposed surface " << localPath <<
nl <<
endl;
184 if (!
isFile(actualPath /
"Dict"))
188 dict.
add(
"distributionType", distType);
189 dict.
add(
"mergeDistance", small);
206 Info<<
"Writing dummy bounds dictionary to " << ioDict.name()
210 ioDict.regIOobject::writeObject
214 ioDict.time().writeCompression(),
248 fcPtr.ptr()->store();
253 Info<<
"Before redistribution:" <<
endl;
258 Info<<
"Redistributing surface" <<
nl <<
endl;
275 Info<<
"After redistribution:" <<
endl;
#define forAll(list, i)
Loop across all elements in list.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const word & name() const
Return name.
static const versionNumber currentVersion
Current version number.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void size(const label)
Override size to be inconsistent with allocated storage.
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
static bool & parRun()
Is this a parallel run?
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
static void addNote(const string &)
Add extra notes for the usage information.
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
const Foam::HashTable< string > & options() const
Return options.
static SLList< string > validArgs
A list of valid (mandatory) arguments.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
void clear()
Delete object (if the pointer is valid) and set pointer to.
A bounding box defined in terms of the points at its extremities.
A list of keyword definitions, which are a keyword followed by any number of values (e....
bool add(entry *, bool mergeEntry=false)
Add a new entry.
IOoject and searching on distributed triSurface. All processor hold (possibly overlapping) part of th...
static const NamedEnum< distributionType, 3 > distributionTypeNames_
A class for handling file names.
localIOdictionary derived from IOdictionary with global set false to disable parallel master reading.
static const word & geometryDir()
Return the geometry directory name.
A surface mesh consisting of general polygon faces.
Standard boundBox + extra functionality for use in octree.
treeBoundBox extend(const scalar s) const
Return asymmetrically extended bounding box, with guaranteed.
Triangulated surface description with patch information.
Templated form of IOobject providing type information for file reading and header type checking.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
int main(int argc, char *argv[])
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.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
bool isFile(const fileName &, const bool checkVariants=true, const bool followLink=true)
Does the name exist as a file in the file system?
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimLength
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
List< treeBoundBox > meshBb(1, treeBoundBox(boundBox(coarseMesh.points(), false)).extend(1e-3))
Foam::argList args(argc, argv)