ensightOutputSurface Class Reference

A variant of ensightFaces that holds references to contiguous points/faces with its own encapsulated write methods. The surface is assumed to have been merged prior, thus the output is serial-only. More...

Inheritance diagram for ensightOutputSurface:
[legend]
Collaboration diagram for ensightOutputSurface:
[legend]

Public Member Functions

 ensightOutputSurface (const pointField &points, const faceList &faces, const string &description="surface")
 
virtual ~ensightOutputSurface ()=default
 Destructor. More...
 
void write (ensightGeoFile &os) const
 Write processor-local geometry (serial-only) More...
 
template<class Type >
void writeData (ensightFile &os, const Field< Type > &fld, const bool isPointData=false) const
 Write a field of face or point values (serial-only) More...
 
template<class Type >
void writeFaceData (ensightFile &os, const Field< Type > &fld) const
 Write a field of face values (serial-only) More...
 
template<class Type >
void writePointData (ensightFile &os, const Field< Type > &fld) const
 Write a field of point values (serial-only) More...
 
virtual void write (ensightGeoFile &, const polyMesh &, bool) const
 Cannot write geometry with a mesh reference. More...
 
- Public Member Functions inherited from ensightFaces
 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, nTypessizes () const
 Processor-local sizes per element type. More...
 
const labelListfaceIds () 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 boolListflipMap () const
 Processor-local flip-map of all elements. More...
 
bool usesFlipMap () const
 True for non-zero flip-map that spans the addresses. More...
 
const labelListfaceOrder () const noexcept
 
const labelUList faceOrder (const elemType etype) const
 
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< ensightFacesinfo () const
 Return info proxy. 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 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 stringname () 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...
 
virtual void writeDict (Ostream &os, const bool full=false) const
 
label operator[] (const label i) const
 Processor-local element id from linear-list of addresses. More...
 

Additional Inherited Members

- Public Types inherited from ensightFaces
enum  elemType { TRIA3 = 0 , QUAD4 , NSIDED }
 Supported ensight 'Face' element types. More...
 
- Static Public Member Functions inherited from ensightFaces
static const char * key (const elemType etype)
 The ensight element name for the specified 'Face' type. More...
 
- Static Public Attributes inherited from ensightFaces
static constexpr int nTypes = 3
 Number of 'Face' element types (3) More...
 
static const char * elemNames [nTypes]
 The ensight 'Face' element type names. More...
 
- Protected Member Functions inherited from ensightPart
const labelListaddressing () const noexcept
 Element addressing. More...
 
labelListaddressing () 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...
 

Detailed Description

A variant of ensightFaces that holds references to contiguous points/faces with its own encapsulated write methods. The surface is assumed to have been merged prior, thus the output is serial-only.

Note
The primary use is for the Foam::surfaceWriters::ensightWriter but can be used independently as well.
Source files

Definition at line 58 of file ensightOutputSurface.H.

Constructor & Destructor Documentation

◆ ensightOutputSurface()

ensightOutputSurface ( const pointField points,
const faceList faces,
const string description = "surface" 
)

Construct from points and faces. Part receives the specified name (default: "surface").

Definition at line 33 of file ensightOutputSurface.C.

References ensightFaces::classify().

Here is the call graph for this function:

◆ ~ensightOutputSurface()

virtual ~ensightOutputSurface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ write() [1/2]

void write ( ensightGeoFile os) const

Write processor-local geometry (serial-only)

Definition at line 51 of file ensightOutputSurface.C.

References Foam::name(), os(), Foam::ensightOutput::Detail::writeCoordinates(), and Foam::ensightOutput::writeFaceConnectivity().

Referenced by ensightWriter::writeCollated(), and ensightWriter::writeUncollated().

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

◆ writeData()

void writeData ( ensightFile os,
const Field< Type > &  fld,
const bool  isPointData = false 
) const

Write a field of face or point values (serial-only)

Definition at line 34 of file ensightOutputSurfaceTemplates.C.

References fld(), ensightOutputSurface::writeData(), ensightOutputSurface::writeFaceData(), and ensightOutputSurface::writePointData().

Referenced by ensightWriter::writeCollated(), ensightOutputSurface::writeData(), and ensightWriter::writeUncollated().

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

◆ writeFaceData()

void writeFaceData ( ensightFile os,
const Field< Type > &  fld 
) const

Write a field of face values (serial-only)

Definition at line 53 of file ensightOutputSurfaceTemplates.C.

References fld(), os(), and Foam::ensightOutput::writeField().

Referenced by ensightOutputSurface::writeData().

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

◆ writePointData()

void writePointData ( ensightFile os,
const Field< Type > &  fld 
) const

Write a field of point values (serial-only)

Definition at line 70 of file ensightOutputSurfaceTemplates.C.

References ensightFile::coordinates, ensightPart::empty(), fld(), ensightPart::index(), os(), and Foam::ensightOutput::Detail::writeFieldComponents().

Referenced by ensightOutputSurface::writeData().

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

◆ write() [2/2]

virtual void write ( ensightGeoFile ,
const polyMesh ,
bool   
) const
inlinevirtual

Cannot write geometry with a mesh reference.

Reimplemented from ensightFaces.

Definition at line 124 of file ensightOutputSurface.H.


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