Sorting/classification of cells (3D) into corresponding ensight element types. More...
#include <ensightCells.H>


Public Types | |
| enum | elemType { TETRA4 = 0 , PYRAMID5 , PENTA6 , HEXA8 , NFACED } |
| Supported ensight 'Cell' element types. More... | |
Public Member Functions | |
| TypeName ("ensightCells") | |
| Declare type-name, virtual type (with debug switch). | |
| ensightCells () | |
| Default construct, with part index 0. | |
| ensightCells (const string &description) | |
| Default construct, with description/partName. | |
| virtual | ~ensightCells ()=default |
| Destructor. | |
| bool | manifold () const noexcept |
| Manifold mesh cells detected? Globally consistent quantity. | |
| label | size (const elemType etype) const |
| Processor-local size of the specified element type. | |
| labelRange | range (const elemType etype) const |
| Processor-local offset/size of element type. | |
| label | totalSize () const noexcept |
| The global size of all element types. | |
| label | total () const noexcept |
| Same as totalSize(). | |
| label | total (const elemType etype) const |
| The global size of the specified element type. | |
| 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. | |
| const labelUList | cellIds (const elemType etype) const |
| Processor-local cell ids of the specified element type. | |
| Map< label > | meshPointMap (const polyMesh &mesh) const |
| Mesh point map. | |
| void | classify (const polyMesh &mesh) |
| Classify cell types and set the element lists. | |
| 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). | |
| void | classify (const polyMesh &mesh, const bitSet &selection) |
| Classify cell types and set element lists, using a subgroup of cells. | |
| void | clearOut () |
| Clear any demand-driven data. | |
| void | clear () |
| Set addressable sizes to zero, free up addressing memory. | |
| void | reduce () |
| Sum element counts across all processes. | |
| void | sort () |
| Sort element lists numerically. | |
| void | incrCellIds (const label off) |
| Increase cell ids by specified offset value. | |
| void | decrCellIds (const label off) |
| Decrease face ids by specified offset value. | |
| InfoProxy< ensightCells > | info () const noexcept |
| Return info proxy, used to print information to a stream. | |
| label | uniqueMeshPoints (const polyMesh &mesh, labelList &uniqueMeshPointLabels, bool parallel) const |
| Globally unique mesh points. Required when writing point fields. | |
| virtual void | writeDict (Ostream &os, const bool full=false) const |
| Write information about the object as a dictionary, optionally write all element addresses. | |
| virtual void | write (ensightGeoFile &os, const polyMesh &mesh, bool parallel) const |
| Write geometry, using a mesh reference (serial only) No beginGeometry() marker. | |
| label | size () const noexcept |
| Processor-local size of all elements. | |
| Public Member Functions inherited from ensightPart | |
| TypeNameNoDebug ("ensightPart") | |
| Declare type-name, virtual type (without debug switch). | |
| ensightPart () | |
| Default construct. Index=0, identifier = -1. | |
| ensightPart (const string &description) | |
| Default construct, with description/partName. | |
| virtual | ~ensightPart ()=default |
| Destructor. | |
| label | index () const noexcept |
| The index in a list (0-based). | |
| label & | index () noexcept |
| The index in a list (0-based). | |
| label | identifier () const noexcept |
| OpenFOAM identifier (patch, zone, etc), -1 when not in use. | |
| label & | identifier () noexcept |
| OpenFOAM identifier (patch, zone, etc), -1 when not in use. | |
| bool | empty () const noexcept |
| Processor-local test for any elements. | |
| label | size () const noexcept |
| Processor-local size of all elements. | |
| const string & | name () const noexcept |
| The part name or description. | |
| void | rename (const string &value) |
| Change the part name or description. | |
| void | rename (string &&value) |
| Change the part name or description. | |
| label | operator[] (const label i) const |
| Processor-local element id from linear-list of addresses. | |
Static Public Member Functions | |
| static const char * | key (const elemType etype) noexcept |
| The ensight element name for the specified 'Cell' type. | |
| 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. | |
Static Public Attributes | |
| static constexpr int | nTypes = 5 |
| Number of 'Cell' element types (5). | |
| static const char * | elemNames [nTypes] |
| The ensight 'Cell' element type names. | |
Additional Inherited Members | |
| Protected Member Functions inherited from ensightPart | |
| const labelList & | addressing () const noexcept |
| Element addressing. | |
| labelList & | addressing () noexcept |
| Element addressing. | |
| void | clear () |
| Clear element addressing. | |
| void | incrAddressing (const label off) |
| Increase addressing by specified offset value. | |
| void | decrAddressing (const label off) |
| Decrease addressing by specified offset value. | |
Sorting/classification of cells (3D) into corresponding ensight element types.
Definition at line 50 of file ensightCells.H.
| enum elemType |
Supported ensight 'Cell' element types.
Must be zero-based since they are also for internal bookkeeping.
| Enumerator | |
|---|---|
| TETRA4 | "tetra4" |
| PYRAMID5 | "pyramid5" |
| PENTA6 | "penta6" |
| HEXA8 | "hexa8" |
| NFACED | "nfaced" |
Definition at line 63 of file ensightCells.H.
| ensightCells | ( | ) |
Default construct, with part index 0.
Definition at line 72 of file ensightCells.C.
References ensightPart::ensightPart(), and Foam::Zero.
Referenced by ensightCells(), and write().


