Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Private Attributes | Friends
faceZone Class Reference

A subset of mesh faces organised as a primitive patch. More...

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

Public Member Functions

 TypeName ("faceZone")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, faceZone, dictionary,(const word &name, const dictionary &dict, const label index, const faceZoneMesh &zm),(name, dict, index, zm))
 
 faceZone (const word &name, const labelUList &addr, const boolList &fm, const label index, const faceZoneMesh &zm)
 Construct from components. More...
 
 faceZone (const word &name, const Xfer< labelList > &addr, const Xfer< boolList > &fm, const label index, const faceZoneMesh &)
 Construct from components, transferring contents. More...
 
 faceZone (const word &name, const dictionary &, const label index, const faceZoneMesh &)
 Construct from dictionary. More...
 
 faceZone (const faceZone &, const labelUList &addr, const boolList &fm, const label index, const faceZoneMesh &)
 Construct given the original zone and resetting the. More...
 
 faceZone (const faceZone &, const Xfer< labelList > &addr, const Xfer< boolList > &fm, const label index, const faceZoneMesh &)
 Construct given the original zone, resetting the. More...
 
virtual autoPtr< faceZoneclone (const faceZoneMesh &zm) const
 Construct and return a clone, resetting the zone mesh. More...
 
virtual autoPtr< faceZoneclone (const labelUList &addr, const boolList &fm, const label index, const faceZoneMesh &zm) const
 Construct and return a clone, resetting the face list. More...
 
virtual ~faceZone ()
 Destructor. More...
 
const boolListflipMap () const
 Return face flip map. More...
 
label whichFace (const label globalCellID) const
 Helper function to re-direct to zone::localID(...) More...
 
const primitiveFacePatchoperator() () const
 Return reference to primitive patch. More...
 
const faceZoneMeshzoneMesh () const
 Return zoneMesh reference. More...
 
