ensightPartCells Class Reference

An implementation of ensightPart to hold volume mesh cells. More...

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

Public Member Functions

 TypeName ("ensightCells")
 Runtime type information. More...
 
 ensightPartCells (label partIndex, const polyMesh &mesh, const string &partName="cells")
 
 ensightPartCells (label partIndex, const polyMesh &mesh, const labelUList &cellIds, const string &partName="cells")
 
 ensightPartCells (label partIndex, const polyMesh &mesh, const bitSet &selection, const string &partName="cells")
 
 ensightPartCells (label partIndex, const polyMesh &mesh, const cellZone &zn, const string &partName="")
 
virtual ~ensightPartCells ()=default
 Destructor. More...
 
virtual label index () const
 Part index (0-based) More...
 
virtual label size () const
 Number of elements in this part. More...
 
virtual void writeSummary (Ostream &os) const
 Write summary information about the object. More...
 
virtual void dumpInfo (Ostream &os) const
 Print various types of debugging information. More...
 
virtual void write (ensightGeoFile &os) const
 Write geometry. More...
 
virtual void write (ensightGeoFile &os, const pointField &points) const
 Helper: write geometry with given pointField. More...
 
- Public Member Functions inherited from ensightCells
 ensightCells ()
 Construct null, with part index 0. More...
 
 ensightCells (const label partIndex)
 Construct null, with specified part index. More...
 
 ensightCells (const ensightCells &obj)
 Copy constructor. Needed for lists etc. More...
 
 ~ensightCells ()=default
 Destructor. More...
 
label index () const
 The index in a list. More...
 
labelindex ()
 The index in a list, non-const access. More...
 
label size () const
 The processor local size of all elements. More...
 
label size (const enum elemType) const
 The processor local size of the specified element type. More...
 
label total (const enum elemType) const
 The global number of the specified element type. More...
 
label total () const
 The global number of all element types. More...
 
const FixedList< label, 5 > & totals () const
 The global numbers per element type. More...
 
FixedList< label, 5 > sizes () const
 The processor local sizes per element type. More...
 
label offset (const enum elemType what) const
 Processor local starting offset of element type. More...
 
const labelUList cellIds (const enum elemType) const
 Return the (local) cell ids of the specified element type. More...
 
const labelUListcellIds () const
 Return the cell ids of all elements. More...
 
void classify (const polyMesh &mesh)
 Classify cell types and set the element lists. More...
 
void classify (const polyMesh &mesh, const labelUList &cellIds)
 
void classify (const polyMesh &mesh, const bitSet &selection)
 
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...
 
label operator[] (const label i) const
 Return id from linear list of addressing. More...
 
- Public Member Functions inherited from ensightPart
 TypeName ("ensightPart")
 Runtime type information. More...
 
 ensightPart (const string &description)
 Construct with description. More...
 
virtual ~ensightPart ()=default
 Destructor. More...
 
const stringname () const
 Return the part name or description. More...
 
void rename (string value)
 Change the part name or description. More...
 
void FOAM_DEPRECATED_FOR (2019-12, "rename() method") name(string value)
 Deprecated(2019-12) - use rename() method. More...
 

Additional Inherited Members

- Public Types inherited from ensightCells
enum  elemType {
  TETRA4, PYRAMID5, PENTA6, HEXA8,
  NFACED
}
 Addressable ensight element types. More...
 
- Static Public Member Functions inherited from ensightCells
static const char * key (const enum elemType)
 Return the ensight element name for the specified type. More...
 
- Static Public Attributes inherited from ensightCells
static constexpr int nTypes = 5
 Number of element types (5) More...
 
static const char * elemNames [5]
 The ensight element type names. More...
 

Detailed Description

An implementation of ensightPart to hold volume mesh cells.

Source files

Definition at line 53 of file ensightPartCells.H.

Constructor & Destructor Documentation

◆ ensightPartCells() [1/4]

ensightPartCells ( label  partIndex,
const polyMesh mesh,
const string partName = "cells" 
)

Construct from entire polyMesh without zones. Part receives the specified name (default: "cells").

Definition at line 86 of file ensightPartCells.C.

References mesh.

◆ ensightPartCells() [2/4]

ensightPartCells ( label  partIndex,
const polyMesh mesh,
const labelUList cellIds,
const string partName = "cells" 
)

Construct a part from polyMesh and list of cells. Part receives the specified name (default: "cells").

Definition at line 101 of file ensightPartCells.C.

References mesh.

◆ ensightPartCells() [3/4]

ensightPartCells ( label  partIndex,
const polyMesh mesh,
const bitSet selection,
const string partName = "cells" 
)

Construct a part from polyMesh and selection of cells. Part receives the specified name (default: "cells").

Definition at line 117 of file ensightPartCells.C.

References mesh.

◆ ensightPartCells() [4/4]

ensightPartCells ( label  partIndex,
const polyMesh mesh,
const cellZone zn,
const string partName = "" 
)

Construct from polyMesh and cellZone. Part receives the name of the zone unless otherwise specified.

Definition at line 133 of file ensightPartCells.C.

◆ ~ensightPartCells()

virtual ~ensightPartCells ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeName()

TypeName ( "ensightCells"  )

Runtime type information.

◆ index()

virtual label index ( ) const
inlinevirtual

Part index (0-based)

Implements ensightPart.

Definition at line 143 of file ensightPartCells.H.

References ensightCells::index().

Here is the call graph for this function:

◆ size()

virtual label size ( ) const
inlinevirtual

Number of elements in this part.

Reimplemented from ensightPart.

Definition at line 149 of file ensightPartCells.H.

References ensightCells::size().

Here is the call graph for this function:

◆ writeSummary()

void writeSummary ( Ostream os) const
virtual

Write summary information about the object.

Implements ensightPart.

Definition at line 310 of file ensightPartCells.C.

References Ostream::beginBlock(), Ostream::endBlock(), Foam::name(), Foam::type(), and Ostream::writeEntry().

Here is the call graph for this function:

◆ dumpInfo()

void dumpInfo ( Ostream os) const
virtual

Print various types of debugging information.

Implements ensightPart.

Definition at line 322 of file ensightPartCells.C.

References Ostream::beginBlock(), Ostream::endBlock(), Foam::endEntry(), ensightCells::key(), Foam::name(), ensightCells::nTypes, Foam::type(), Ostream::writeEntry(), Ostream::writeKeyword(), and UList< T >::writeList().

Here is the call graph for this function:

◆ write() [1/2]

void write ( ensightGeoFile os) const
virtual

Write geometry.

Implements ensightPart.

Definition at line 304 of file ensightPartCells.C.

References Foam::vtk::write().

Here is the call graph for this function:

◆ write() [2/2]

void write ( ensightGeoFile os,
const pointField points 
) const
virtual

Helper: write geometry with given pointField.

Implements ensightPart.

Definition at line 262 of file ensightPartCells.C.

References ensightGeoFile::beginCoordinates(), ensightGeoFile::beginPart(), Foam::component(), forAll, ensightCells::key(), ensightPart::localPoints::list, Foam::name(), VectorSpace< Vector< scalar >, scalar, 3 >::nComponents, ensightFile::newline(), ensightPart::localPoints::nPoints, ensightCells::nTypes, points, and ensightFile::write().

Here is the call graph for this function:

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