45 "(tetra4 pyramid5 penta6 hexa8 nfaced)" 52 void Foam::ensightPartCells::classify
67 size_ = mesh.nCells();
73 size_ = idList.
size();
83 for (
label listI = 0; listI < size_; ++listI)
88 cellId = idList[listI];
91 const cellShape& cellShape = cellShapes[
cellId];
92 const cellModel& cellModel = cellShape.model();
98 else if (cellModel == pyr)
102 else if (cellModel == prism)
106 else if (cellModel == hex)
131 for (
label listI = 0; listI < size_; ++listI)
133 label cellId = listI;
136 cellId = idList[listI];
139 const cellShape& cellShape = cellShapes[
cellId];
140 const cellModel& cellModel = cellShape.model();
142 if (cellModel == tet)
144 tetCells[nTet++] =
cellId;
146 else if (cellModel == pyr)
148 pyramidCells[nPyr++] =
cellId;
150 else if (cellModel == prism)
152 prismCells[nPrism++] =
cellId;
154 else if (cellModel == hex)
156 hexCells[nHex++] =
cellId;
160 polyCells[nPoly++] =
cellId;
166 elemLists_.setSize(elementTypes().size());
168 elemLists_[tetra4Elements].transfer(tetCells);
169 elemLists_[pyramid5Elements].transfer(pyramidCells);
170 elemLists_[penta6Elements].transfer(prismCells);
171 elemLists_[hexa8Elements].transfer(hexCells);
172 elemLists_[nfacedElements].transfer(polyCells);
181 const string& partDescription
185 mesh_(*reinterpret_cast<polyMesh*>(0))
212 classify(mesh, idList);
226 classify(mesh, cZone);
276 if (usedPoints[f[fp]] == -1)
278 usedPoints[f[fp]] = nPoints++;
289 if (usedPoints[ptI] > -1)
291 usedPoints[ptI] = nPoints++;
300 void Foam::ensightPartCells::writeConnectivity
336 const face& cf = meshFaces[cFace[facei]];
358 if (
id == owner[faceId])
362 os.
write(pointMap[cf[ptI]] + 1);
369 os.
write(pointMap[cf[0]] + 1);
370 for (
label ptI = cf.
size()-1; ptI > 0; --ptI)
372 os.
write(pointMap[cf[ptI]] + 1);
388 const cellShape& cellPoints = cellShapes[id];
394 os.
write(pointMap[cellPoints[ptI]] + 1);
#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 const cellModel * lookup(const word &)
Look up a model by name and return a pointer to the model or NULL.
label nPoints
Number of points used.
A face is a list of labels corresponding to mesh vertices.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
void size(const label)
Override size to be inconsistent with allocated storage.
Specialized Ensight output with extra geometry file header.
const pointField & points_
pointField referenced
Track the points used by the part and map global to local indices.
An implementation of ensightPart to hold volume mesh cells.
virtual void writeGeometry(ensightGeoFile &) const
Write geometry.
labelListList elemLists_
Simple labelList with a name.
const cellList & cells() const
labelList list
Map global to local indices.
Macros for easy insertion into run-time selection tables.
UList< label > labelUList
virtual const pointField & points() const
Return raw points.
const word & name() const
Return name.
const cellShapeList & cellShapes() const
Return cell shapes.
List< cellShape > cellShapeList
List of cellShapes and PtrList of List of cellShape.
A class for handling words, derived from string.
void reconstruct(Istream &)
Reconstruct part characteristics (eg, element types) from Istream.
List< label > labelList
A List of labels.
virtual Ostream & writeKeyword(const string &key)
Write keyword with trailing newline.
virtual Ostream & write(const char *buf, std::streamsize count)
Binary write.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
Base class for ensightPartCells and ensightPartFaces.
defineTypeNameAndDebug(combustionModel, 0)
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
label size() const
Return the number of elements in the UList.
void newline()
Add carriage return to ascii stream.
const Foam::edgeFaceCirculator Foam::edgeFaceCirculator::endConstIter * reinterpret_cast(0),-1, false,-1, false
label offset_
Start offset for elemLists_.
Mesh consisting of general polyhedral cells.
static const List< word > elemTypes_
virtual const labelList & faceOwner() const
Return face owner.
virtual const faceList & faces() const
Return raw faces.
ensightPartCells(label partNumber, const string &partDescription)
Construct empty part with number and description.
virtual ~ensightPartCells()
Destructor.
const polyMesh & mesh_
Mesh referenced.
virtual void writeGeometry(ensightGeoFile &) const
Write geometry.