const labelListmasterCells () const
 Return labels of master cells (cells next to the master face. More...
 
const labelListslaveCells () const
 Return labels of slave cells. More...
 
const labelListmeshEdges () const
 Return global edge index for local edges. More...
 
virtual void clearAddressing ()
 Clear addressing. More...
 
virtual void resetAddressing (const labelUList &, const boolList &)
 Reset addressing and flip map (clearing demand-driven data) More...
 
virtual bool checkDefinition (const bool report=false) const
 Check zone definition. Return true if in error. More...
 
virtual bool checkParallelSync (const bool report=false) const
 Check whether all procs have faces synchronised. Return. More...
 
virtual void movePoints (const pointField &)
 Correct patch after moving points. More...
 
virtual void updateMesh (const mapPolyMesh &)
 Update for changes in topology. More...
 
virtual void write (Ostream &) const
 Write. More...
 
virtual void writeDict (Ostream &) const
 Write dictionary. More...
 
- Public Member Functions inherited from zone
 TypeName ("zone")
 Runtime type information. More...
 
 zone (const word &name, const labelUList &addr, const label index)
 Construct from components. More...
 
 zone (const word &name, const Xfer< labelList > &addr, const label index)
 Construct from components, transferring contents. More...
 
 zone (const word &name, const dictionary &, const word &labelsName, const label index)
 Construct from dictionary. More...
 
 zone (const zone &, const labelUList &addr, const label index)
 Construct given the original zone and resetting the. More...
 
 zone (const zone &, const Xfer< labelList > &addr, const label index)
 Construct given the original zone, resetting the. More...
 
virtual ~zone ()
 Destructor. More...
 
const wordname () const
 Return name. More...
 
label localID (const label globalID) const
 Map storing the local index for every global index. Used to find. More...
 
label index () const
 Return the index of this zone in zone list. More...
 
virtual bool checkDefinition (const label maxSize, const bool report=false) const
 Check zone definition with max size given. Return true if in error. More...
 
- Public Member Functions inherited from List
 List ()
 Null constructor. More...
 
 List (const label)
 Construct with given size. More...
 
 List (const label, const T &)
 Construct with given size and value for all elements. More...
 
 List (const List< T > &)
 Copy constructor. More...
 
 List (const Xfer< List< T > > &)
 Construct by transferring the parameter contents. More...
 
 List (List< T > &, bool reUse)
 Construct as copy or re-use as specified. More...
 
 List (const UList< T > &, const labelUList &mapAddressing)
 Construct as subset. More...
 
template<class InputIterator >
 List (InputIterator first, InputIterator last)
 Construct given start and end iterators. More...
 
template<unsigned Size>
 List (const FixedList< T, Size > &)
 Construct as copy of FixedList<T, Size> More...
 
 List (const PtrList< T > &)
 Construct as copy of PtrList<T> More...
 
 List (const SLList< T > &)
 Construct as copy of SLList<T> More...
 
 List (const UIndirectList< T > &)
 Construct as copy of UIndirectList<T> More...
 
 List (const BiIndirectList< T > &)
 Construct as copy of BiIndirectList<T> More...
 
 List (Istream &)
 Construct from Istream. More...
 
autoPtr< List< T > > clone () const
 Clone. More...
 
 ~List ()
 Destructor. More...
 
label size () const
 Return the number of elements in the UList. More...
 
void resize (const label)
 Alias for setSize(const label) More...
 
void resize (const label, const T &)
 Alias for setSize(const label, const T&) More...
 
void setSize (const label)
 Reset size of List. More...
 
void setSize (const label, const T &)
 Reset size of List and value for new elements. More...
 
void clear ()
 Clear the list, i.e. set size to zero. More...
 
void append (const T &)
 Append an element at the end of the list. More...
 
void append (const UList< T > &)
 Append a List at the end of this list. More...
 
void append (const UIndirectList< T > &)
 Append a UIndirectList at the end of this list. More...
 
void transfer (List< T > &)
 Transfer the contents of the argument List into this list. More...
 
template<unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
void transfer (DynamicList< T, SizeInc, SizeMult, SizeDiv > &)
 Transfer the contents of the argument List into this list. More...
 
void transfer (SortableList< T > &)
 Transfer the contents of the argument List into this list. More...
 
Xfer< List< T > > xfer ()
 Transfer contents to the Xfer container. More...
 
TnewElmt (const label)
 Return subscript-checked element of UList. More...
 
void operator= (const UList< T > &)
 Assignment from UList operator. Takes linear time. More...
 
void operator= (const List< T > &)
 Assignment operator. Takes linear time. More...
 
void operator= (const SLList< T > &)
 Assignment from SLList operator. Takes linear time. More...
 
void operator= (const UIndirectList< T > &)
 Assignment from UIndirectList operator. Takes linear time. More...
 
void operator= (const BiIndirectList< T > &)
 Assignment from BiIndirectList operator. Takes linear time. More...
 
void operator= (const T &)
 Assignment of all entries to the given value. More...
 
template<class T >
 List (const label s)
 
template<class T >
 List (const label s, const T &a)
 
template<class T >
 List (const List< T > &a)
 
template<class T >
 List (const Xfer< List< T > > &lst)
 
template<class T >
 List (List< T > &a, bool reUse)
 
template<class T >
 List (const UList< T > &a, const labelUList &map)
 
template<class T >
 List (const PtrList< T > &lst)
 
template<class T >
 List (const SLList< T > &lst)
 
template<class T >
 List (const UIndirectList< T > &lst)
 
template<class T >
 List (const BiIndirectList< T > &lst)
 
template<class T >
void transfer (List< T > &a)
 
template<class T >
void transfer (SortableList< T > &a)
 
template<class T >
 List ()
 
template<class T >
 List (Istream &is)
 

Static Public Member Functions

static autoPtr< faceZoneNew (const word &name, const dictionary &, const label index, const faceZoneMesh &)
 Return a pointer to a new face zone. More...
 
- Static Public Member Functions inherited from List
static const List< T > & null ()
 Return a null List. More...
 

Static Public Attributes

static const char *const labelsName = "faceLabels"
 The name associated with the zone-labels dictionary entry. More...
 

Protected Member Functions

 faceZone (const faceZone &)
 Disallow default bitwise copy construct. More...
 
void operator= (const faceZone &)
 Disallow default bitwise assignment. More...
 
void calcFaceZonePatch () const
 Build primitive patch. More...
 
const Map< label > & faceLookupMap () const
 Return map of local face indices. More...
 
void calcCellLayers () const
 Calculate master and slave face layer. More...
 
void checkAddressing () const
 Check addressing. More...
 
- Protected Member Functions inherited from zone
const Map< label > & lookupMap () const
 Return a reference to the look-up map. More...
 
void calcLookupMap () const
 Construct the look-up map. More...
 
 zone (const zone &)
 Disallow default bitwise copy construct. More...
 
- Protected Member Functions inherited from List
void size (const label)
 Override size to be inconsistent with allocated storage. More...
 

Protected Attributes

boolList flipMap_
 Flip map for all faces in the zone. Set to true if the. More...
 
const faceZoneMeshzoneMesh_
 Reference to zone list. More...
 
primitiveFacePatchpatchPtr_
 Primitive patch made out of correctly flipped faces. More...
 
labelListmasterCellsPtr_
 Master cell layer. More...
 
labelListslaveCellsPtr_
 Slave cell layer. More...
 
labelListmePtr_
 Global edge addressing. More...
 
- Protected Attributes inherited from zone
word name_
 Name of zone. More...
 
label index_
 Index of zone. More...
 
Map< label > * lookupMapPtr_
 Map of labels in zone for fast location lookup. More...
 

Static Private Attributes

static const word labelsName_
 The name associated with the zone-labels dictionary entry. More...
 

Friends

Ostreamoperator<< (Ostream &, const faceZone &)
 Ostream Operator. More...
 

Additional Inherited Members

- Public Types inherited from List
typedef SubList< TsubList
 Declare type of subList. More...
 

Detailed Description

A subset of mesh faces organised as a primitive patch.

For quick check whether a face belongs to the zone use the lookup mechanism in faceZoneMesh, where all the zoned faces are registered with their zone number.

Source files

Definition at line 64 of file faceZone.H.

Constructor & Destructor Documentation

◆ faceZone() [1/6]

faceZone ( const faceZone )
protected

Disallow default bitwise copy construct.

Referenced by faceZone::clone().

Here is the caller graph for this function:

◆ faceZone() [2/6]

faceZone ( const word name,
const labelUList addr,
const boolList fm,
const label  index,
const faceZoneMesh zm 
)

Construct from components.

Definition at line 195 of file faceZone.C.

◆ faceZone() [3/6]

faceZone ( const word name,
const Xfer< labelList > &  addr,
const Xfer< boolList > &  fm,
const label  index,
const faceZoneMesh zm 
)

Construct from components, transferring contents.

Definition at line 216 of file faceZone.C.

◆ faceZone() [4/6]

faceZone ( const word name,
const dictionary dict,
const label  index,
const faceZoneMesh zm 
)

Construct from dictionary.

Definition at line 237 of file faceZone.C.

◆ faceZone() [5/6]

faceZone ( const faceZone fz,
const labelUList addr,
const boolList fm,
const label  index,
const faceZoneMesh zm 
)

Construct given the original zone and resetting the.

face list and zone mesh information

Definition at line 257 of file faceZone.C.

◆ faceZone() [6/6]

faceZone ( const faceZone fz,
const Xfer< labelList > &  addr,
const Xfer< boolList > &  fm,
const label  index,
const faceZoneMesh zm 
)

Construct given the original zone, resetting the.

face list and zone mesh information

Definition at line 278 of file faceZone.C.

◆ ~faceZone()

~faceZone ( )
virtual

Destructor.

Definition at line 300 of file faceZone.C.

Member Function Documentation

◆ operator=()

void operator= ( const faceZone )
protected

Disallow default bitwise assignment.

◆ calcFaceZonePatch()

void calcFaceZonePatch ( ) const
protected

Build primitive patch.

Definition at line 48 of file faceZone.C.

References Foam::abort(), Foam::endl(), f(), Foam::FatalError, FatalErrorInFunction, faceZone::flipMap(), forAll, Foam::Info, mesh, ZoneMesh::mesh(), faceZone::patchPtr_, points, List::size(), and faceZone::zoneMesh().

Here is the call graph for this function:

◆ faceLookupMap()

const Map<label>& faceLookupMap ( ) const
protected

Return map of local face indices.

◆ calcCellLayers()

void calcCellLayers ( ) const
protected

Calculate master and slave face layer.

Definition at line 99 of file faceZone.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, and List::size().

Here is the call graph for this function:

◆ checkAddressing()

void checkAddressing ( ) const
protected

Check addressing.

Definition at line 162 of file faceZone.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, List::size(), and WarningInFunction.

Here is the call graph for this function:

◆ TypeName()

TypeName ( "faceZone"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
faceZone  ,
dictionary  ,
(const word &name, const dictionary &dict, const label index, const faceZoneMesh &zm)  ,
(name, dict, index, zm)   
)

◆ clone() [1/2]

virtual autoPtr<faceZone> clone ( const faceZoneMesh zm) const
inlinevirtual

Construct and return a clone, resetting the zone mesh.

Definition at line 204 of file faceZone.H.

References faceZone::faceZone(), faceZone::flipMap(), and zone::index().

Referenced by singleCellFvMesh::agglomerateMesh().

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

◆ clone() [2/2]

virtual autoPtr<faceZone> clone ( const labelUList addr,
const boolList fm,
const label  index,
const faceZoneMesh zm 
) const
inlinevirtual

Construct and return a clone, resetting the face list.

and zone mesh

Definition at line 215 of file faceZone.H.

References faceZone::faceZone(), and zone::index().

Here is the call graph for this function:

◆ New()

Foam::autoPtr< Foam::faceZone > New ( const word name,
const dictionary dict,
const label  index,
const faceZoneMesh zm 
)
static

Return a pointer to a new face zone.

created on freestore from dictionary

Definition at line 32 of file faceZoneNew.C.

References dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::Info, Foam::name(), and Foam::nl.

Here is the call graph for this function:

◆ flipMap()

const boolList& flipMap ( ) const
inline

◆ whichFace()

Foam::label whichFace ( const label  globalCellID) const

◆ operator()()

const Foam::primitiveFacePatch & operator() ( ) const

Return reference to primitive patch.

Definition at line 320 of file faceZone.C.

◆ zoneMesh()

const Foam::faceZoneMesh & zoneMesh ( ) const

Return zoneMesh reference.

Definition at line 308 of file faceZone.C.

Referenced by faceZone::calcFaceZonePatch().

Here is the caller graph for this function:

◆ masterCells()

const Foam::labelList & masterCells ( ) const

Return labels of master cells (cells next to the master face.

zone in the prescribed direction)

Definition at line 331 of file faceZone.C.

Referenced by layerAdditionRemoval::changeTopology(), directionalPressureGradientExplicitSource::correct(), and autoLayerDriver::doLayers().

Here is the caller graph for this function:

◆ slaveCells()

const Foam::labelList & slaveCells ( ) const

Return labels of slave cells.

Definition at line 342 of file faceZone.C.

Referenced by directionalPressureGradientExplicitSource::correct(), and autoLayerDriver::doLayers().

Here is the caller graph for this function:

◆ meshEdges()

const Foam::labelList & meshEdges ( ) const

Return global edge index for local edges.

Definition at line 353 of file faceZone.C.

References mesh.

◆ clearAddressing()

void clearAddressing ( )
virtual

Clear addressing.

Reimplemented from zone.

Definition at line 394 of file faceZone.C.

References zone::clearAddressing(), and Foam::deleteDemandDrivenData().

Here is the call graph for this function:

◆ resetAddressing()

void resetAddressing ( const labelUList addr,
const boolList flipMap 
)
virtual

Reset addressing and flip map (clearing demand-driven data)

Definition at line 408 of file faceZone.C.

References List::operator=().

Referenced by reorderMesh().

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

◆ checkDefinition()

bool checkDefinition ( const bool  report = false) const
virtual

Check zone definition. Return true if in error.

Implements zone.

Definition at line 449 of file faceZone.C.

References zone::checkDefinition(), and mesh.

Here is the call graph for this function:

◆ checkParallelSync()

bool checkParallelSync ( const bool  report = false) const
virtual

Check whether all procs have faces synchronised. Return.

true if in error.

Definition at line 455 of file faceZone.C.

References polyMesh::boundaryMesh(), Foam::endl(), forAll, primitiveMesh::isInternalFace(), mesh, Foam::name(), IOobject::name(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), Foam::Pout, Foam::returnReduce(), syncTools::swapBoundaryFaceList(), and polyBoundaryMesh::whichPatch().

Here is the call graph for this function:

◆ movePoints()

void movePoints ( const pointField p)
virtual

Correct patch after moving points.

Reimplemented from zone.

Definition at line 544 of file faceZone.C.

References p.

◆ updateMesh()

void updateMesh ( const mapPolyMesh mpm)
virtual

Update for changes in topology.

Definition at line 419 of file faceZone.C.

References Foam::faceMap(), forAll, mapPolyMesh::reverseFaceMap(), and List::setSize().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Reimplemented from zone.

Definition at line 552 of file faceZone.C.

References Foam::name(), and Foam::nl.

Referenced by Foam::operator<<().

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

◆ writeDict()

void writeDict ( Ostream os) const
virtual

Write dictionary.

Implements zone.

Definition at line 560 of file faceZone.C.

References token::BEGIN_BLOCK, token::END_BLOCK, token::END_STATEMENT, Foam::endl(), Foam::name(), Foam::nl, and Foam::type().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

Ostream& operator<< ( Ostream ,
const faceZone  
)
friend

Ostream Operator.

Field Documentation

◆ labelsName_

const word labelsName_
staticprivate

The name associated with the zone-labels dictionary entry.

Definition at line 71 of file faceZone.H.

◆ flipMap_

boolList flipMap_
protected

Flip map for all faces in the zone. Set to true if the.

face needs to be flipped to achieve the correct orientation.

Definition at line 79 of file faceZone.H.

Referenced by faceZone::flipMap().

◆ zoneMesh_

const faceZoneMesh& zoneMesh_
protected

Reference to zone list.

Definition at line 82 of file faceZone.H.

◆ patchPtr_

primitiveFacePatch* patchPtr_
mutableprotected

Primitive patch made out of correctly flipped faces.

Definition at line 88 of file faceZone.H.

Referenced by faceZone::calcFaceZonePatch().

◆ masterCellsPtr_

labelList* masterCellsPtr_
mutableprotected

Master cell layer.

Definition at line 91 of file faceZone.H.

◆ slaveCellsPtr_

labelList* slaveCellsPtr_
mutableprotected

Slave cell layer.

Definition at line 94 of file faceZone.H.

◆ mePtr_

labelList* mePtr_
mutableprotected

Global edge addressing.

Definition at line 97 of file faceZone.H.

◆ labelsName

const char *const labelsName = "faceLabels"
static

The name associated with the zone-labels dictionary entry.

Definition at line 126 of file faceZone.H.


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