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 "
121 <<
" " << distType <<
nl <<
endl;
123 const bool keepNonMapped =
args.
options().found(
"keepNonMapped");
127 Info<<
"Preserving surface outside of mesh bounds." <<
nl <<
endl;
131 Info<<
"Removing surface outside of mesh bounds." <<
nl <<
endl;
138 <<
"Please run this program on the decomposed case."
139 <<
" It will read surface " << surfFileName
140 <<
" and decompose it such that it overlaps the mesh bounding box."
170 const fileName actualPath(io.filePath());
172 localPath.replace(runTime.rootPath() +
'/',
"");
174 if (actualPath == io.objectPath(
false))
176 Info<<
"Loading local (decomposed) surface " << localPath <<
nl <<
endl;
180 Info<<
"Loading undecomposed surface " << localPath <<
nl <<
endl;
185 if (!
isFile(actualPath /
"Dict"))
189 dict.
add(
"distributionType", distType);
190 dict.
add(
"mergeDistance", small);
207 Info<<
"Writing dummy bounds dictionary to " << ioDict.name()
211 ioDict.regIOobject::writeObject
215 ioDict.time().writeCompression(),
249 fcPtr.ptr()->store();
254 Info<<
"Before redistribution:" <<
endl;
259 Info<<
"Redistributing surface" <<
nl <<
endl;
276 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 keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
A class for handling file names.
localIOdictionary derived from IOdictionary with global set false to disable parallel master reading.
virtual const pointField & points() const
Return raw points.
static const word & geometryDir()
Return the geometry directory name.
IOoject and searching on distributed triSurface. All processor hold (possibly overlapping) part of th...
static const NamedEnum< distributionType, 3 > distributionTypeNames_
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.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
int main(int argc, char *argv[])
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), lagrangian::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)