|
explicit |
Default construct, with description/partName.
Definition at line 81 of file ensightCells.C.
References ensightCells(), and ensightPart::rename().

|
virtualdefault |
Destructor.
References ensightPart::ensightPart(), Foam::noexcept, range(), size(), and totalSize().

|
inlinestaticnoexcept |
The ensight element name for the specified 'Cell' type.
Definition at line 42 of file ensightCellsI.H.
References elemNames.
Referenced by writeBox(), and writeDict().

| TypeName | ( | "ensightCells" | ) |
Declare type-name, virtual type (with debug switch).
|
inlinenoexcept |
Manifold mesh cells detected? Globally consistent quantity.
Definition at line 36 of file ensightCellsI.H.
References Foam::noexcept.
|
inline |
Processor-local size of the specified element type.
Definition at line 60 of file ensightCellsI.H.
Referenced by reduce(), sizes(), writeDict(), and ~ensightCells().

|
inline |
Processor-local offset/size of element type.
Definition at line 66 of file ensightCellsI.H.
Referenced by ~ensightCells().

|
noexcept |
The global size of all element types.
This value is only meaningful after a reduce operation.
Definition at line 104 of file ensightCells.C.
References n, and Foam::noexcept.
Referenced by total(), and ~ensightCells().

|
inlinenoexcept |
Same as totalSize().
Definition at line 232 of file ensightCells.H.
References Foam::noexcept, total(), and totalSize().
Referenced by total().


|
inline |
The global size of the specified element type.
This value is only meaningful after a reduce operation.
Definition at line 54 of file ensightCellsI.H.
|
inline |
The global sizes for each element type.
This value is only meaningful after a reduce operation.
Definition at line 48 of file ensightCellsI.H.
| Foam::FixedList< Foam::label, 5 > sizes | ( | ) | const |
Processor-local sizes per element type.
Definition at line 91 of file ensightCells.C.
References nTypes, and size().

|
inline |
Processor-local cell ids of all elements.
Definition at line 72 of file ensightCellsI.H.
References ensightPart::addressing().
Referenced by classify(), meshPointMap(), and writeDict().


|
inline |
Processor-local cell ids of the specified element type.
Definition at line 79 of file ensightCellsI.H.
References ensightPart::addressing(), and range.

Mesh point map.
Map mesh point index to local (compact) point index
const cellList& meshCells = mesh.cells();
Definition at line 31 of file ensightCellsAddr.C.
References cellIds(), manifoldCellsMeshObject::cells(), HashTable< T, Key, Hash >::insert(), mesh, MeshObject< polyMesh, UpdateableMeshObject, manifoldCellsMeshObject >::New(), nPoints, size(), and HashTable< T, Key, Hash >::sortedToc().

