Encapsulation of volume meshes for writing in ensight format. It manages cellZones, facesZone, patches. More...
Classes | |
class | options |
Configuration options for the ensightMesh. More... | |
Public Member Functions | |
ensightMesh (const polyMesh &mesh) | |
Construct from mesh with all default options. More... | |
ensightMesh (const polyMesh &mesh, const options &opts) | |
Construct from components. More... | |
const polyMesh & | mesh () const |
Reference to the underlying polyMesh. More... | |
const ensightMesh::options & | option () const |
Reference to the writer/mesh options. More... | |
const Map< ensightCells > & | cellZoneParts () const |
Face elements per selected patch, lookup by patch index. More... | |
const Map< ensightFaces > & | faceZoneParts () const |
Face elements per faceZone, lookup by zone index. More... | |
const Map< ensightFaces > & | boundaryParts () const |
Face elements per selected patch, lookup by patch index. More... | |
bool | empty () const |
Any parts? More... | |
label | size () const |
Number of parts. More... | |
bool | needsUpdate () const |
Does the content need an update? More... | |
bool | expire () |
Mark as needing an update. More... | |
void | correct () |
Update for new mesh. More... | |
void | write (autoPtr< ensightGeoFile > &os, bool parallel=Pstream::parRun()) const |
Write geometry to file. Normally in parallel. More... | |
void | write (ensightGeoFile &os, bool parallel=Pstream::parRun()) const |
Write geometry to file. Normally in parallel. More... | |
Static Public Attributes | |
static const label | internalZone = -1 |
The zone-id for internal mesh or unzoned cells. More... | |
Encapsulation of volume meshes for writing in ensight format. It manages cellZones, facesZone, patches.
When cellZones are present (and not disabled), the cells are grouped in parts according to the zone. Any remaining unzoned cells are placed into the "internalMesh" part, which is always part 0. If cellZones are missing or disabled, all cells are placed into the "internalMesh" part.
If one or more cellZones are explicitly requested, all other cells (including any unzoned cells) are ignored.
The converted patch faces are restricted by the volume mesh coverage. Except when the entire internal mesh has been explicitly suppressed.
Since the patches are subsetted by the internal mesh coverage, they are treated as indirect patches rather than regular poly patches.
Definition at line 82 of file ensightMesh.H.
|
explicit |
Construct from mesh with all default options.
Definition at line 97 of file ensightMesh.C.
ensightMesh | ( | const polyMesh & | mesh, |
const options & | opts | ||
) |
Construct from components.
Definition at line 106 of file ensightMesh.C.
References correct().
|
inline |
Reference to the underlying polyMesh.
Definition at line 30 of file ensightMeshI.H.
Referenced by Foam::writeDimFields(), Foam::ensightOutput::writePointField(), Foam::writePointFields(), and Foam::writeVolFields().
|
inline |
Reference to the writer/mesh options.
Definition at line 36 of file ensightMeshI.H.
|
inline |
Face elements per selected patch, lookup by patch index.
Process in sorted order. May require special treatment for zone -1 (internal).
Definition at line 43 of file ensightMeshI.H.
Referenced by Foam::ensightOutput::writePointField(), and Foam::ensightOutput::writeVolField().
|
inline |
Face elements per faceZone, lookup by zone index.
Process in sorted order.
Definition at line 50 of file ensightMeshI.H.
Referenced by Foam::ensightOutput::writePointField(), and Foam::ensightOutput::writeVolField().
|
inline |
Face elements per selected patch, lookup by patch index.
Process in sorted order.
Definition at line 57 of file ensightMeshI.H.
Referenced by Foam::ensightOutput::writePointField(), and Foam::ensightOutput::writeVolField().
|
inline |
Any parts?
Definition at line 84 of file ensightMeshI.H.
|
inline |
Number of parts.
Definition at line 95 of file ensightMeshI.H.
|
inline |
Does the content need an update?
Definition at line 78 of file ensightMeshI.H.
|
inline |
Mark as needing an update.
May also free up unneeded data. Return false if already marked as expired.
Definition at line 63 of file ensightMeshI.H.
References clear().
void correct | ( | ) |
Update for new mesh.
Definition at line 124 of file ensightMesh.C.
References bitSet::any(), ensightFaces::classify(), ensightCells::classify(), clear(), ensightFaces::clear(), ensightCells::clear(), PackedList< Width >::clearStorage(), PackedList< Width >::empty(), Foam::stringListOps::findMatching(), bitSet::flip(), faceZone::flipMap(), forAll, ensightPart::identifier(), Foam::identity(), wordRes::matching(), bitSet::none(), Foam::nonProcessorPatchNames(), p, patchId(), patchIds, patchNames(), ensightFaces::reduce(), ensightCells::reduce(), ensightPart::rename(), Foam::renumber(), PackedList< Width >::resize(), Foam::returnReduce(), bitSet::set(), bitSet::test(), and ensightFaces::total().
|
inline |
Write geometry to file. Normally in parallel.
Definition at line 107 of file ensightMeshI.H.
References autoPtr< T >::ref(), and Foam::vtk::write().
void write | ( | ensightGeoFile & | os, |
bool | parallel = Pstream::parRun() |
||
) | const |
Write geometry to file. Normally in parallel.
Definition at line 391 of file ensightMesh.C.
|
static |
The zone-id for internal mesh or unzoned cells.
Definition at line 87 of file ensightMesh.H.