Go to the documentation of this file.
43 localPoints ptList(mesh_.
points());
50 for (
const label id : idList)
56 const face&
f = mesh_.
faces()[cFaces[cFacei]];
60 if (usedPoints[
f[fp]] == -1)
72 if (usedPoints[ptI] > -1)
85 Foam::ensightPartCells::ensightPartCells
89 const string& partName
100 Foam::ensightPartCells::ensightPartCells
105 const string& partName
112 classify(
mesh, cellIds);
116 Foam::ensightPartCells::ensightPartCells
121 const string& partName
128 classify(
mesh, selection);
132 Foam::ensightPartCells::ensightPartCells
137 const string& partName
148 if (!partName.empty())
157 void Foam::ensightPartCells::writeConnectivity
165 if (idList.
empty())
return;
174 const faceList& meshFaces = mesh_.faces();
180 const label id = idList[i];
190 const label id = idList[i];
195 const face& cf = meshFaces[cFace[facei]];
205 const label id = idList[i];
211 const face& cf = meshFaces[
faceId];
221 os.
write(pointMap[cf[ptI]] + 1);
228 os.
write(pointMap[cf[0]] + 1);
229 for (
label ptI = cf.size()-1; ptI > 0; --ptI)
231 os.
write(pointMap[cf[ptI]] + 1);
246 const label id = idList[i];
247 const cellShape& cellPoints = shapes[id];
253 os.
write(pointMap[cellPoints[ptI]] + 1);
279 if (pointMap[ptI] > -1)
306 this->
write(os, mesh_.points());
List< label > labelList
A List of labels.
Ostream & writeList(Ostream &os, const label shortLen=0) const
Write List, with line-breaks in ASCII when length exceeds shortLen.
Track the points used by the part and map global to local indices.
virtual const pointField & points() const
Return raw points.
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
A class for handling words, derived from Foam::string.
void beginPart(const label index, const string &description)
Begin a "part" (0-based index), with a description.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
const labelUList & cellIds() const
Return the cell ids of all elements.
List< cellShape > cellShapeList
List of cellShapes and PtrList of List of cellShape.
const cellList & cells() const
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
void beginCoordinates(const label npoints)
Begin a "coordinates" block.
An implementation of ensightPart to hold volume mesh cells.
Mesh consisting of general polyhedral cells.
#define forAll(list, i)
Loop across all elements in list.
Specialized Ensight output with extra geometry file header.
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 constexpr int nTypes
Number of element types (5)
virtual void writeSummary(Ostream &os) const
Write summary information about the object.
word name(const complex &c)
Return string representation of complex.
void newline()
Add carriage return to ascii stream.
static const char * key(const enum elemType)
Return the ensight element name for the specified type.
virtual Ostream & write(const char *buf, std::streamsize count)
Binary write.
Sorting/classification of cells (3D) into corresponding ensight element types.
virtual Ostream & endBlock()
Write end block group.
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
virtual Ostream & writeKeyword(const keyType &kw)
Write the keyword followed by an appropriate indentation.
const word & name() const
Return name.
elemType
Addressable ensight element types.
virtual const faceList & faces() const
Return raw faces.
labelList list
Map global to local indices.
virtual Ostream & writeKeyword(const keyType &key)
Write keyword with trailing newline.
Base class for ensightPartCells and ensightPartFaces.
Ostream & endEntry(Ostream &os)
Write end entry (';') followed by newline.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
virtual void dumpInfo(Ostream &os) const
Print various types of debugging information.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
virtual void write(ensightGeoFile &os) const
Write geometry.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
void size(const label n) noexcept
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
UList< label > labelUList
A UList of labels.
label nPoints
Number of points used.
defineTypeNameAndDebug(combustionModel, 0)
static constexpr direction nComponents
Number of components in this vector space.