Go to the documentation of this file.
37 {
"tetra4",
"pyramid5",
"penta6",
"hexa8",
"nfaced" };
42 void Foam::ensightCells::resizeAll()
56 slices_[typei].setStart(
n);
57 slices_[typei].setSize(sizes_[typei]);
86 address_(obj.address_),
94 this->sizes_ = obj.
sizes();
99 this->sizes_ = totSizes;
110 count[typei] = slices_[typei].size();
140 sizes_[typei] = slices_[typei].size();
150 if (slices_[typei].size())
159 template<
class Addressing>
160 void Foam::ensightCells::classifyImpl
163 const Addressing& cellIds
177 for (
const label id : cellIds)
179 const cellModel& model = shapes[id].model();
181 enum elemType what = NFACED;
186 else if (model == pyr)
190 else if (model == prism)
194 else if (model ==
hex)
207 for (
const label id : cellIds)
209 const cellModel& model = shapes[id].model();
211 enum elemType what = NFACED;
216 else if (model == pyr)
220 else if (model == prism)
224 else if (model ==
hex)
232 slice[sizes_[what]] = id;
251 classifyImpl(
mesh, cellIds);
261 classifyImpl(
mesh, selection);
static const char * elemNames[5]
The ensight element type names.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
static constexpr const zero Zero
Global zero.
A List obtained as a section of another List.
void sort()
Sort element lists numerically.
Mesh consisting of general polyhedral cells.
#define forAll(list, i)
Loop across all elements in list.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
label nCells() const
Number of mesh cells.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
ensightCells()
Construct null, with part index 0.
label total() const
The global number 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.
const cellShapeList & cellShapes() const
Return cell shapes.
IOstream & hex(IOstream &io)
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
static labelRange identity(const label len, const label start=0) noexcept
Maps a geometry to a set of cell primitives.
UList< label > labelUList
A UList of labels.
void classify(const polyMesh &mesh)
Classify cell types and set the element lists.
void setSize(const label newSize)
Alias for resize(const label)
FixedList< label, 5 > sizes() const
The processor local sizes per element type.
void reduce()
Sum element counts across all processes.
void clear()
Set addressable sizes to zero, free up addressing memory.