10 Info<<
"Entering: USERD_get_part_element_ids_by_type" <<
endl 11 <<
"part_number = " << part_number <<
endl 12 <<
"element_type = " << element_type <<
endl <<
flush;
20 label nCells = cells.size();
28 if (element_type == Z_HEX08)
32 label nFaces = cells[
n].size();
35 if ((nFaces == 6) && (points.size() == 8))
37 elemid_array[nHex08++] =
n + 1;
41 else if (element_type == Z_PEN06)
45 label nFaces = cells[
n].size();
48 if ((nFaces == 5) && (points.size() == 6))
50 elemid_array[nPen06++] =
n + 1;
54 else if (element_type == Z_PYR05)
58 label nFaces = cells[
n].size();
61 if ((nFaces == 5) && (points.size() == 5))
63 elemid_array[nPyr05++] =
n + 1;
67 else if (element_type == Z_TET04)
71 label nFaces = cells[
n].size();
74 if ((nFaces == 4) && (points.size() == 4))
76 elemid_array[nTet04++] =
n + 1;
80 else if (element_type == Z_NFACED)
84 label nFaces = cells[
n].size();
86 if ((nFaces == 6) && (points.size() == 8))
88 else if ((nFaces == 5) && (points.size() == 6))
90 else if ((nFaces == 5) && (points.size() == 5))
92 else if ((nFaces == 4) && (points.size() == 4))
96 elemid_array[nFaced++] =
n + 1;
105 const polyBoundaryMesh&
bMesh =
meshPtr->boundaryMesh();
112 if (element_type == Z_TRI03)
114 forAll(bMesh[patchi], facei)
116 if (bMesh[patchi][facei].size() == 3)
118 elemid_array[nTri03++] = facei + 1;
122 else if (element_type == Z_QUA04)
124 forAll(bMesh[patchi], facei)
126 if (bMesh[patchi][facei].size() == 4)
128 elemid_array[nQuad04++] = facei + 1;
132 else if (element_type == Z_NSIDED)
134 forAll(bMesh[patchi], facei)
137 if ((nPoints != 3) && (nPoints != 4))
139 elemid_array[nPoly++] = facei + 1;
149 elemid_array[
n] =
n + 1;
158 Info<<
"Leaving: USERD_get_part_element_ids_by_type" <<
endl <<
flush;
#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.
static Cloud< passiveParticle > * sprayPtr
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< cellShape > cellShapeList
List of cellShapes and PtrList of List of cellShape.
const cellShapeList & cellShapes
List< label > labelList
A List of labels.
Ostream & flush(Ostream &os)
Flush stream.
int USERD_get_part_element_ids_by_type(int part_number, int element_type, int *elemid_array)
PrimitivePatch< face, List, const pointField > bMesh
Holder of faceList and points. (v.s. e.g. primitivePatch which references points) ...
List< cell > cellList
list of cells