ensightMesh Class Reference

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...
 
int verbose () const noexcept
 Output verbosity level. More...
 
int verbose (const int level) noexcept
 Change the output verbosity level. More...
 
const polyMeshmesh () const noexcept
 Reference to the underlying polyMesh. More...
 
const ensightMesh::optionsoption () const
 Reference to the writer/mesh options. More...
 
const Map< ensightCells > & cellZoneParts () const noexcept
 Face elements per selected patch, lookup by patch index. More...
 
const Map< ensightFaces > & faceZoneParts () const noexcept
 Face elements per faceZone, lookup by zone index. More...
 
const Map< ensightFaces > & boundaryParts () const noexcept
 Face elements per selected patch, lookup by patch index. More...
 
bool empty () const noexcept
 Any parts? More...
 
label size () const noexcept
 Number of parts. More...
 
bool needsUpdate () const noexcept
 Does the content need an update? More...
 
bool expire ()
 Mark as needing an update. More...
 
void correct ()
 Update for new mesh. More...
 
void write (ensightGeoFile &os, bool parallel=Pstream::parRun()) const
 Write geometry to file. Normally in parallel. More...
 
void write (autoPtr< 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...
 

Detailed Description

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.

Note
The internal data management uses a Map for cellZones, faceZones and patches. The internalMesh is treated as cellZone with a special index.

Since the patches are subsetted by the internal mesh coverage, they are treated as indirect patches rather than regular poly patches.

Source files

Definition at line 82 of file ensightMesh.H.

Constructor & Destructor Documentation

◆ ensightMesh() [1/2]

ensightMesh ( const polyMesh mesh)
explicit

Construct from mesh with all default options.

Definition at line 96 of file ensightMesh.C.

◆ ensightMesh() [2/2]

ensightMesh ( const polyMesh mesh,
const options opts 
)

Construct from components.

Definition at line 105 of file ensightMesh.C.

References ensightMesh::correct(), and ensightMesh::option().

Here is the call graph for this function:

Member Function Documentation

◆ verbose() [1/2]

int verbose ( ) const
noexcept

Output verbosity level.

Definition at line 125 of file ensightMesh.C.

◆ verbose() [2/2]

int verbose ( const int  level)
noexcept

Change the output verbosity level.

Returns
old level

Definition at line 131 of file ensightMesh.C.

◆ mesh()

const polyMesh & mesh ( ) const
inlinenoexcept

Reference to the underlying polyMesh.

Definition at line 159 of file ensightMesh.H.

Referenced by Foam::writeDimFields(), Foam::ensightOutput::writePointField(), Foam::writePointFields(), and Foam::writeVolFields().

Here is the caller graph for this function:

◆ option()

const Foam::ensightMesh::options & option ( ) const
inline

Reference to the writer/mesh options.

Definition at line 30 of file ensightMeshI.H.

Referenced by ensightMesh::ensightMesh().

Here is the caller graph for this function:

◆ cellZoneParts()

const Map< ensightCells > & cellZoneParts ( ) const
inlinenoexcept

Face elements per selected patch, lookup by patch index.

Process in sorted order. May require special treatment for zone -1 (internal).

Definition at line 170 of file ensightMesh.H.

Referenced by Foam::ensightOutput::writePointField(), and Foam::ensightOutput::writeVolField().

Here is the caller graph for this function:

◆ faceZoneParts()

const Map< ensightFaces > & faceZoneParts ( ) const
inlinenoexcept

Face elements per faceZone, lookup by zone index.

Process in sorted order.

Definition at line 177 of file ensightMesh.H.

Referenced by Foam::ensightOutput::writePointField(), and Foam::ensightOutput::writeVolField().

Here is the caller graph for this function:

◆ boundaryParts()

const Map< ensightFaces > & boundaryParts ( ) const
inlinenoexcept

Face elements per selected patch, lookup by patch index.

Process in sorted order.

Definition at line 184 of file ensightMesh.H.

Referenced by Foam::ensightOutput::writePointField(), and Foam::ensightOutput::writeVolField().

Here is the caller graph for this function:

◆ empty()

bool empty ( ) const
inlinenoexcept

Any parts?

Definition at line 51 of file ensightMeshI.H.

◆ size()

Foam::label size ( ) const
inlinenoexcept

Number of parts.

Definition at line 62 of file ensightMeshI.H.

◆ needsUpdate()

bool needsUpdate ( ) const
inlinenoexcept

Does the content need an update?

Definition at line 202 of file ensightMesh.H.

◆ expire()

bool expire ( )
inline

Mark as needing an update.

May also free up unneeded data. Return false if already marked as expired.

Definition at line 36 of file ensightMeshI.H.

References clear().

Here is the call graph for this function:

◆ correct()

◆ write() [1/2]

void write ( ensightGeoFile os,
bool  parallel = Pstream::parRun() 
) const

Write geometry to file. Normally in parallel.

Definition at line 428 of file ensightMesh.C.

References os().

Here is the call graph for this function:

◆ write() [2/2]

void write ( autoPtr< ensightGeoFile > &  os,
bool  parallel = Pstream::parRun() 
) const
inline

Write geometry to file. Normally in parallel.

Definition at line 73 of file ensightMeshI.H.

References os(), and write().

Here is the call graph for this function:

Member Data Documentation

◆ internalZone

const Foam::label internalZone = -1
static

The zone-id for internal mesh or unzoned cells.

Definition at line 90 of file ensightMesh.H.


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