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 | totalSize () const noexcept |
The global size of all element types. More... | |
label | total () const noexcept |
Same as totalSize. 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 noexcept |
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... | |
const labelList & | faceOrder () const noexcept |
Processor-local face order (where applicable) More... | |
const labelUList | faceOrder (const elemType etype) const |
Processor-local face order of specified element type (where applicable) 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 () |
Inplace 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... | |
InfoProxy< ensightFaces > | info () const noexcept |
Return info proxy, used to print information to a stream. More... | |
label | uniqueMeshPoints (const polyMesh &mesh, labelList &uniqueMeshPointLabels, bool parallel) const |
Globally unique mesh points. Required when writing point fields. More... | |
virtual void | writeDict (Ostream &os, const bool full=false) const |
Write information about the object as a dictionary, optionally write all element addresses. More... | |
virtual void | write (ensightGeoFile &os, const polyMesh &mesh, bool parallel) const |
Write geometry, using a mesh reference. More... | |
label | size () const noexcept |
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 () | |
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 noexcept |
The index in a list (0-based) More... | |
label & | index () noexcept |
The index in a list (0-based) More... | |
label | identifier () const noexcept |
OpenFOAM identifier (patch, zone, etc), -1 when not in use. More... | |
label & | identifier () noexcept |
OpenFOAM identifier (patch, zone, etc), -1 when not in use. More... | |
bool | empty () const noexcept |
Processor-local test for any elements. More... | |
label | size () const noexcept |
Processor-local size of all elements. More... | |
const string & | name () const noexcept |
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) noexcept |
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 noexcept |
Element addressing. More... | |
labelList & | addressing () noexcept |
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,
Additionally, for some uses (eg, finiteArea), the ordered list of faces can be used for a direct local lookup into the field instead of via the overall mesh face addressing.
Definition at line 66 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 79 of file ensightFaces.H.
ensightFaces | ( | ) |
Default construct, with part index 0.
Definition at line 96 of file ensightFaces.C.
|
explicit |
Default construct, with description/partName.
Definition at line 106 of file ensightFaces.C.
References ensightPart::rename().
|
virtualdefault |
Destructor.
|
inlinestaticnoexcept |
The ensight element name for the specified 'Face' type.
Definition at line 42 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 60 of file ensightFacesI.H.
Referenced by Foam::ensightOutput::Detail::writeFaceLocalField(), Foam::ensightOutput::Detail::writeFaceSubField(), Foam::ensightOutput::writeField(), and Foam::ensightOutput::writeVolField().
|
inline |
Processor-local offset/size of element type.
Definition at line 66 of file ensightFacesI.H.
Referenced by Foam::ensightOutput::writeFaceConnectivityPresorted(), and Foam::ensightOutput::Detail::writeFaceSubField().
|
noexcept |
The global size of all element types.
This value is only meaningful after a reduce operation.
Definition at line 129 of file ensightFaces.C.
References Foam::BitOps::count(), and n.
Referenced by ensightFaces::total().
|
inlinenoexcept |
Same as totalSize.
Definition at line 203 of file ensightFaces.H.
References ensightFaces::totalSize().
Referenced by ensightMesh::correct(), ensightOutputSurface::write(), Foam::ensightOutput::writeFaceConnectivity(), Foam::ensightOutput::writeFaceConnectivityPresorted(), Foam::ensightOutput::Detail::writeFaceLocalField(), 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 54 of file ensightFacesI.H.
|
inline |
The global sizes for each element type.
This value is only meaningful after a reduce operation.
Definition at line 48 of file ensightFacesI.H.
Foam::FixedList< Foam::label, 3 > sizes | ( | ) | const |
Processor-local sizes per element type.
Definition at line 116 of file ensightFaces.C.
References Foam::BitOps::count().
|
inlinenoexcept |
Processor-local face ids of all elements.
Definition at line 72 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 79 of file ensightFacesI.H.
References range, and UList< T >::slice().
|
inline |
Processor-local flip-map of all elements.
Definition at line 85 of file ensightFacesI.H.
Referenced by ensightFaces::write().
|
inline |
True for non-zero flip-map that spans the addresses.
Definition at line 91 of file ensightFacesI.H.
Referenced by ensightFaces::write().
|
inlinenoexcept |
Processor-local face order (where applicable)
Definition at line 98 of file ensightFacesI.H.
Referenced by Foam::ensightOutput::Detail::writeFaceLocalField().
|
inline |
Processor-local face order of specified element type (where applicable)
Definition at line 105 of file ensightFacesI.H.
References range, and UList< T >::slice().
Classify the face types and set the element lists.
Definition at line 211 of file ensightFaces.C.
References Foam::add(), UList< T >::size(), and Foam::Zero.
Referenced by ensightFaMesh::correct(), and ensightMesh::correct().
void classify | ( | const UList< face > & | faces, |
const labelRange & | range | ||
) |
Classify face types (for a sublist) and set element lists.
Definition at line 240 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 256 of file ensightFaces.C.
References Foam::add(), faceId(), UList< T >::size(), bitSet::test(), UList< T >::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 140 of file ensightFaces.C.
References ensightPart::clear(), and Foam::Zero.
Referenced by ensightFaMesh::correct(), and ensightMesh::correct().
void reduce | ( | ) |
Sum element counts across all processes.
Definition at line 157 of file ensightFaces.C.
References Foam::reduce().
Referenced by ensightFaMesh::correct(), and ensightMesh::correct().
void sort | ( | ) |
Inplace sort element lists numerically.
Definition at line 167 of file ensightFaces.C.
References IntRange< IntType >::empty(), range, and Foam::sortedOrder().
|
inline |
Increase face ids by specified offset value.
Eg, to change patch local Ids to global Ids
Definition at line 111 of file ensightFacesI.H.
|
inline |
Decrease face ids by specified offset value.
Eg, to change global Ids to patch local Ids
Definition at line 117 of file ensightFacesI.H.
Referenced by Foam::ensightOutput::writeVolField().
|
inlinenoexcept |
Return info proxy, used to print information to a stream.
Definition at line 330 of file ensightFaces.H.
Referenced by ensightFaMesh::correct(), and 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 32 of file ensightFacesAddr.C.
References ensightFaces::faceIds(), mesh, nPoints, points, and pp().
Referenced by Foam::ensightOutput::writePointField().
|
virtual |
Write information about the object as a dictionary, optionally write all element addresses.
Reimplemented from ensightPart.
Definition at line 317 of file ensightFaces.C.
References Ostream::beginBlock(), Ostream::endBlock(), Foam::endEntry(), ensightFaces::key(), Foam::name(), ensightFaces::nTypes, os(), Foam::type(), Ostream::writeEntry(), and Ostream::writeKeyword().
|
virtual |
Write geometry, using a mesh reference.
< Collective write?
< Collective write?
Reimplemented in ensightOutputSurface.
Definition at line 32 of file ensightFacesIO.C.
References f(), ensightFaces::faceIds(), ensightFaces::flipMap(), forAll, Foam::identity(), ensightPart::index(), Foam::ListListOps::inplaceRenumber(), mesh, ensightPart::name(), nPoints, os(), points, pp(), List< T >::resize(), ensightFaces::usesFlipMap(), Foam::ensightOutput::Detail::writeCoordinates(), and Foam::ensightOutput::writeFaceConnectivityPresorted().
|
inlinenoexcept |
Processor-local size of all elements.
Definition at line 193 of file ensightPart.H.
|
static |
Number of 'Face' element types (3)
Definition at line 89 of file ensightFaces.H.
Referenced by ensightFaces::writeDict().
|
static |
The ensight 'Face' element type names.
Definition at line 94 of file ensightFaces.H.
Referenced by ensightSurfaceReader::readGeometry().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.