16 Info<<
"Mesh stats" << nl
22 mesh.nInternalPoints(),
26 if (nInternalPoints != -Pstream::nProcs())
28 Info<<
" internal points: " << nInternalPoints <<
nl;
30 if (
returnReduce(mesh.nInternalPoints(), minOp<label>()) == -1)
33 <<
"Some processors have their points sorted into internal" 34 <<
" and external and some do not." << endl
35 <<
"This can cause problems later on." <<
endl;
39 if (allTopology && nInternalPoints != -Pstream::nProcs())
44 mesh.nInternalEdges(),
49 mesh.nInternal1Edges(),
54 mesh.nInternal0Edges(),
58 Info<<
" edges: " << nEdges << nl
59 <<
" internal edges: " << nInternalEdges << nl
60 <<
" internal edges using one boundary point: " 61 << nInternal1Edges-nInternal0Edges << nl
62 <<
" internal edges using two boundary points: " 63 << nInternalEdges-nInternal1Edges <<
nl;
70 Info<<
" faces: " << nFaces << nl
71 <<
" internal faces: " << nIntFaces << nl
72 <<
" cells: " << nCells << nl
73 <<
" faces per cell: " 74 << scalar(nFaces + nIntFaces)/
max(1, nCells) << nl
75 <<
" boundary patches: " << mesh.boundaryMesh().size() << nl
76 <<
" point zones: " << mesh.pointZones().size() << nl
77 <<
" face zones: " << mesh.faceZones().size() << nl
78 <<
" cell zones: " << mesh.cellZones().size() << nl
86 tetWedgeMatcher tetWedge;
98 Map<label> polyhedralFaces;
100 for (
label celli = 0; celli < mesh.nCells(); celli++)
102 if (hex.isA(mesh, celli))
106 else if (tet.isA(mesh, celli))
110 else if (pyr.isA(mesh, celli))
114 else if (prism.isA(mesh, celli))
118 else if (wedge.isA(mesh, celli))
122 else if (tetWedge.isA(mesh, celli))
129 polyhedralFaces(mesh.cells()[celli].size())++;
133 reduce(nHex,sumOp<label>());
134 reduce(nPrism,sumOp<label>());
135 reduce(nWedge,sumOp<label>());
136 reduce(nPyr,sumOp<label>());
137 reduce(nTetWedge,sumOp<label>());
138 reduce(nTet,sumOp<label>());
139 reduce(nUnknown,sumOp<label>());
141 Info<<
"Overall number of cells of each type:" << nl
142 <<
" hexahedra: " << nHex << nl
143 <<
" prisms: " << nPrism << nl
144 <<
" wedges: " << nWedge << nl
145 <<
" pyramids: " << nPyr << nl
146 <<
" tet wedges: " << nTetWedge << nl
147 <<
" tetrahedra: " << nTet << nl
148 <<
" polyhedra: " << nUnknown
153 Pstream::mapCombineGather(polyhedralFaces, plusEqOp<label>());
155 Info<<
" Breakdown of polyhedra by number of faces:" << nl
156 <<
" faces" <<
" number of cells" <<
endl;
158 const labelList sortedKeys = polyhedralFaces.sortedToc();
162 const label nFaces = sortedKeys[keyI];
165 << nFaces <<
" " << polyhedralFaces[nFaces] <<
nl;
#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.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
IOstream & hex(IOstream &io)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Smanip< ios_base::fmtflags > setf(const ios_base::fmtflags flags)
List< label > labelList
A List of labels.
Istream and Ostream manipulators taking arguments.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
void printMeshStats(const polyMesh &mesh, const bool allTopology)
#define WarningInFunction
Report a warning using Foam::Warning.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
Omanip< int > setw(const int i)