Public Member Functions | Private Member Functions | Private Attributes | Friends
ZoneMesh Class Reference

A list of mesh zones. More...

Inheritance diagram for ZoneMesh:
Inheritance graph
[legend]
Collaboration diagram for ZoneMesh:
Collaboration graph
[legend]

Public Member Functions

 ZoneMesh (const IOobject &, const MeshType &)
 Read constructor given IOobject and a MeshType reference. More...
 
 ZoneMesh (const IOobject &, const MeshType &, const label size)
 Construct given size. More...
 
 ZoneMesh (const IOobject &, const MeshType &, const PtrList< ZoneType > &)
 Construct given a PtrList. More...
 
 ~ZoneMesh ()
 Destructor. More...
 
const MeshType & mesh () const
 Return the mesh reference. More...
 
const Map< label > & zoneMap () const
 Map of zones containing zone index for all zoned elements. More...
 
label whichZone (const label objectIndex) const
 Given a global object index, return the zone it is in. More...
 
wordList types () const
 Return a list of zone types. More...
 
wordList names () const
 Return a list of zone names. More...
 
labelList findIndices (const keyType &) const
 Return zone indices for all matches. More...
 
label findIndex (const keyType &) const
 Return zone index for the first match, return -1 if not found. More...
 
label findZoneID (const word &zoneName) const
 Find zone index given a name. More...
 
PackedBoolList findMatching (const keyType &) const
 Mark cells that match the zone specification. More...
 
void clearAddressing ()
 Clear addressing. More...
 
void clear ()
 Clear the zones. More...
 
bool checkDefinition (const bool report=false) const
 Check zone definition. Return true if in error. More...
 
bool checkParallelSync (const bool report=false) const
 Check whether all procs have all zones and in same order. Return. More...
 
void movePoints (const pointField &)
 Correct zone mesh after moving points. More...
 
bool writeData (Ostream &) const
 writeData member function required by regIOobject More...
 
const ZoneType & operator[] (const word &) const
 Return const reference to ZoneType by name. More...
 
ZoneType & operator[] (const word &)
 Return reference to ZoneType by name. More...
 

Private Member Functions

bool read ()
 Read if IOobject flags set. Return true if read. More...
 
 ZoneMesh (const ZoneMesh &)
 Disallow construct as copy. More...
 
void operator= (const ZoneMesh< ZoneType, MeshType > &)
 Disallow assignment. More...
 
void calcZoneMap () const
 Create zone map. More...
 

Private Attributes

const MeshType & mesh_
 Reference to mesh. More...
 
Map< label > * zoneMapPtr_
 Map of zone labels for given element. More...
 

Friends

Ostreamoperator (Ostream &, const ZoneMesh< ZoneType, MeshType > &)
 

Detailed Description

A list of mesh zones.

Source files

Definition at line 39 of file cellZoneMeshFwd.H.

Constructor & Destructor Documentation

◆ ZoneMesh() [1/4]

ZoneMesh ( const ZoneMesh )
private

Disallow construct as copy.

◆ ZoneMesh() [2/4]

ZoneMesh ( const IOobject ,
const MeshType &   
)

Read constructor given IOobject and a MeshType reference.

◆ ZoneMesh() [3/4]

ZoneMesh ( const IOobject ,
const MeshType &  ,
const label  size 
)

Construct given size.

◆ ZoneMesh() [4/4]

ZoneMesh ( const IOobject ,
const MeshType &  ,
const PtrList< ZoneType > &   
)

Construct given a PtrList.

◆ ~ZoneMesh()

~ZoneMesh ( )

Destructor.

Definition at line 200 of file ZoneMesh.C.

Member Function Documentation

◆ read()

bool read ( )
private

Read if IOobject flags set. Return true if read.

Definition at line 74 of file ZoneMesh.C.

◆ operator=()

void operator= ( const ZoneMesh< ZoneType, MeshType > &  )
private

Disallow assignment.

◆ calcZoneMap()

void calcZoneMap ( ) const
private

Create zone map.

Definition at line 35 of file ZoneMesh.C.

◆ mesh()

const MeshType& mesh ( ) const
inline

Return the mesh reference.

Definition at line 127 of file ZoneMesh.H.

Referenced by faceZone::calcFaceZonePatch().

Here is the caller graph for this function:

◆ zoneMap()

const Foam::Map< Foam::label > & zoneMap ( ) const

Map of zones containing zone index for all zoned elements.

Return -1 if the object is not in the zone

Definition at line 211 of file ZoneMesh.C.

◆ whichZone()

Foam::label whichZone ( const label  objectIndex) const

◆ types()

Foam::wordList types ( ) const

Return a list of zone types.

Definition at line 246 of file ZoneMesh.C.

◆ names()

Foam::wordList names ( ) const

◆ findIndices()

Foam::labelList findIndices ( const keyType key) const

Return zone indices for all matches.

Definition at line 280 of file ZoneMesh.C.

◆ findIndex()

Foam::label findIndex ( const keyType key) const

Return zone index for the first match, return -1 if not found.

Definition at line 313 of file ZoneMesh.C.

◆ findZoneID()

Foam::label findZoneID ( const word zoneName) const

◆ findMatching()

Foam::PackedBoolList findMatching ( const keyType key) const

Mark cells that match the zone specification.

Definition at line 377 of file ZoneMesh.C.

Referenced by sampledPlane::update().

Here is the caller graph for this function:

◆ clearAddressing()

void clearAddressing ( )

◆ clear()

void clear ( )

Clear the zones.

Definition at line 408 of file ZoneMesh.C.

Referenced by polyMeshAdder::add(), cellTable::addCellZones(), Foam::loadOrCreateMesh(), and fvMeshTools::newMesh().

Here is the caller graph for this function:

◆ checkDefinition()

bool checkDefinition ( const bool  report = false) const

Check zone definition. Return true if in error.

Definition at line 418 of file ZoneMesh.C.

◆ checkParallelSync()

bool checkParallelSync ( const bool  report = false) const

Check whether all procs have all zones and in same order. Return.

true if in error.

Definition at line 436 of file ZoneMesh.C.

◆ movePoints()

void movePoints ( const pointField p)

Correct zone mesh after moving points.

Definition at line 514 of file ZoneMesh.C.

◆ writeData()

bool writeData ( Ostream os) const

writeData member function required by regIOobject

Definition at line 527 of file ZoneMesh.C.

◆ operator[]() [1/2]

const ZoneType& operator[] ( const word ) const

Return const reference to ZoneType by name.

◆ operator[]() [2/2]

ZoneType& operator[] ( const word )

Return reference to ZoneType by name.

Friends And Related Function Documentation

◆ operator

Ostream& operator ( Ostream ,
const ZoneMesh< ZoneType, MeshType > &   
)
friend

Field Documentation

◆ mesh_

const MeshType& mesh_
private

Reference to mesh.

Definition at line 70 of file ZoneMesh.H.

Referenced by ZoneMesh< cellZone, polyMesh >::mesh().

◆ zoneMapPtr_

Map<label>* zoneMapPtr_
mutableprivate

Map of zone labels for given element.

Definition at line 73 of file ZoneMesh.H.


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