| void classify | ( | const polyMesh & | mesh | ) |
Classify cell types and set the element lists.
Definition at line 235 of file ensightCells.C.
References mesh.
Referenced by ensightMesh::correct().

| 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 242 of file ensightCells.C.
References cellIds(), and mesh.

Classify cell types and set element lists, using a subgroup of cells.
Definition at line 252 of file ensightCells.C.
References mesh.
| void clearOut | ( | ) |
Clear any demand-driven data.
Definition at line 127 of file ensightCells.C.
Referenced by clear().

| void clear | ( | ) |
Set addressable sizes to zero, free up addressing memory.
Definition at line 115 of file ensightCells.C.
References ensightPart::clear(), clearOut(), and Foam::Zero.
Referenced by ensightMesh::correct().


| void reduce | ( | ) |
Sum element counts across all processes.
Definition at line 131 of file ensightCells.C.
References nTypes, Foam::reduce(), and size().
Referenced by ensightMesh::correct().


| void sort | ( | ) |
Sort element lists numerically.
Definition at line 141 of file ensightCells.C.
References ensightPart::addressing(), IntRange< IntType >::empty(), nTypes, range, and Foam::sort().

|
inline |
Increase cell ids by specified offset value.
Eg, to change zone local Ids to global Ids
Definition at line 85 of file ensightCellsI.H.
References ensightPart::incrAddressing().

|
inline |
Decrease face ids by specified offset value.
Eg, to change global Ids to zone local Ids
Definition at line 91 of file ensightCellsI.H.
References ensightPart::decrAddressing().

|
inlinenoexcept |
Return info proxy, used to print information to a stream.
Definition at line 339 of file ensightCells.H.
References Foam::noexcept.
Referenced by ensightMesh::correct().

| Foam::label uniqueMeshPoints | ( | const polyMesh & | mesh, |
| labelList & | uniqueMeshPointLabels, | ||
| bool | parallel ) const |
Globally unique mesh points. Required when writing point fields.
Definition at line 220 of file ensightCellsAddr.C.
References mesh, and List< label >::null().

|
virtual |
Write information about the object as a dictionary, optionally write all element addresses.
Reimplemented from ensightPart.
Definition at line 262 of file ensightCells.C.
References cellIds(), Foam::endEntry(), ensightPart::index(), key(), name, nTypes, os(), size(), and Foam::type().

|
virtual |
Write geometry, using a mesh reference (serial only) No beginGeometry() marker.
< Collective write?
Definition at line 261 of file ensightCellsIO.C.
References ensightCells(), ensightPart::index(), mesh, ensightPart::name(), NFACED, nPoints, nTypes, os(), UPstream::parRun(), and Foam::ensightOutput::Detail::writeCoordinates().

|
static |
Write bounding box geometry. All parameters are only relevant on master No beginGeometry() marker.
Definition at line 328 of file ensightCellsIO.C.
References List< T >::emplace_back(), cellModel::HEX, HEXA8, boundBox::hexCorners(), Foam::identity(), key(), UPstream::master(), os(), points, UList< T >::size(), Foam::ensightOutput::writeCellShapes(), and Foam::ensightOutput::Detail::writeCoordinates().
Referenced by ensightMesh::write().


|
inlinenoexcept |
Processor-local size of all elements.
Definition at line 193 of file ensightPart.H.
Referenced by meshPointMap().

|
staticconstexpr |
Number of 'Cell' element types (5).
Definition at line 75 of file ensightCells.H.
Referenced by Foam::operator<<(), reduce(), sizes(), sort(), write(), and writeDict().
|
static |
The ensight 'Cell' element type names.
Definition at line 35 of file ensightCells.H.
Referenced by key(), and Foam::operator<<().