Sorting/classification of cells (3D) into corresponding ensight element types. More...
Public Types | |
enum | elemType { TETRA4, PYRAMID5, PENTA6, HEXA8, NFACED } |
Addressable ensight element types. More... | |
Public Member Functions | |
ensightCells () | |
Construct null, with part index 0. More... | |
ensightCells (const label partIndex) | |
Construct null, with specified part index. More... | |
ensightCells (const ensightCells &obj) | |
Copy constructor. Needed for lists etc. More... | |
~ensightCells ()=default | |
Destructor. More... | |
label | index () const |
The index in a list. More... | |
label & | index () |
The index in a list, non-const access. More... | |
label | size () const |
The processor local size of all elements. More... | |
label | size (const enum elemType) const |
The processor local size of the specified element type. More... | |
label | total (const enum elemType) const |
The global number of the specified element type. More... | |
label | total () const |
The global number of all element types. More... | |
const FixedList< label, 5 > & | totals () const |
The global numbers per element type. More... | |
FixedList< label, 5 > | sizes () const |
The processor local sizes per element type. More... | |
label | offset (const enum elemType what) const |
Processor local starting offset of element type. More... | |
const labelUList | cellIds (const enum elemType) const |
Return the (local) cell ids of the specified element type. More... | |
const labelUList & | cellIds () const |
Return the cell ids of all elements. More... | |
void | classify (const polyMesh &mesh) |
Classify cell types and set the element lists. More... | |
void | classify (const polyMesh &mesh, const labelUList &cellIds) |
void | classify (const polyMesh &mesh, const bitSet &selection) |
void | clear () |
Set addressable sizes to zero, free up addressing memory. More... | |
void | reduce () |
Sum element counts across all processes. More... | |
void | sort () |
Sort element lists numerically. More... | |
label | operator[] (const label i) const |
Return id from linear list of addressing. More... | |
Static Public Member Functions | |
static const char * | key (const enum elemType) |
Return the ensight element name for the specified type. More... | |
Static Public Attributes | |
static constexpr int | nTypes = 5 |
Number of element types (5) More... | |
static const char * | elemNames [5] |
The ensight element type names. More... | |
Sorting/classification of cells (3D) into corresponding ensight element types.
Definition at line 53 of file ensightCells.H.
enum elemType |
Addressable ensight element types.
Enumerator | |
---|---|
TETRA4 | "tetra4" |
PYRAMID5 | "pyramid5" |
PENTA6 | "penta6" |
HEXA8 | "hexa8" |
NFACED | "nfaced" |
Definition at line 60 of file ensightCells.H.
ensightCells | ( | ) |
Construct null, with part index 0.
Definition at line 66 of file ensightCells.C.
|
explicit |
Construct null, with specified part index.
Definition at line 72 of file ensightCells.C.
ensightCells | ( | const ensightCells & | obj | ) |
Copy constructor. Needed for lists etc.
Definition at line 83 of file ensightCells.C.
References ensightCells::sizes().
|
default |
Destructor.
|
inlinestatic |
Return the ensight element name for the specified type.
Definition at line 32 of file ensightCellsI.H.
References ensightCells::elemNames.
Referenced by ensightPartCells::dumpInfo(), and ensightPartCells::write().
|
inline |
The index in a list.
Definition at line 38 of file ensightCellsI.H.
Referenced by ensightPartCells::index(), and Foam::ensightOutput::Detail::writeCellField().
|
inline |
The index in a list, non-const access.
Definition at line 44 of file ensightCellsI.H.
|
inline |
The processor local size of all elements.
Definition at line 50 of file ensightCellsI.H.
Referenced by ensightPartCells::size(), and Foam::ensightOutput::Detail::writeCellField().
|
inline |
The processor local size of the specified element type.
Definition at line 68 of file ensightCellsI.H.
|
inline |
The global number of the specified element type.
This value is only meaningful after a reduce operation.
Definition at line 62 of file ensightCellsI.H.
Referenced by Foam::ensightOutput::Detail::writeCellField().
Foam::label total | ( | ) | const |
The global number of all element types.
This value is only meaningful after a reduce operation.
Definition at line 117 of file ensightCells.C.
|
inline |
The global numbers per element type.
This value is only meaningful after a reduce operation.
Definition at line 56 of file ensightCellsI.H.
Foam::FixedList< Foam::label, 5 > sizes | ( | ) | const |
The processor local sizes per element type.
Definition at line 105 of file ensightCells.C.
References Foam::BitOps::count(), and forAll.
Referenced by ensightCells::ensightCells().
|
inline |
Processor local starting offset of element type.
Definition at line 74 of file ensightCellsI.H.
|
inline |
Return the (local) cell ids of the specified element type.
Definition at line 81 of file ensightCellsI.H.
Referenced by Foam::ensightOutput::Detail::writeCellField().
|
inline |
Return the cell ids of all elements.
Definition at line 89 of file ensightCellsI.H.
void classify | ( | const polyMesh & | mesh | ) |
Classify cell types and set the element lists.
Definition at line 238 of file ensightCells.C.
References labelRange::identity(), mesh, and primitiveMesh::nCells().
void classify | ( | const polyMesh & | mesh, |
const labelUList & | cellIds | ||
) |
Classify cell types and set element lists, using a subgroup of cells (eg, from a cellZone etc).
Definition at line 246 of file ensightCells.C.
References mesh.
Classify cell types and set element lists, using a subgroup of cells
Definition at line 256 of file ensightCells.C.
References mesh.
void clear | ( | ) |
Set addressable sizes to zero, free up addressing memory.
Definition at line 128 of file ensightCells.C.
References Foam::Zero.
void reduce | ( | ) |
Sum element counts across all processes.
Definition at line 135 of file ensightCells.C.
References forAll, and Foam::reduce().
void sort | ( | ) |
Sort element lists numerically.
Definition at line 146 of file ensightCells.C.
References forAll, and Foam::sort().
|
inline |
Return id from linear list of addressing.
Definition at line 95 of file ensightCellsI.H.
|
staticconstexpr |
Number of element types (5)
Definition at line 70 of file ensightCells.H.
Referenced by ensightPartCells::dumpInfo(), and ensightPartCells::write().
|
static |
The ensight element type names.
Definition at line 73 of file ensightCells.H.
Referenced by ensightCells::key().