35#ifndef Foam_ensightCells_H
36#define Foam_ensightCells_H
77 static constexpr int nTypes = 5;
86 inline static const char*
key(
const elemType etype)
noexcept;
108 inline label add(
const elemType etype, label
id);
115 template<
class Addressing>
119 label meshPointMappings
129 static void writePolysConnectivity
139 static void writeShapeConnectivity
292 const label partIndex = 0,
293 const word& partName =
"geometry-box"
300Ostream&
operator<<(Ostream&,
const InfoProxy<ensightCells>&);
A 1D vector of objects of type <T> with a fixed length <N>.
A helper class for outputting values to Ostream.
A HashTable to objects of type <T> with a label key.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
A bounding box defined in terms of min/max extrema points.
static void writeBox(ensightGeoFile &os, const boundBox &bb, const label partIndex=0, const word &partName="geometry-box")
Write bounding box geometry. All parameters are only relevant on master No beginGeometry() marker.
label uniqueMeshPoints(const polyMesh &mesh, labelList &uniqueMeshPointLabels, bool parallel) const
Globally unique mesh points. Required when writing point fields.
labelRange range(const elemType etype) const
Processor-local offset/size of element type.
static const char * key(const elemType etype) noexcept
The ensight element name for the specified 'Cell' type.
Map< label > meshPointMap(const polyMesh &mesh) const
Mesh point map.
label totalSize() const noexcept
The global size of all element types.
label total() const noexcept
Same as totalSize().
virtual ~ensightCells()=default
Destructor.
void reduce()
Sum element counts across all processes.
bool manifold() const noexcept
Manifold mesh cells detected? Globally consistent quantity.
void sort()
Sort element lists numerically.
void classify(const polyMesh &mesh)
Classify cell types and set the element lists.
static constexpr int nTypes
Number of 'Cell' element types (5).
TypeName("ensightCells")
Declare type-name, virtual type (with debug switch).
virtual void writeDict(Ostream &os, const bool full=false) const
Write information about the object as a dictionary, optionally write all element addresses.
void incrCellIds(const label off)
Increase cell ids by specified offset value.
label size(const elemType etype) const
Processor-local size of the specified element type.
ensightCells()
Default construct, with part index 0.
static const char * elemNames[nTypes]
The ensight 'Cell' element type names.
elemType
Supported ensight 'Cell' element types.
InfoProxy< ensightCells > info() const noexcept
Return info proxy, used to print information to a stream.
void clear()
Set addressable sizes to zero, free up addressing memory.
void decrCellIds(const label off)
Decrease face ids by specified offset value.
const FixedList< label, nTypes > & totals() const
The global sizes for each element type.
FixedList< label, nTypes > sizes() const
Processor-local sizes per element type.
const labelList & cellIds() const
Processor-local cell ids of all elements.
void clearOut()
Clear any demand-driven data.
A variant of ensightFile (Ensight writing) that includes the extra geometry file header information.
ensightPart()
Default construct. Index=0, identifier = -1.
A range or interval of labels defined by a start and a size.
Mesh consisting of general polyhedral cells.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
List< label > labelList
A List of labels.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
UList< label > labelUList
A UList of labels.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.