Go to the documentation of this file.
84 Info<<
"processor" << proci <<
nl;
89 Info<<
"\tMesh bounds : " << bbs[0] <<
nl;
90 for (label i = 1; i < bbs.size(); i++)
92 Info<<
"\t " << bbs[i]<<
nl;
95 Info<<
"\tSurface bounding box : " << surfBb[proci] <<
nl
96 <<
"\tTriangles : " << nFaces[proci] <<
nl
97 <<
"\tVertices : " <<
nPoints[proci]
105 int main(
int argc,
char *argv[])
109 "Redistribute a triSurface."
110 " The specified surface must be located in the constant/triSurface"
119 "Preserve surface outside of mesh bounds"
128 const label distType =
131 Info<<
"Reading surface from " << surfFileName <<
nl <<
nl
132 <<
"Using distribution method "
133 << distTypeName <<
nl <<
endl;
135 const bool keepNonMapped =
args.
found(
"keepNonMapped");
139 Info<<
"Preserving surface outside of mesh bounds." <<
nl <<
endl;
143 Info<<
"Removing surface outside of mesh bounds." <<
nl <<
endl;
150 <<
"Please run this program on the decomposed case."
151 <<
" It will read surface " << surfFileName
152 <<
" and decompose it such that it overlaps the mesh bounding box."
220 const fileName actualPath(typeFilePath<searchableSurface>(io));
227 if (actualPath == io.objectPath())
229 Info<<
"Loading local (decomposed) surface " << localPath <<
nl <<
endl;
234 Info<<
"Loading undecomposed surface " << localPath
235 <<
" on master only" <<
endl;
254 dict.
add(
"distributionType", distTypeName);
255 dict.
add(
"mergeDistance", SMALL);
271 Info<<
"Before redistribution:" <<
endl;
276 Info<<
"Redistributing surface" <<
nl <<
endl;
293 Info<<
"After redistribution:" <<
endl;
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
virtual const pointField & points() const
Defines the attributes of an object for which implicit objectRegistry management is supported,...
treeBoundBox extend(Random &rndGen, const scalar s) const
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
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
static const boundBox invertedBox
Standard boundBox with extra functionality for use in octree.
static void addNote(const string ¬e)
const functionObjectList & functionObjects() const
static bool master(const label communicator=worldComm)
static void scatter(const List< commsStruct > &comms, T &Value, const int tag, const label comm)
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)
List< treeBoundBox > meshBb(1, treeBoundBox(boundBox(coarseMesh.points(), false)).extend(rndGen, 1e-3))
T get(const label index) const
static const word canonicalName
static void addArgument(const string &argName, const string &usage="")
Triangulated surface description with patch information.
static IOobject selectIO(const IOobject &io, const fileName &altFile, const word &ioName="")
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)
void reset(autoPtr< T > &&other) noexcept
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
const word & system() const
#define FatalErrorInFunction
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
static int myProcNo(const label communicator=worldComm)
static const boundBox greatBox
virtual void rename(const word &newName)
const fileName & rootPath() const
static bool & parRun() noexcept
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
A bounding box defined in terms of min/max extrema points.
entry * add(entry *entryPtr, bool mergeEntry=false)
const word & constant() const
Foam::argList args(argc, argv)
static label nProcs(const label communicator=worldComm)
bool found(const word &optName) const