Wave propagation of information through grid. Every iteration information goes through one layer of cells. Templated on information that is transferred. More...
#include <OpenFOAM/FaceCellWave.H>
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.
Definition at line 75 of file FaceCellWave.H.
Public Member Functions | |
FaceCellWave (const polyMesh &, UList< Type > &allFaceInfo, UList< Type > &allCellInfo) | |
FaceCellWave (const polyMesh &, const labelList &initialChangedFaces, const List< Type > &changedFacesInfo, UList< Type > &allFaceInfo, UList< Type > &allCellInfo, const label maxIter) | |
Construct from mesh and list of changed faces with the Type.
| |
UList< Type > & | allFaceInfo () |
Access allFaceInfo.
| |
UList< Type > & | allCellInfo () |
Access allCellInfo.
| |
const polyMesh & | mesh () const |
Access mesh.
| |
label | getUnsetCells () const |
Get number of unvisited cells, i.e. cells that were not (yet)
| |
label | getUnsetFaces () const |
Get number of unvisited faces.
| |
void | setFaceInfo (const labelList &changedFaces, const List< Type > &changedFacesInfo) |
Set initial changed faces.
| |
label | faceToCell () |
Propagate from face to cell. Returns total number of cells.
| |
label | cellToFace () |
Propagate from cell to face. Returns total number of faces.
| |
label | iterate (const label maxIter) |
Iterate until no changes or maxIter reached. Returns number of.
| |
Static Public Member Functions | |
static scalar | propagationTol () |
Access to tolerance.
| |
static void | setPropagationTol (const scalar tol) |
Change tolerance.
|
FaceCellWave | ( | const polyMesh & | mesh, |
UList< Type > & | allFaceInfo, | ||
UList< Type > & | allCellInfo | ||
) |
Definition at line 798 of file FaceCellWave.C.
FaceCellWave | ( | const polyMesh & | mesh, |
const labelList & | initialChangedFaces, | ||
const List< Type > & | changedFacesInfo, | ||
UList< Type > & | allFaceInfo, | ||
UList< Type > & | allCellInfo, | ||
const label | maxIter | ||
) |
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 825 of file FaceCellWave.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, and FatalErrorIn.
static scalar propagationTol | ( | ) | [inline, static]
|
Access to tolerance.
Definition at line 278 of file FaceCellWave.H.
static void setPropagationTol | ( | const scalar | tol ) | [inline, static]
|
Change tolerance.
Definition at line 284 of file FaceCellWave.H.
UList<Type>& allFaceInfo | ( | ) | [inline]
|
Access allFaceInfo.
Definition at line 320 of file FaceCellWave.H.
UList<Type>& allCellInfo | ( | ) | [inline]
|
Access allCellInfo.
Definition at line 326 of file FaceCellWave.H.
const polyMesh& mesh | ( | ) | const [inline]
|
Access mesh.
Definition at line 332 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
Definition at line 876 of file FaceCellWave.C.
Foam::label getUnsetFaces | ( | ) | const |
Get number of unvisited faces.
Definition at line 883 of file FaceCellWave.C.
Set initial changed faces.
Definition at line 302 of file FaceCellWave.C.
References forAll.
Referenced by hexRef8::consistentSlowRefinement().
Foam::label faceToCell | ( | ) |
Propagate from face to cell. Returns total number of cells.
(over all processors) changed.
Definition at line 892 of file FaceCellWave.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorIn, Foam::Pout, and reduce().
Foam::label cellToFace | ( | ) |
Propagate from cell to face. Returns total number of faces.
(over all processors) changed. (Faces on processorpatches are counted double)
Definition at line 977 of file FaceCellWave.C.
References Foam::abort(), cells, Foam::endl(), Foam::FatalError, FatalErrorIn, forAll, Foam::Pout, and reduce().
Foam::label iterate | ( | const label | maxIter ) |
Iterate until no changes or maxIter reached. Returns number of.
unset cells (see getUnsetCells)
Definition at line 1053 of file FaceCellWave.C.
References Foam::endl(), Foam::nl, and Foam::Pout.
Referenced by hexRef8::consistentSlowRefinement().