Go to the documentation of this file.
85 Info<<
"processor" << proci <<
nl;
90 Info<<
"\tMesh bounds : " << bbs[0] <<
nl;
91 for (label i = 1; i < bbs.size(); i++)
93 Info<<
"\t " << bbs[i]<<
nl;
96 Info<<
"\tSurface bounding box : " << surfBb[proci] <<
nl
97 <<
"\tTriangles : " << nFaces[proci] <<
nl
98 <<
"\tVertices : " <<
nPoints[proci]
106 int main(
int argc,
char *argv[])
110 "Redistribute a triSurface."
111 " The specified surface must be located in the constant/triSurface"
120 "Preserve surface outside of mesh bounds"
129 const label distType =
132 Info<<
"Reading surface from " << surfFileName <<
nl <<
nl
133 <<
"Using distribution method "
134 << distTypeName <<
nl <<
endl;
136 const bool keepNonMapped =
args.
found(
"keepNonMapped");
140 Info<<
"Preserving surface outside of mesh bounds." <<
nl <<
endl;
144 Info<<
"Removing surface outside of mesh bounds." <<
nl <<
endl;
151 <<
"Please run this program on the decomposed case."
152 <<
" It will read surface " << surfFileName
153 <<
" and decompose it such that it overlaps the mesh bounding box."
221 const fileName actualPath(typeFilePath<searchableSurface>(io));
228 if (actualPath == io.objectPath())
230 Info<<
"Loading local (decomposed) surface " << localPath <<
nl <<
endl;
235 Info<<
"Loading undecomposed surface " << localPath
236 <<
" on master only" <<
endl;
256 dict.
add(
"distributionType", distTypeName);
257 dict.
add(
"mergeDistance", SMALL);
273 Info<<
"Before redistribution:" <<
endl;
278 Info<<
"Redistributing surface" <<
nl <<
endl;
295 Info<<
"After redistribution:" <<
endl;
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
void reset(T *p=nullptr) noexcept
Delete managed object and set to new given pointer.
virtual const pointField & points() const
Return raw points.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
treeBoundBox extend(Random &rndGen, const scalar s) const
Return slightly wider bounding box.
static const Enum< distributionType > distributionTypeNames_
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
A class for handling words, derived from Foam::string.
A class for handling file names.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.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))
T getOrDefault(const word &optName, const T &deflt) const
Get a value from the named option if present, or return default.
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 large inverted boundBox: min/max == +/- ROOTVGREAT.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
Standard boundBox with extra functionality for use in octree.
static bool & parRun()
Is this a parallel run?
static void addNote(const string ¬e)
Add extra notes for the usage information.
const functionObjectList & functionObjects() const
Return the list of function objects.
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 that has IO capabilities and a registry for storin...
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))
#define forAll(list, i)
Loop across all elements in list.
static const word canonicalName
static void addArgument(const string &argName, const string &usage="")
Append a (mandatory) argument to validArgs.
Triangulated surface description with patch information.
void off()
Switch the function objects off.
messageStream Info
Information stream (uses stdout - output is on the master only)
static IOobject selectIO(const IOobject &io, const fileName &altFile, const word &ioName="")
Return the IOobject, but also consider an alternative file name.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
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 void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
const word & system() const
Return system name.
#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 large boundBox: min/max == -/+ ROOTVGREAT.
virtual void rename(const word &newName)
Rename.
const fileName & rootPath() const
Return root path.
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...
const dimensionedScalar e
Elementary charge.
void clear() noexcept
Same as reset(nullptr)
A bounding box defined in terms of min/max extrema points.
entry * add(entry *entryPtr, bool mergeEntry=false)
Add a new entry.
const word & constant() const
Return constant name.
Foam::argList args(argc, argv)
bool found(const word &optName) const
Return true if the named option is found.