Sorting/classification of faces (2D) into corresponding ensight types. More...
Public Types | |
enum | elemType { TRIA3 = 0, QUAD4, NSIDED } |
Supported ensight 'Face' element types. More... | |
Public Member Functions | |
TypeName ("ensightFaces") | |
Declare type-name, virtual type (with debug switch) More... | |
ensightFaces () | |
Default construct, with part index 0. More... | |
ensightFaces (const string &description) | |
Default construct, with description/partName. More... | |
virtual | ~ensightFaces ()=default |
Destructor. More... | |
label | size (const elemType etype) const |
Processor-local size of the specified element type. More... | |
labelRange | range (const elemType etype) const |
Processor-local offset/size of element type. More... | |
label | total () const |
The global size of all element types. More... | |
label | total (const elemType etype) const |
The global size of the specified element type. More... | |
const FixedList< label, nTypes > & | totals () const |
The global sizes for each element type. More... | |
FixedList< label, nTypes > | sizes () const |
Processor-local sizes per element type. More... | |
const labelList & | faceIds () const |
Processor-local face ids of all elements. More... | |
const labelUList | faceIds (const elemType etype) const |
Processor-local face ids of the specified element type. More... | |
const boolList & | flipMap () const |
Processor-local flip-map of all elements. More... | |
bool | usesFlipMap () const |
True for non-zero flip-map that spans the addresses. More... | |
void | classify (const UList< face > &faces) |
Classify the face types and set the element lists. More... | |
void | classify (const UList< face > &faces, const labelRange &range) |
Classify face types (for a sublist) and set element lists. More... | |
void | classify (const UList< face > &faces, const labelUList &addr, const boolList &flipMap=boolList(), const bitSet &exclude=bitSet()) |
Classify the face types and set the element lists. More... | |
void | clearOut () |
Clear any demand-driven data. 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... | |
void | incrFaceIds (const label off) |
Increase face ids by specified offset value. More... | |
void | decrFaceIds (const label off) |
Decrease face ids by specified offset value. More... | |
label | uniqueMeshPoints (const polyMesh &mesh, labelList &uniqueMeshPointLabels, bool parallel) const |
virtual void | writeDict (Ostream &os, const bool full=false) const |
virtual void | write (ensightGeoFile &os, const polyMesh &mesh, bool parallel) const |
Write geometry, using a mesh reference. More... | |
label | size () const |
Processor-local size of all elements. More... | |
Public Member Functions inherited from ensightPart | |
TypeNameNoDebug ("ensightPart") | |
Declare type-name, virtual type (without debug switch) More... | |
ensightPart () noexcept | |
Default construct. Index=0, identifier = -1. More... | |
ensightPart (const string &description) | |
Default construct, with description/partName. More... | |
virtual | ~ensightPart ()=default |
Destructor. More... | |
label | index () const |
The index in a list (0-based) More... | |
label & | index () |
The index in a list (0-based) More... | |
label | identifier () const |
OpenFOAM identifier (patch, zone, etc), -1 when not in use. More... | |
label & | identifier () |
OpenFOAM identifier (patch, zone, etc), -1 when not in use. More... | |
bool | empty () const |
Processor-local test for any elements. More... | |
label | size () const |
Processor-local size of all elements. More... | |
const string & | name () const |
The part name or description. More... | |
void | rename (const string &value) |
Change the part name or description. More... | |
void | rename (string &&value) |
Change the part name or description. More... | |
label | operator[] (const label i) const |
Processor-local element id from linear-list of addresses. More... | |
Static Public Member Functions | |
static const char * | key (const elemType etype) |
The ensight element name for the specified 'Face' type. More... | |
Static Public Attributes | |
static constexpr int | nTypes = 3 |
Number of 'Face' element types (3) More... | |
static const char * | elemNames [nTypes] |
The ensight 'Face' element type names. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ensightPart | |
const labelList & | addressing () const |
Element addressing. More... | |
labelList & | addressing () |
Element addressing. More... | |
void | clear () |
Clear element addressing. More... | |
void | incrAddressing (const label off) |
Increase addressing by specified offset value. More... | |
void | decrAddressing (const label off) |
Decrease addressing by specified offset value. More... | |
Sorting/classification of faces (2D) into corresponding ensight types.
Some caution may be required when handling face addressing into a boundaryField. Since the face addressing is absolute, it will be necessary to work on a copy with local ids. For example,
Definition at line 68 of file ensightFaces.H.
enum elemType |
Supported ensight 'Face' element types.
Must be zero-based since they are also for internal bookkeeping.
Enumerator | |
---|---|
TRIA3 | "tria3" |
QUAD4 | "quad4" |
NSIDED | "nsided" |
Definition at line 78 of file ensightFaces.H.
ensightFaces | ( | ) |
Default construct, with part index 0.
Definition at line 98 of file ensightFaces.C.
|
explicit |
Default construct, with description/partName.
Definition at line 107 of file ensightFaces.C.
References ensightPart::rename().
|
virtualdefault |
Destructor.
|
inlinestatic |
The ensight element name for the specified 'Face' type.
Definition at line 46 of file ensightFacesI.H.
Referenced by ensightFaces::writeDict().
TypeName | ( | "ensightFaces" | ) |
Declare type-name, virtual type (with debug switch)
|
inline |
Processor-local size of the specified element type.
Definition at line 64 of file ensightFacesI.H.
Referenced by Foam::ensightOutput::Detail::writeFaceSubField(), Foam::ensightOutput::writeField(), and Foam::ensightOutput::writeVolField().
|
inline |
Processor-local offset/size of element type.
Definition at line 70 of file ensightFacesI.H.
Referenced by Foam::ensightOutput::writeFaceConnectivityPresorted(), and Foam::ensightOutput::Detail::writeFaceSubField().
Foam::label total | ( | ) | const |
The global size of all element types.
This value is only meaningful after a reduce operation.
Definition at line 130 of file ensightFaces.C.
Referenced by ensightMesh::correct(), ensightOutputSurface::write(), Foam::ensightOutput::writeFaceConnectivity(), Foam::ensightOutput::writeFaceConnectivityPresorted(), Foam::ensightOutput::Detail::writeFaceSubField(), and Foam::ensightOutput::writeField().
|
inline |
The global size of the specified element type.
This value is only meaningful after a reduce operation.
Definition at line 58 of file ensightFacesI.H.
|
inline |
The global sizes for each element type.
This value is only meaningful after a reduce operation.
Definition at line 52 of file ensightFacesI.H.
Foam::FixedList< Foam::label, 3 > sizes | ( | ) | const |
Processor-local sizes per element type.
Definition at line 117 of file ensightFaces.C.
References Foam::BitOps::count(), and forAll.
|
inline |
Processor-local face ids of all elements.
Definition at line 76 of file ensightFacesI.H.
Referenced by ensightFaces::uniqueMeshPoints(), ensightFaces::write(), Foam::ensightOutput::writeFaceConnectivity(), Foam::ensightOutput::writeField(), and Foam::ensightOutput::writeVolField().
|
inline |
Processor-local face ids of the specified element type.
Definition at line 83 of file ensightFacesI.H.
References range.
|
inline |
Processor-local flip-map of all elements.
Definition at line 89 of file ensightFacesI.H.
Referenced by ensightFaces::write().
|
inline |
True for non-zero flip-map that spans the addresses.
Definition at line 95 of file ensightFacesI.H.
Referenced by ensightFaces::write().
Classify the face types and set the element lists.
Definition at line 212 of file ensightFaces.C.
References Foam::add(), UList< T >::size(), and Foam::Zero.
Referenced by ensightMesh::correct().
void classify | ( | const UList< face > & | faces, |
const labelRange & | range | ||
) |
Classify face types (for a sublist) and set element lists.
Definition at line 242 of file ensightFaces.C.
References range, UList< T >::size(), and IntRange< IntType >::start().
void classify | ( | const UList< face > & | faces, |
const labelUList & | addr, | ||
const boolList & | flipMap = boolList() , |
||
const bitSet & | exclude = bitSet() |
||
) |
Classify the face types and set the element lists.
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 258 of file ensightFaces.C.
References Foam::add(), faceId(), UList< T >::size(), bitSet::test(), and Foam::Zero.
void clearOut | ( | ) |
Clear any demand-driven data.
Definition at line 153 of file ensightFaces.C.
void clear | ( | ) |
Set addressable sizes to zero, free up addressing memory.
Definition at line 141 of file ensightFaces.C.
References ensightPart::clear(), and Foam::Zero.
Referenced by ensightMesh::correct().
void reduce | ( | ) |
Sum element counts across all processes.
Definition at line 157 of file ensightFaces.C.
References forAll, and Foam::reduce().
Referenced by ensightMesh::correct().
void sort | ( | ) |
Sort element lists numerically.
Definition at line 168 of file ensightFaces.C.
References IntRange< IntType >::empty(), range, Foam::sort(), and Foam::sortedOrder().
|
inline |
Increase face ids by specified offset value.
Eg, to change patch local Ids to global Ids
Definition at line 101 of file ensightFacesI.H.
|
inline |
Decrease face ids by specified offset value.
Eg, to change global Ids to patch local Ids
Definition at line 107 of file ensightFacesI.H.
Referenced by Foam::ensightOutput::writeVolField().
Foam::label uniqueMeshPoints | ( | const polyMesh & | mesh, |
labelList & | uniqueMeshPointLabels, | ||
bool | parallel | ||
) | const |
Globally unique mesh points. Required when writing point fields.
Definition at line 39 of file ensightFacesAddr.C.
References ensightFaces::faceIds(), mesh, PrimitivePatch< FaceList, PointField >::meshPointMap(), PrimitivePatch< FaceList, PointField >::meshPoints(), nPoints, and points.
Referenced by Foam::ensightOutput::writePointField().
Write information about the object as a dictionary, optionally write all element addresses
Reimplemented from ensightPart.
Definition at line 313 of file ensightFaces.C.
References Ostream::beginBlock(), Ostream::endBlock(), Foam::endEntry(), ensightFaces::key(), Foam::name(), ensightFaces::nTypes, Foam::type(), Ostream::writeEntry(), and Ostream::writeKeyword().
|
virtual |
Write geometry, using a mesh reference.
< Collective write?
< Collective write?
Reimplemented in ensightOutputSurface.
Definition at line 39 of file ensightFacesIO.C.
References f(), ensightFaces::faceIds(), ensightFaces::flipMap(), forAll, Foam::identity(), ensightPart::index(), Foam::ListListOps::inplaceRenumber(), PrimitivePatch< FaceList, PointField >::localFaces(), mesh, PrimitivePatch< FaceList, PointField >::meshPointMap(), PrimitivePatch< FaceList, PointField >::meshPoints(), ensightPart::name(), nPoints, points, List< T >::resize(), ensightFaces::usesFlipMap(), Foam::ensightOutput::Detail::writeCoordinates(), and Foam::ensightOutput::writeFaceConnectivityPresorted().
|
inline |
Processor-local size of all elements.
Definition at line 154 of file ensightPart.H.
|
staticconstexpr |
Number of 'Face' element types (3)
Definition at line 86 of file ensightFaces.H.
Referenced by ensightFaces::writeDict().
|
static |
The ensight 'Face' element type names.
Definition at line 89 of file ensightFaces.H.