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)
162 template<
class Addressing>
163 void Foam::ensightCells::classifyImpl
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);
Ostream & writeList(Ostream &os, const label shortLen=0) const
Write List, with line-breaks in ASCII when length exceeds shortLen.
const labelList & addressing() const noexcept
Element addressing.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
void rename(const string &value)
Change the part name or description.
void resize(const label len)
Adjust allocated size of list.
static constexpr const zero Zero
Global zero (0)
A List obtained as a section of another List.
static const char * key(const elemType etype)
The ensight element name for the specified 'Cell' type.
void sort()
Sort element lists numerically.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
Mesh consisting of general polyhedral cells.
#define forAll(list, i)
Loop across all elements in list.
static const char * elemNames[nTypes]
The ensight 'Cell' element type names.
virtual void writeDict(Ostream &os, const bool full=false) const
iterator begin() noexcept
Return an iterator to begin traversing the FixedList.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
label nCells() const noexcept
Number of mesh cells.
static constexpr int nTypes
Number of 'Cell' element types (5)
ensightCells()
Default construct, with part index 0.
bool empty() const noexcept
True if range is empty (zero-sized)
A range or interval of labels defined by a start and a size.
label total() const
The global size of all element types.
Sorting/classification of cells (3D) into corresponding ensight element types.
static const cellModel & ref(const modelType model)
Look up reference to cellModel by enumeration. Fatal on failure.
virtual Ostream & endBlock()
Write end block group.
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)
Write the keyword followed by an appropriate indentation.
const cellShapeList & cellShapes() const
Return cell shapes.
IOstream & hex(IOstream &io)
elemType
Supported ensight 'Cell' element types.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
Base class for ensightCells, ensightFaces, ensightOutputSurfaces.
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.
A 1D vector of objects of type <T> with a fixed length <N>.
void clearOut()
Clear any demand-driven data.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
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)
Classify cell types and set the element lists.
void clear()
Clear element addressing.
FixedList< label, nTypes > sizes() const
Processor-local sizes per element type.
defineTypeNameAndDebug(combustionModel, 0)
void reduce()
Sum element counts across all processes.
void clear()
Set addressable sizes to zero, free up addressing memory.