FaceCellWave< Type, TrackingData > Class Template Reference

Wave propagation of information through grid. Every iteration information goes through one layer of cells. Templated on information that is transferred. More...

Inheritance diagram for FaceCellWave< Type, TrackingData >:
Collaboration diagram for FaceCellWave< Type, TrackingData >:

Public Member Functions

 FaceCellWave (const polyMesh &, UList< Type > &allFaceInfo, UList< Type > &allCellInfo, TrackingData &td=dummyTrackData_)
 
 FaceCellWave (const polyMesh &, const labelList &initialChangedFaces, const List< Type > &changedFacesInfo, UList< Type > &allFaceInfo, UList< Type > &allCellInfo, const label maxIter, TrackingData &td=dummyTrackData_)
 Construct from mesh and list of changed faces with the Type. More...
 
UList< Type > & allFaceInfo ()
 Access allFaceInfo. More...
 
UList< Type > & allCellInfo ()
 Access allCellInfo. More...
 
const TrackingData & data () const
 Additional data to be passed into container. More...
 
const polyMeshmesh () const
 Access mesh. More...
 
label getUnsetCells () const
 Get number of unvisited cells, i.e. cells that were not (yet) More...
 
label getUnsetFaces () const
 Get number of unvisited faces. More...
 
void setFaceInfo (const labelList &changedFaces, const List< Type > &changedFacesInfo)
 Set initial changed faces. More...
 
label faceToCell ()
 Propagate from face to cell. Returns total number of cells. More...
 
label cellToFace ()
 Propagate from cell to face. Returns total number of faces. More...
 
label iterate (const label maxIter)
 Iterate until no changes or maxIter reached. Returns actual. More...
 

Static Public Member Functions

static scalar propagationTol ()
 Access to tolerance. More...
 
static void setPropagationTol (const scalar tol)
 Change tolerance. More...
 

Detailed Description

template<class Type, class TrackingData = int>
class Foam::FaceCellWave< Type, TrackingData >

Wave propagation of information through grid. Every iteration information goes through one layer of cells. Templated on information that is transferred.

Handles parallel and cyclics and non-parallel cyclics.

Note: whether to propagate depends on the return value of Type::update which returns true (i.e. propagate) if the value changes by more than a certain tolerance. This tolerance can be very strict for normal face-cell and parallel cyclics (we use a value of 0.01 just to limit propagation of small changes) but for non-parallel cyclics this tolerance can be critical and if chosen too small can lead to non-convergence.

Source files

Definition at line 74 of file FaceCellWave.H.

Constructor & Destructor Documentation

FaceCellWave ( const polyMesh mesh,
UList< Type > &  allFaceInfo,
UList< Type > &  allCellInfo,
TrackingData &  td = dummyTrackData_ 
)

Definition at line 818 of file FaceCellWave.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, and UList< T >::size().

Here is the call graph for this function:

FaceCellWave ( const polyMesh mesh,
const labelList initialChangedFaces,
const List< Type > &  changedFacesInfo,
UList< Type > &  allFaceInfo,
UList< Type > &  allCellInfo,
const label  maxIter,
TrackingData &  td = dummyTrackData_ 
)

Construct from mesh and list of changed faces with the Type.

for these faces. Iterates until nothing changes or maxIter reached. (maxIter can be 0)

Definition at line 870 of file FaceCellWave.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, and UList< T >::size().

Here is the call graph for this function:

Member Function Documentation

static scalar propagationTol ( )
inlinestatic

Access to tolerance.

Definition at line 250 of file FaceCellWave.H.

static void setPropagationTol ( const scalar  tol)
inlinestatic

Change tolerance.

Definition at line 256 of file FaceCellWave.H.

UList<Type>& allFaceInfo ( )
inline

Access allFaceInfo.

Definition at line 294 of file FaceCellWave.H.

UList<Type>& allCellInfo ( )
inline

Access allCellInfo.

Definition at line 300 of file FaceCellWave.H.

const TrackingData& data ( ) const
inline

Additional data to be passed into container.

Definition at line 306 of file FaceCellWave.H.

Referenced by structuredDecomp::decompose(), and Foam::fvc::sweep().

Here is the caller graph for this function:

const polyMesh& mesh ( ) const
inline

Access mesh.

Definition at line 312 of file FaceCellWave.H.

Foam::label getUnsetCells ( ) const

Get number of unvisited cells, i.e. cells that were not (yet)

reached from walking across mesh. This can happen from

  • not enough iterations done
  • a disconnected mesh
  • a mesh without walls in it

Definition at line 946 of file FaceCellWave.C.

Foam::label getUnsetFaces ( ) const

Get number of unvisited faces.

Definition at line 953 of file FaceCellWave.C.

void setFaceInfo ( const labelList changedFaces,
const List< Type > &  changedFacesInfo 
)

Set initial changed faces.

Definition at line 323 of file FaceCellWave.C.

References forAll.

Referenced by hexRef8::consistentSlowRefinement(), Foam::fvc::spread(), and Foam::fvc::sweep().

Here is the caller graph for this function:

Propagate from face to cell. Returns total number of cells.

(over all processors) changed.

Definition at line 962 of file FaceCellWave.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorIn, Foam::Pout, and Foam::reduce().

Here is the call graph for this function:

Propagate from cell to face. Returns total number of faces.

(over all processors) changed. (Faces on processorpatches are counted double)

Definition at line 1047 of file FaceCellWave.C.

References Foam::abort(), cells, Foam::endl(), Foam::FatalError, FatalErrorIn, forAll, Foam::Pout, and Foam::reduce().

Here is the call graph for this function:

Foam::label iterate ( const label  maxIter)

Iterate until no changes or maxIter reached. Returns actual.

number of iterations.

Definition at line 1129 of file FaceCellWave.C.

References Foam::endl(), Foam::Info, and Foam::nl.

Referenced by hexRef8::consistentSlowRefinement(), Foam::fvc::spread(), and Foam::fvc::sweep().

Here is the call graph for this function:

Here is the caller graph for this function:


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