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" 118 Info<<
"Reading surface from " << surfFileName << nl << nl
119 <<
"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." 171 const fileName actualPath(typeFilePath<searchableSurface>(io));
175 if (actualPath == io.objectPath())
177 Info<<
"Loading local (decomposed) surface " << localPath << nl <<
endl;
181 Info<<
"Loading undecomposed surface " << localPath << nl <<
endl;
186 if (!
isFile(actualPath /
"Dict"))
190 dict.
add(
"distributionType", distType);
191 dict.
add(
"mergeDistance", small);
208 Info<<
"Writing dummy bounds dictionary to " << ioDict.name()
212 ioDict.regIOobject::writeObject
216 ioDict.time().writeCompression(),
224 Info<<
"Loaded surface" << nl <<
endl;
238 surfMesh.searchableSurface::time().timeName(),
250 fcPtr.ptr()->store();
255 Info<<
"Before redistribution:" <<
endl;
260 Info<<
"Redistributing surface" << nl <<
endl;
277 Info<<
"After redistribution:" <<
endl;
281 Info<<
"Writing surface." << nl <<
endl;
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A class for handling file names.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void off()
Switch the function objects off.
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const Field< PointType > & faceCentres() const
Return face centres for patch.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool isFile(const fileName &, const bool checkVariants=true, const bool followLink=true)
Does the name exist as a file in the file system?
void size(const label)
Override size to be inconsistent with allocated storage.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static SLList< string > validArgs
A list of valid (mandatory) arguments.
A bounding box defined in terms of the points at its extremities.
static const NamedEnum< distributionType, 3 > distributionTypeNames_
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
bool add(entry *, bool mergeEntry=false)
Add a new entry.
virtual const pointField & points() const
Return raw points.
localIOdictionary is derived from IOdictionary but excludes parallel master reading.
void clear()
Delete object (if the pointer is valid) and set pointer to.
const Foam::HashTable< string > & options() const
Return options.
A class for handling words, derived from string.
const word & constant() const
Return constant name.
const Field< PointType > & points() const
Return reference to global points.
List< treeBoundBox > meshBb(1, treeBoundBox(boundBox(coarseMesh.points(), false)).extend(1e-3))
A surface mesh consisting of general polygon faces.
IOoject and searching on distributed triSurface. All processor hold (possibly overlapping) part of th...
static bool & parRun()
Is this a parallel run?
static label nProcs(const label communicator=0)
Number of processes in parallel run.
const functionObjectList & functionObjects() const
Return the list of function objects.
static const versionNumber currentVersion
Current version number.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Standard boundBox + extra functionality for use in octree.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
const doubleScalar e
Elementary charge.
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
static void addNote(const string &)
Add extra notes for the usage information.
Triangulated surface description with patch information.
Foam::argList args(argc, argv)
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.
treeBoundBox extend(const scalar s) const
Return asymetrically extended bounding box, with guaranteed.
const fileName & rootPath() const
Return root path.