ensightFaces Class Reference

Sorting/classification of faces (2D) into corresponding ensight types. More...

Inheritance diagram for ensightFaces:
[legend]

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...
 
labelindex ()
 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 labelUListfaceIds () const
 Return the processor local face ids of all elements. More...
 
const boolListflipMap () 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...
 

Detailed Description

Sorting/classification of faces (2D) into corresponding ensight types.

Definition at line 51 of file ensightFaces.H.

Member Enumeration Documentation

◆ elemType

enum elemType

Addressable ensight element types.

Enumerator
TRIA3 

"tria3"

QUAD4 

"quad4"

NSIDED 

"nsided"

Definition at line 58 of file ensightFaces.H.

Constructor & Destructor Documentation

◆ ensightFaces() [1/3]

Construct null, with part index 0.

Definition at line 109 of file ensightFaces.C.

◆ ensightFaces() [2/3]

ensightFaces ( const label  partIndex)
explicit

Construct null, with specified part index.

Definition at line 115 of file ensightFaces.C.

◆ ensightFaces() [3/3]

ensightFaces ( const ensightFaces obj)

Copy constructor. Needed for lists etc.

Definition at line 127 of file ensightFaces.C.

References ensightFaces::sizes().

Here is the call graph for this function:

◆ ~ensightFaces()

~ensightFaces ( )
default

Destructor.

Member Function Documentation

◆ key()

const char * key ( const enum elemType  what)
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().

Here is the caller graph for this function:

◆ index() [1/2]

Foam::label index ( ) const
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().

Here is the caller graph for this function:

◆ index() [2/2]

Foam::label & index ( )
inline

The index in a list, non-const access.

Definition at line 44 of file ensightFacesI.H.

◆ size() [1/2]

Foam::label size ( ) const
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().

Here is the caller graph for this function:

◆ size() [2/2]

Foam::label size ( const enum elemType  what) const
inline

The processor local size of the specified element type.

Definition at line 68 of file ensightFacesI.H.

◆ total() [1/2]

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.

References forAll, and n.

Referenced by ensightMesh::correct(), Foam::ensightOutput::Detail::writeFaceField(), Foam::ensightOutput::Detail::writeFaceSubField(), and Foam::ensightOutput::Serial::writePointField().

Here is the caller graph for this function:

◆ total() [2/2]

Foam::label total ( const enum elemType  what) const
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.

◆ totals()

const Foam::FixedList< Foam::label, 3 > & totals ( ) const
inline

The global numbers per element type.

This value is only meaningful after a reduce operation.

Definition at line 56 of file ensightFacesI.H.

◆ sizes()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ offset()

Foam::label offset ( const enum elemType  what) const
inline

Processor local starting offset of element type.

Definition at line 74 of file ensightFacesI.H.

◆ faceIds() [1/2]

const Foam::labelUList faceIds ( const enum elemType  what) const
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().

Here is the caller graph for this function:

◆ faceIds() [2/2]

const Foam::labelUList & faceIds ( ) const
inline

Return the processor local face ids of all elements.

Definition at line 89 of file ensightFacesI.H.

◆ flipMap()

const Foam::boolList & flipMap ( ) const
inline

Return the processor local flip-map of all elements.

Definition at line 95 of file ensightFacesI.H.

Referenced by ensightMesh::write().

Here is the caller graph for this function:

◆ classify() [1/2]

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ classify() [2/2]

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.

Here is the call graph for this function:

◆ clear()

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().

Here is the caller graph for this function:

◆ reduce()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sort()

void sort ( )

Sort element lists numerically.

Definition at line 191 of file ensightFaces.C.

References forAll, Foam::sort(), and Foam::sortedOrder().

Here is the call graph for this function:

◆ operator[]()

Foam::label operator[] ( const label  i) const
inline

Return element from linear-list.

Definition at line 101 of file ensightFacesI.H.

Member Data Documentation

◆ nTypes

constexpr int nTypes = 3
staticconstexpr

Number of element types (3)

Definition at line 66 of file ensightFaces.H.

Referenced by ensightPartFaces::dumpInfo(), and ensightPartFaces::write().

◆ elemNames

const char * elemNames
static
Initial value:
=
{ "tria3", "quad4", "nsided" }

The ensight element type names.

Definition at line 69 of file ensightFaces.H.

Referenced by ensightFaces::key().


The documentation for this class was generated from the following files: