Go to the documentation of this file.
43 "tetra4",
"pyramid5",
"penta6",
"hexa8",
"nfaced"
49 "Support exactly 5 cell types (tetra4, pyramid5, penta6, hexa8, nfaced)"
55 void Foam::ensightCells::resizeAll()
61 auto iter = offsets_.
begin();
64 for (
const label
n : sizes_)
114 nTotal += sizes_[typei];
140 sizes_[typei] = size(
elemType(typei));
148 for (
int typei=0; typei < nTypes; ++typei)
150 const labelRange sub(
range(elemType(typei)));
154 SubList<label> ids(addressing(), sub);
162 template<
class Addressing>
163 void Foam::ensightCells::classifyImpl
165 const polyMesh&
mesh,
166 const Addressing& cellIds
180 for (
const label
id : cellIds)
182 const cellModel& model = shapes[id].model();
184 elemType etype(NFACED);
189 else if (model == pyr)
193 else if (model == prism)
197 else if (model ==
hex)
211 for (
const label
id : cellIds)
213 const cellModel& model = shapes[id].model();
215 elemType etype(NFACED);
220 else if (model == pyr)
224 else if (model == prism)
228 else if (model ==
hex)
251 classifyImpl(
mesh, cellIds);
261 classifyImpl(
mesh, selection);
const labelList & addressing() const noexcept
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
void rename(const string &value)
void resize(const label len)
static constexpr const zero Zero
Ostream & writeList(Ostream &os, const label shortLen=0) const
A List obtained as a section of another List.
static const char * key(const elemType etype)
List< cellShape > cellShapeList
List of cellShapes and PtrList of List of cellShape.
virtual Ostream & beginBlock(const keyType &kw)
Mesh consisting of general polyhedral cells.
static const char * elemNames[nTypes]
virtual void writeDict(Ostream &os, const bool full=false) const
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
label nCells() const noexcept
static constexpr int nTypes
bool empty() const noexcept
A range or interval of labels defined by a start and a size.
Sorting/classification of cells (3D) into corresponding ensight element types.
static const cellModel & ref(const modelType model)
virtual Ostream & endBlock()
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
OBJstream os(runTime.globalPath()/outputName)
virtual Ostream & writeKeyword(const keyType &kw)
const cellShapeList & cellShapes() const
IOstream & hex(IOstream &io)
unsigned int count(const UList< bool > &bools, const bool val=true)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Base class for ensightCells, ensightFaces, ensightOutputSurfaces.
Ostream & endEntry(Ostream &os)
fileName::Type type(const fileName &name, const bool followLink=true)
A 1D vector of objects of type <T> with a fixed length <N>.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Ostream & writeEntry(const keyType &key, const T &value)
word name(const expressions::valueTypeCode typeCode)
iterator begin() noexcept
Maps a geometry to a set of cell primitives.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void classify(const polyMesh &mesh)
FixedList< label, nTypes > sizes() const
defineTypeNameAndDebug(combustionModel, 0)