Wave propagation of information through grid. Every iteration information goes through one layer of cells. Templated on information that is transferred. More...
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 polyMesh & | mesh () 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... | |
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 74 of file FaceCellWave.H.
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().
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().
|
inlinestatic |
Access to tolerance.
Definition at line 250 of file FaceCellWave.H.
Referenced by combine< Type, TrackingData >::operator()().
|
inlinestatic |
Change tolerance.
Definition at line 256 of file FaceCellWave.H.
References FaceCellWave< Type, TrackingData >::allCellInfo(), and FaceCellWave< Type, TrackingData >::allFaceInfo().
|
inline |
Access allFaceInfo.
Definition at line 294 of file FaceCellWave.H.
Referenced by FaceCellWave< Type, TrackingData >::setPropagationTol().
|
inline |
Access allCellInfo.
Definition at line 300 of file FaceCellWave.H.
Referenced by FaceCellWave< Type, TrackingData >::setPropagationTol().
|
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().
|
inline |
Access mesh.
Definition at line 312 of file FaceCellWave.H.
References FaceCellWave< Type, TrackingData >::cellToFace(), FaceCellWave< Type, TrackingData >::faceToCell(), FaceCellWave< Type, TrackingData >::getUnsetCells(), FaceCellWave< Type, TrackingData >::getUnsetFaces(), FaceCellWave< Type, TrackingData >::iterate(), and FaceCellWave< Type, TrackingData >::setFaceInfo().
Referenced by combine< Type, TrackingData >::operator()().
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 925 of file FaceCellWave.C.
Referenced by MeshWave< Type, TrackingData >::data(), and FaceCellWave< Type, TrackingData >::mesh().
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().
Set initial changed faces.
Definition at line 315 of file FaceCellWave.C.
References cyclicAMIPolyPatch::applyLowWeightCorrection(), polyPatch::boundaryMesh(), Foam::endl(), polyPatch::faceCentres(), PstreamBuffers::finishedSends(), forAll, coupledPolyPatch::forwardT(), cyclicAMIPolyPatch::interpolate(), patchIdentifier::name(), processorPolyPatch::neighbProcNo(), UPstream::nonBlocking, coupledPolyPatch::parallel(), patchi, polyPatch::patchInternalList(), polyPatch::patchSlice(), Foam::Pout, globalMeshData::processorPatches(), coupledPolyPatch::separated(), List< T >::size(), polyPatch::start(), Foam::T(), and Foam::transform().
Referenced by hexRef8::consistentSlowRefinement(), FaceCellWave< Type, TrackingData >::mesh(), combine< Type, TrackingData >::operator()(), Foam::fvc::spread(), and Foam::fvc::sweep().
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().
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().
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().