Go to the documentation of this file.
38 #include "PatchTools.H"
53 mesh.nInternalPoints(),
57 if (nInternalPoints != -Pstream::nProcs())
59 Info<<
" internal points: " << nInternalPoints <<
nl;
64 <<
"Some processors have their points sorted into internal"
65 <<
" and external and some do not." <<
endl
66 <<
"This can cause problems later on." <<
endl;
70 if (allTopology && nInternalPoints != -Pstream::nProcs())
75 mesh.nInternalEdges(),
80 mesh.nInternal1Edges(),
85 mesh.nInternal0Edges(),
89 Info<<
" edges: " << nEdges <<
nl
90 <<
" internal edges: " << nInternalEdges <<
nl
91 <<
" internal edges using one boundary point: "
92 << nInternal1Edges-nInternal0Edges <<
nl
93 <<
" internal edges using two boundary points: "
94 << nInternalEdges-nInternal1Edges <<
nl;
101 Info<<
" faces: " << nFaces <<
nl
102 <<
" internal faces: " << nIntFaces <<
nl
103 <<
" cells: " << nCells <<
nl
104 <<
" faces per cell: "
105 << scalar(nFaces + nIntFaces)/
max(1, nCells) <<
nl
106 <<
" boundary patches: " <<
mesh.boundaryMesh().size() <<
nl
107 <<
" point zones: " <<
mesh.pointZones().size() <<
nl
108 <<
" face zones: " <<
mesh.faceZones().size() <<
nl
109 <<
" cell zones: " <<
mesh.cellZones().size() <<
nl
131 for (
label cellI = 0; cellI <
mesh.nCells(); cellI++)
145 else if (prism.
isA(
mesh, cellI))
149 else if (wedge.
isA(
mesh, cellI))
153 else if (tetWedge.
isA(
mesh, cellI))
160 polyhedralFaces(
mesh.cells()[cellI].size())++;
172 Info<<
"Overall number of cells of each type:" <<
nl
173 <<
" hexahedra: " << nHex <<
nl
174 <<
" prisms: " << nPrism <<
nl
175 <<
" wedges: " << nWedge <<
nl
176 <<
" pyramids: " << nPyr <<
nl
177 <<
" tet wedges: " << nTetWedge <<
nl
178 <<
" tetrahedra: " << nTet <<
nl
179 <<
" polyhedra: " << nUnknown
186 Info<<
" Breakdown of polyhedra by number of faces:" <<
nl
187 <<
" faces" <<
" number of cells" <<
endl;
189 const labelList sortedKeys = polyhedralFaces.sortedToc();
193 const label nFaces = sortedKeys[keyI];
196 << nFaces <<
" " << polyhedralFaces[nFaces] <<
nl;
221 / (Pstream::parRun() ?
".." :
"")
223 /
mesh.pointsInstance()
228 if (Pstream::parRun())
232 const scalar tol = sampledSurfaces::mergeTol();
234 scalar mergeDim = tol *
mesh.bounds().mag();
240 PatchTools::gatherAndMerge
248 if (Pstream::master())
286 isInSet[iter.key()] =
true;
297 bndInSet[pp.
start()+i-
mesh.nInternalFaces()] = isInSet[fc[i]];
300 syncTools::swapBoundaryFaceList(
mesh, bndInSet);
304 for (
label faceI = 0; faceI <
mesh.nInternalFaces(); faceI++)
306 bool ownVal = isInSet[
mesh.faceOwner()[faceI]];
307 bool neiVal = isInSet[
mesh.faceNeighbour()[faceI]];
309 if (ownVal != neiVal)
311 outsideFaces.
append(faceI);
326 bool neiVal = bndInSet[faceI-
mesh.nInternalFaces()];
327 if (isInSet[fc[i]] && !neiVal)
329 outsideFaces.
append(faceI);
355 / (Pstream::parRun() ?
".." :
"")
357 /
mesh.pointsInstance()
362 if (Pstream::parRun())
366 const scalar tol = sampledSurfaces::mergeTol();
368 scalar mergeDim = tol *
mesh.bounds().mag();
374 PatchTools::gatherAndMerge
382 if (Pstream::master())
Smanip< ios_base::fmtflags > setf(const ios_base::fmtflags flags)
A cellMatcher for prism cells.
Base class for surface writers.
A class for handling file names.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
#define forAll(list, i)
Loop across all elements in list.
A cellMatcher for tetWedge cells.
const Field< PointType > & localPoints() const
Return pointField of points in patch.
virtual bool isA(const primitiveMesh &mesh, const label cellI)
Exact match. Uses faceSizeMatch.
virtual bool coupled() const
Return true if this patch is geometrically coupled (i.e. faces and.
A cellMatcher for tet cells.
virtual void write(const coordSet &, const wordList &, const List< const Field< Type > * > &, Ostream &) const =0
General entry point for writing.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void printMeshStats(const polyMesh &mesh, const bool allTopology)
const Time & time() const
Return time.
Mesh consisting of general polyhedral cells.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
const objectRegistry & db() const
Return the local objectRegistry.
A cellMatcher for pyr cells.
virtual bool isA(const primitiveMesh &mesh, const label cellI)
Exact match. Uses faceSizeMatch.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
A cellMatcher for hex cells.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
A patch is a list of labels that address the faces in the global face list.
A List with indirect addressing.
Istream and Ostream manipulators taking arguments.
const word & name() const
Return name.
void mergeAndWrite(const surfaceWriter &, const faceSet &)
Write vtk representation of (assembled) faceSet to vtk file in.
label size() const
Return number of elements in table.
Base class for graphics format writing. Entry points are.
const labelUList & faceCells() const
Return face-cell addressing.
Omanip< int > setw(const int i)
A collection of cell labels.
List< Key > sortedToc() const
Return the table of contents as a sorted list.
label start() const
Return start label of this patch in the polyMesh face list.
virtual bool isA(const primitiveMesh &mesh, const label cellI)
Exact match. Uses faceSizeMatch.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
IOstream & hex(IOstream &io)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
fileName path() const
Return path.
A cellMatcher for wedge cells.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
virtual bool isA(const primitiveMesh &mesh, const label cellI)
Exact match. Uses faceSizeMatch.
const List< Face > & localFaces() const
Return patch faces addressing into local point list.
#define WarningInFunction
Report a warning using Foam::Warning.
virtual bool isA(const primitiveMesh &mesh, const label cellI)
Exact match. Uses faceSizeMatch.
A list of faces which address into the list of points.