1 //======================================================================
2 // this is based on the current time step.
3 //======================================================================
4 int USERD_get_gold_part_build_info
8 char *part_descriptions[Z_BUFL],
10 int *number_of_elements[Z_MAXTYPE],
11 int *ijk_dimensions[3],
12 int *iblanking_options[6]
16 Info << "Entering: USERD_get_gold_part_build_info" << endl << flush;
19 //# include "checkForNewMesh.H"
21 const cellShapeList& cellShapes = meshPtr->cellShapes();
22 const cellList& cells = meshPtr->cells();
24 label nCells = cells.size();
26 // all parts are unstructured
27 for (label n = 0; n<Numparts_available; n++)
29 part_numbers[n] = n + 1;
30 part_types[n] = Z_UNSTRUCTURED;
33 strncpy(part_descriptions[0], meshName, Z_BUFL);
35 for(label i=0; i<nPatches; i++)
37 word patchName(meshPtr->boundary()[i].name());
38 strncpy(part_descriptions[i+1], patchName.c_str(), Z_BUFL);
47 for (label n=0; n<nCells; n++)
49 label nFacesInCell = cells[n].size();
50 labelList points = cellShapes[n];
52 if ((nFacesInCell == 6) && (points.size() == 8))
56 else if ((nFacesInCell == 4) && (points.size() == 4))
60 else if (nFacesInCell == 5)
62 if (points.size() == 6)
66 else if (points.size() == 5)
81 for (label n=0; n < Z_MAXTYPE; n++)
83 for (label i=0; i<Numparts_available; i++)
85 number_of_elements[i][n] = 0;
89 number_of_elements[0][Z_TET04] = nTet04;
90 number_of_elements[0][Z_PYR05] = nPyr05;
91 number_of_elements[0][Z_HEX08] = nHex08;
92 number_of_elements[0][Z_PEN06] = nPen06;
93 number_of_elements[0][Z_NFACED] = nFaced;
96 Info << "nTet04 = " << nTet04 << endl;
97 Info << "nPyr05 = " << nPyr05 << endl;
98 Info << "nHex08 = " << nHex08 << endl;
99 Info << "nPen06 = " << nPen06 << endl;
100 Info << "nFaced = " << nFaced << endl;
103 number_of_nodes[0] = meshPtr->nPoints();
105 const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh();
107 for(label i=0; i<nPatches; i++)
115 label nPoints = bMesh[i][n].size();
121 else if (nPoints == 4)
131 number_of_elements[i+1][Z_TRI03] = nTri03;
132 number_of_elements[i+1][Z_QUA04] = nQuad04;
133 number_of_elements[i+1][Z_NSIDED] = nPoly;
135 number_of_nodes[i+1] = bMesh[i].points().size();
138 // if (Numparts_available > nPatches+1)
141 strncpy(part_descriptions[nPatches+1], sprayName.c_str(), Z_BUFL);
142 number_of_elements[nPatches+1][Z_POINT] = sprayPtr->size();
143 number_of_nodes[nPatches+1] = sprayPtr->size();
151 const cellShapeList& cellShapes = secondMeshPtr->cellShapes();
152 const cellList& cells = secondMeshPtr->cells();
154 label nCells = cells.size();
158 part_descriptions[secondMeshPartNum-1],
163 for(label i=0; i<nSecondMeshPatches; i++)
165 word patchName(secondMeshPtr->boundary()[i].name());
168 part_descriptions[i+secondMeshPartNum],
180 for (label n=0; n<nCells; n++)
182 label nFacesInCell = cells[n].size();
183 labelList points = cellShapes[n];
185 if ((nFacesInCell == 6) && (points.size() == 8))
189 else if ((nFacesInCell == 4) && (points.size() == 4))
193 else if (nFacesInCell == 5)
195 if (points.size() == 6)
199 else if (points.size() == 5)
214 number_of_elements[secondMeshPartNum-1][Z_TET04] = nTet04;
215 number_of_elements[secondMeshPartNum-1][Z_PYR05] = nPyr05;
216 number_of_elements[secondMeshPartNum-1][Z_HEX08] = nHex08;
217 number_of_elements[secondMeshPartNum-1][Z_PEN06] = nPen06;
218 number_of_elements[secondMeshPartNum-1][Z_NFACED] = nFaced;
221 number_of_nodes[secondMeshPartNum-1] = secondMeshPtr->nPoints();
223 const polyBoundaryMesh& bMesh = secondMeshPtr->boundaryMesh();
225 for(label i=0; i<nSecondMeshPatches; i++)
233 label nPoints = bMesh[i][n].size();
239 else if (nPoints == 4)
249 number_of_elements[i+secondMeshPartNum][Z_TRI03] = nTri03;
250 number_of_elements[i+secondMeshPartNum][Z_QUA04] = nQuad04;
251 number_of_elements[i+secondMeshPartNum][Z_NSIDED] = nPoly;
253 number_of_nodes[i+secondMeshPartNum] = bMesh[i].points().size();
262 const faceList& faces = faMeshPtr->faces();
264 label nFaces = faces.size();
266 label faMeshPartNum = Numparts_available;
270 part_descriptions[faMeshPartNum-1],
279 for (label n=0; n<nFaces; n++)
281 label nPoints = faces[n].size();
287 else if (nPoints == 4)
297 number_of_elements[faMeshPartNum-1][Z_TRI03] = nTri03;
298 number_of_elements[faMeshPartNum-1][Z_QUA04] = nQuad04;
299 number_of_elements[faMeshPartNum-1][Z_NSIDED] = nPoly;
301 number_of_nodes[faMeshPartNum-1] = faMeshPtr->nPoints();
307 Info << "Leaving: USERD_get_gold_part_build_info" << endl << flush;