Public Member Functions | Static Public Member Functions | List of all members
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 >:
Inheritance graph
[legend]
Collaboration diagram for FaceCellWave< Type, TrackingData >:
Collaboration graph
[legend]

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 810 of file FaceCellWave.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, 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 858 of file FaceCellWave.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, 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.

Referenced by combine< Type, TrackingData >::operator()().

Here is the caller graph for this function:

static void setPropagationTol ( const scalar  tol)
inlinestatic

Change tolerance.

Definition at line 256 of file FaceCellWave.H.

References FaceCellWave< Type, TrackingData >::allCellInfo(), and FaceCellWave< Type, TrackingData >::allFaceInfo().

Here is the call graph for this function:

UList<Type>& allFaceInfo ( )
inline

Access allFaceInfo.

Definition at line 294 of file FaceCellWave.H.

Referenced by FaceCellWave< Type, TrackingData >::setPropagationTol().

Here is the caller graph for this function:

UList<Type>& allCellInfo ( )
inline

Access allCellInfo.

Definition at line 300 of file FaceCellWave.H.

Referenced by FaceCellWave< Type, TrackingData >::setPropagationTol().

Here is the caller graph for this function:

const TrackingData& data ( ) const
inline

Additional data to be passed into container.

Definition at line 306 of file FaceCellWave.H.

Referenced by MeshWave< Type, TrackingData >::data(), structuredDecomp::decompose(), combine< Type, TrackingData >::operator()(), and Foam::fvc::sweep().

Here is the caller graph for this function:

const polyMesh& mesh ( ) const
inline
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 925 of file FaceCellWave.C.

Referenced by MeshWave< Type, TrackingData >::data(), and FaceCellWave< Type, TrackingData >::mesh().

Here is the caller graph for this function:

Foam::label getUnsetFaces ( ) const

Get number of unvisited faces.

Definition at line 932 of file FaceCellWave.C.

Referenced by MeshWave< Type, TrackingData >::getUnsetFaces(), and FaceCellWave< Type, TrackingData >::mesh().

Here is the caller graph for this function:

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

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

(over all processors) changed.

Definition at line 941 of file FaceCellWave.C.

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

Referenced by FaceCellWave< Type, TrackingData >::mesh().

Here is the call graph for this function:

Here is the caller 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 1026 of file FaceCellWave.C.

References Foam::abort(), cells, Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, UPstream::parRun(), Foam::Pout, and Foam::reduce().

Referenced by FaceCellWave< Type, TrackingData >::mesh().

Here is the call graph for this function:

Here is the caller 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 1108 of file FaceCellWave.C.

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

Referenced by hexRef8::consistentSlowRefinement(), MeshWave< Type, TrackingData >::data(), FaceCellWave< Type, TrackingData >::mesh(), 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: