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)
142 part_descriptions[nPatches+1],
143 cloud::prefix.c_str(),
146 number_of_elements[nPatches+1][Z_POINT] = sprayPtr->size();
147 number_of_nodes[nPatches+1] = sprayPtr->size();
151 Info << "Leaving: USERD_get_gold_part_build_info" << endl << flush;