47 "(tetra4 pyramid5 penta6 hexa8 nfaced)"
54 void Foam::ensightPartCells::classify
69 size_ = mesh.nCells();
75 size_ = idList.size();
94 const cellModel& cellModel = cellShape.model();
100 else if (cellModel == pyr)
104 else if (cellModel == prism)
108 else if (cellModel ==
hex)
142 const cellModel& cellModel = cellShape.model();
144 if (cellModel == tet)
146 tetCells[nTet++] =
cellId;
148 else if (cellModel == pyr)
150 pyramidCells[nPyr++] =
cellId;
152 else if (cellModel == prism)
154 prismCells[nPrism++] =
cellId;
156 else if (cellModel ==
hex)
158 hexCells[nHex++] =
cellId;
162 polyCells[nPoly++] =
cellId;
183 const string& partDescription
187 mesh_(*polyMeshNullPtr_)
214 classify(mesh, idList);
228 classify(mesh, cZone);
242 mesh_(*polyMeshNullPtr_)
258 localPoints ptList(points_);
269 const label id = idList[i] + offset_;
274 const face&
f = mesh_.faces()[cFaces[cFacei]];
278 if (usedPoints[
f[fp]] == -1)
291 if (usedPoints[ptI] > -1)
302 void Foam::ensightPartCells::writeConnectivity
310 os.writeKeyword(key);
311 os.write(idList.size());
317 const faceList& meshFaces = mesh_.faces();
323 const label id = idList[i] + offset_;
326 os.write(cFace.size());
333 const label id = idList[i] + offset_;
338 const face& cf = meshFaces[cFace[facei]];
348 const label id = idList[i] + offset_;
354 const face& cf = meshFaces[
faceId];
364 os.write(pointMap[cf[ptI]] + 1);
371 os.write(pointMap[cf[0]] + 1);
372 for (
label ptI = cf.size()-1; ptI > 0; --ptI)
374 os.write(pointMap[cf[ptI]] + 1);
389 const label id = idList[i] + offset_;
396 os.write(pointMap[cellPoints[ptI]] + 1);
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
void setSize(const label)
Reset size of List.
static const cellModel * lookup(const word &)
Look up a model by name and return a pointer to the model or nullptr.
Specialised Ensight output with extra geometry file header.
An implementation of ensightPart to hold volume mesh cells.
static const List< word > elemTypes_
static const polyMesh *const polyMeshNullPtr_
virtual ~ensightPartCells()
Destructor.
ensightPartCells(label partNumber, const string &partDescription)
Construct empty part with number and description.
virtual void writeGeometry(ensightGeoFile &) const
Write geometry.
virtual const List< word > & elementTypes() const
Static listing of the element types.
Track the points used by the part and map global to local indices.
Base class for ensightPartCells and ensightPartFaces.
label size_
Number of elements in this part.
label offset_
Start offset for elemLists_.
labelListList elemLists_
Simple labelList with a name.
void reconstruct(Istream &)
Reconstruct part characteristics (eg, element types) from Istream.
label size() const
Number of elements in this part.
virtual void writeGeometry(ensightGeoFile &) const
Write geometry.
A face is a list of labels corresponding to mesh vertices.
Mesh consisting of general polyhedral cells.
const cellShapeList & cellShapes
List< cellShape > cellShapeList
List of cellShapes and PtrList of List of cellShape.
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
word name(const bool)
Return a word representation of a bool.
IOstream & hex(IOstream &io)
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
defineTypeNameAndDebug(combustionModel, 0)
UList< label > labelUList