Sorting/classification of faces (2D) into corresponding ensight types. More...
Public Types | |
enum | elemType { TRIA3, QUAD4, NSIDED } |
Addressable ensight element types. More... | |
Public Member Functions | |
ensightFaces () | |
Construct null, with part index 0. More... | |
ensightFaces (const label partIndex) | |
Construct null, with specified part index. More... | |
ensightFaces (const ensightFaces &obj) | |
Copy constructor. Needed for lists etc. More... | |
~ensightFaces ()=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 |
The global number of all element types. More... | |
label | total (const enum elemType) const |
The global number of the specified element type. More... | |
const FixedList< label, 3 > & | totals () const |
The global numbers per element type. More... | |
FixedList< label, 3 > | 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 | faceIds (const enum elemType) const |
Return the (local) face ids of the specified element type. More... | |
const labelUList & | faceIds () const |
Return the processor local face ids of all elements. More... | |
const boolList & | flipMap () const |
Return the processor local flip-map of all elements. More... | |
void | classify (const faceList &faces) |
Classify the face types, set element list. More... | |
void | classify (const faceList &faces, const labelUList &addressing, const boolList &flipMap=boolList(), const bitSet &exclude=bitSet()) |
Classify the face types, set element list. More... | |
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 element from linear-list. 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 = 3 |
Number of element types (3) More... | |
static const char * | elemNames [3] |
The ensight element type names. More... | |
Sorting/classification of faces (2D) into corresponding ensight types.
Definition at line 51 of file ensightFaces.H.
enum elemType |
Addressable ensight element types.
Enumerator | |
---|---|
TRIA3 | "tria3" |
QUAD4 | "quad4" |
NSIDED | "nsided" |
Definition at line 58 of file ensightFaces.H.
ensightFaces | ( | ) |
Construct null, with part index 0.
Definition at line 109 of file ensightFaces.C.
|
explicit |
Construct null, with specified part index.
Definition at line 115 of file ensightFaces.C.
ensightFaces | ( | const ensightFaces & | obj | ) |
Copy constructor. Needed for lists etc.
Definition at line 127 of file ensightFaces.C.
References ensightFaces::sizes().
|
default |
Destructor.
|
inlinestatic |
Return the ensight element name for the specified type.
Definition at line 32 of file ensightFacesI.H.
References ensightFaces::elemNames.
Referenced by ensightPartFaces::dumpInfo(), and ensightPartFaces::write().
|
inline |
The index in a list.
Definition at line 38 of file ensightFacesI.H.
Referenced by ensightMesh::correct(), ensightPartFaces::index(), ensightMesh::write(), Foam::ensightOutput::Detail::writeFaceField(), Foam::ensightOutput::Detail::writeFaceSubField(), Foam::ensightOutput::Detail::writePointField(), and Foam::ensightOutput::Serial::writePointField().
|
inline |
The index in a list, non-const access.
Definition at line 44 of file ensightFacesI.H.
|
inline |
The processor local size of all elements.
Definition at line 50 of file ensightFacesI.H.
Referenced by ensightPartFaces::size(), Foam::ensightOutput::Detail::writeFaceField(), Foam::ensightOutput::Detail::writeFaceSubField(), Foam::ensightOutput::Serial::writePointField(), and Foam::ensightOutput::Detail::writeVolField().
|
inline |
The processor local size of the specified element type.
Definition at line 68 of file ensightFacesI.H.
Foam::label total | ( | ) | const |
The global number of all element types.
This value is only meaningful after a reduce operation.
Definition at line 162 of file ensightFaces.C.
Referenced by ensightMesh::correct(), Foam::ensightOutput::Detail::writeFaceField(), Foam::ensightOutput::Detail::writeFaceSubField(), and Foam::ensightOutput::Serial::writePointField().
|
inline |
The global number of the specified element type.
This value is only meaningful after a reduce operation.
Definition at line 62 of file ensightFacesI.H.
|
inline |
The global numbers per element type.
This value is only meaningful after a reduce operation.
Definition at line 56 of file ensightFacesI.H.
Foam::FixedList< Foam::label, 3 > sizes | ( | ) | const |
The processor local sizes per element type.
Definition at line 150 of file ensightFaces.C.
References Foam::BitOps::count(), and forAll.
Referenced by ensightFaces::ensightFaces().
|
inline |
Processor local starting offset of element type.
Definition at line 74 of file ensightFacesI.H.
|
inline |
Return the (local) face ids of the specified element type.
Definition at line 81 of file ensightFacesI.H.
Referenced by ensightMesh::write(), Foam::ensightOutput::Detail::writeFaceField(), Foam::ensightOutput::Detail::writeFaceSubField(), and Foam::ensightOutput::Detail::writePointField().
|
inline |
Return the processor local face ids of all elements.
Definition at line 89 of file ensightFacesI.H.
|
inline |
Return the processor local flip-map of all elements.
Definition at line 95 of file ensightFacesI.H.
Referenced by ensightMesh::write().
void classify | ( | const faceList & | faces | ) |
Classify the face types, set element list.
Definition at line 229 of file ensightFaces.C.
References Foam::add(), and Foam::Zero.
Referenced by ensightMesh::correct().
void classify | ( | const faceList & | faces, |
const labelUList & | addressing, | ||
const boolList & | flipMap = boolList() , |
||
const bitSet & | exclude = bitSet() |
||
) |
Classify the face types, set element list.
The indirect addressing can be used when classifying groups of face (eg, from a faceZone etc) with an optional flipMap. The optional exclude marker can be used to skip faces on particular boundary types or regions.
Definition at line 255 of file ensightFaces.C.
References Foam::add(), faceId(), UList< T >::size(), bitSet::test(), and Foam::Zero.
void clear | ( | ) |
Set addressable sizes to zero, free up addressing memory.
Definition at line 173 of file ensightFaces.C.
References Foam::Zero.
Referenced by ensightMesh::correct().
void reduce | ( | ) |
Sum element counts across all processes.
Definition at line 180 of file ensightFaces.C.
References forAll, and Foam::reduce().
Referenced by ensightMesh::correct().
void sort | ( | ) |
Sort element lists numerically.
Definition at line 191 of file ensightFaces.C.
References forAll, Foam::sort(), and Foam::sortedOrder().
|
inline |
Return element from linear-list.
Definition at line 101 of file ensightFacesI.H.
|
staticconstexpr |
Number of element types (3)
Definition at line 66 of file ensightFaces.H.
Referenced by ensightPartFaces::dumpInfo(), and ensightPartFaces::write().
|
static |
The ensight element type names.
Definition at line 69 of file ensightFaces.H.
Referenced by ensightFaces::key().