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 | |
FvFaceCellWave (const fvMesh &mesh, List< Type > &internalFaceInfo, List< List< Type >> &patchFaceInfo, List< Type > &cellInfo, TrackingData &td=defaultTrackingData_) | |
FvFaceCellWave (const fvMesh &mesh, const List< labelPair > &initialChangedPatchAndFaces, const List< Type > &initialChangedFacesInfo, List< Type > &internalFaceInfo, List< List< Type >> &patchFaceInfo, List< Type > &cellInfo, const label maxIter, TrackingData &td=defaultTrackingData_) | |
Construct from mesh and list of changed faces with the Type. More... | |
FvFaceCellWave (const FvFaceCellWave &)=delete | |
Disallow default bitwise copy construction. More... | |
virtual | ~FvFaceCellWave () |
Destructor. More... | |
List< Type > & | internalFaceInfo () |
Access internalFaceInfo. More... | |
List< List< Type > > & | patchFaceInfo () |
Access patchFaceInfo. More... | |
List< Type > & | cellInfo () |
Access cellInfo. More... | |
const TrackingData & | data () const |
Additional data to be passed into container. More... | |
TrackingData & | data () |
Additional data to be passed into container. More... | |
const fvMesh & | mesh () const |
Access mesh. More... | |
void | setFaceInfo (const List< labelPair > &changedPatchAndFaces, const List< Type > &changedFacesInfo) |
Set initial changed faces. More... | |
virtual label | faceToCell () |
Propagate from face to cell. Returns total number of cells. More... | |
virtual label | cellToFace () |
Propagate from cell to face. Returns total number of faces. More... | |
virtual label | iterate (const label maxIter) |
Iterate until no changes or maxIter reached. Returns actual. More... | |
void | operator= (const FvFaceCellWave &)=delete |
Disallow default bitwise assignment. More... | |
template<class ListList > | |
Foam::labelList | listListSizes (const ListList &ll) |
Static Public Member Functions | |
static scalar | propagationTol () |
Access to tolerance. More... | |
static void | setPropagationTol (const scalar tol) |
Change tolerance. More... | |
template<class ListList > | |
static labelList | listListSizes (const ListList &ll) |
... More... | |
template<class ListList , class Value > | |
static ListList | sizesListList (const labelList &s, const Value &value) |
... More... | |
Static Public Attributes | |
static int | defaultTrackingData_ = -1 |
Default tracking data to go with default template argument. More... | |
Protected Member Functions | |
const Type & | faceInfo (const labelPair &patchAndFacei) const |
... More... | |
Type & | faceInfo (const labelPair &patchAndFacei) |
... More... | |
bool | faceChanged (const labelPair &patchAndFacei) const |
... More... | |
PackedBoolList::iteratorBase | faceChanged (const labelPair &) |
... More... | |
bool | updateCell (const label celli, const labelPair &neighbourPatchAndFacei, const Type &neighbourInfo, const scalar tol, Type &cellInfo) |
Updates cellInfo with information from neighbour. Updates all. More... | |
bool | updateFace (const labelPair &patchAndFacei, const label neighbourCelli, const Type &neighbourInfo, const scalar tol, Type &faceInfo) |
Updates faceInfo with information from neighbour. Updates all. More... | |
bool | updateFace (const labelPair &patchAndFacei, const Type &neighbourInfo, const scalar tol, Type &faceInfo) |
Updates faceInfo with information from same face. Updates all. More... | |
void | checkCyclic (const fvPatch &patch) const |
Debugging: check info on both sides of cyclic. More... | |
template<class PatchType > | |
bool | hasPatch () const |
Has cyclic patch? More... | |
void | mergeFaceInfo (const fvPatch &patch, const label nFaces, const labelList &, const List< Type > &) |
Merge received patch data into global data. More... | |
label | getChangedPatchFaces (const fvPatch &patch, labelList &changedPatchFaces, List< Type > &changedPatchFacesInfo) const |
Extract info for single patch only. More... | |
void | transform (const fvPatch &patch, const label nFaces, const labelList &patchFaces, const transformer &transform, List< Type > &faceInfo) |
Transform across an interface. More... | |
void | handleProcPatches () |
Merge data from across processor boundaries. More... | |
void | handleCyclicPatches () |
Merge data from across cyclics. More... | |
void | handleCyclicAMIPatches () |
Merge data from across AMI cyclics. More... | |
Protected Attributes | |
const fvMesh & | mesh_ |
Reference to mesh. More... | |
List< Type > & | internalFaceInfo_ |
Information for internal faces. More... | |
List< List< Type > > & | patchFaceInfo_ |
Information for patch faces. More... | |
List< Type > & | cellInfo_ |
Information for all cells. More... | |
TrackingData & | td_ |
Additional data to be passed into container. More... | |
PackedBoolList | internalFaceChanged_ |
Has internal face changed? More... | |
List< PackedBoolList > | patchFaceChanged_ |
Has patch face changed? More... | |
PackedBoolList | cellChanged_ |
Has cell changed? More... | |
DynamicList< labelPair > | changedPatchAndFaces_ |
List of changed patch and faces. More... | |
DynamicList< label > | changedCells_ |
List of changed cells. More... | |
const bool | hasCyclicPatches_ |
Contains cyclics. More... | |
const bool | hasCyclicAMIPatches_ |
Contains cyclicAMI. More... | |
Static Protected Attributes | |
static const scalar | geomTol_ = 1e-6 |
... More... | |
static scalar | propagationTol_ = 1e-2 |
... 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 FvFaceCellWave.H.
FvFaceCellWave | ( | const fvMesh & | mesh, |
List< Type > & | internalFaceInfo, | ||
List< List< Type >> & | patchFaceInfo, | ||
List< Type > & | cellInfo, | ||
TrackingData & | td = defaultTrackingData_ |
||
) |
Definition at line 723 of file FvFaceCellWave.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, and List< T >::size().
Referenced by FvFaceCellWave< Type, TrackingData >::handleCyclicAMIPatches(), and FvFaceCellWave< Type, TrackingData >::setPropagationTol().
FvFaceCellWave | ( | const fvMesh & | mesh, |
const List< labelPair > & | initialChangedPatchAndFaces, | ||
const List< Type > & | initialChangedFacesInfo, | ||
List< Type > & | internalFaceInfo, | ||
List< List< Type >> & | patchFaceInfo, | ||
List< Type > & | cellInfo, | ||
const label | maxIter, | ||
TrackingData & | td = defaultTrackingData_ |
||
) |
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 783 of file FvFaceCellWave.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, and FvFaceCellWave< Type, TrackingData >::setFaceInfo().
|
delete |
Disallow default bitwise copy construction.
|
inlinevirtual |
Destructor.
Definition at line 285 of file FvFaceCellWave.H.
|
protected |
...
Definition at line 87 of file FvFaceCellWave.C.
References Pair< Type >::first(), and Pair< Type >::second().
Referenced by FvFaceCellWave< Type, TrackingData >::sizesListList().
|
protected |
...
Definition at line 100 of file FvFaceCellWave.C.
References FvFaceCellWave< Type, TrackingData >::faceChanged(), Pair< Type >::first(), and Pair< Type >::second().
...
Definition at line 113 of file FvFaceCellWave.C.
References Pair< Type >::first(), and Pair< Type >::second().
Referenced by FvFaceCellWave< Type, TrackingData >::faceInfo().
|
protected |
...
Definition at line 128 of file FvFaceCellWave.C.
References Pair< Type >::first(), Pair< Type >::second(), and FvFaceCellWave< Type, TrackingData >::updateCell().
|
protected |
Updates cellInfo with information from neighbour. Updates all.
statistics.
Definition at line 141 of file FvFaceCellWave.C.
References FvWallInfoBase< WallInfo, Derived >::updateCell(), and FvFaceCellWave< Type, TrackingData >::updateFace().
Referenced by FvFaceCellWave< Type, TrackingData >::faceChanged().
|
protected |
Updates faceInfo with information from neighbour. Updates all.
statistics.
Definition at line 175 of file FvFaceCellWave.C.
References FvWallInfoBase< WallInfo, Derived >::updateFace().
Referenced by FvFaceCellWave< Type, TrackingData >::updateCell().
|
protected |
Updates faceInfo with information from same face. Updates all.
statistics.
Definition at line 211 of file FvFaceCellWave.C.
References FvFaceCellWave< Type, TrackingData >::checkCyclic(), and FvWallInfoBase< WallInfo, Derived >::updateFace().
|
protected |
Debugging: check info on both sides of cyclic.
Definition at line 245 of file FvFaceCellWave.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, and fvPatch::index().
Referenced by FvFaceCellWave< Type, TrackingData >::updateFace().
|
protected |
Has cyclic patch?
Definition at line 283 of file FvFaceCellWave.C.
References forAll, FvFaceCellWave< Type, TrackingData >::mergeFaceInfo(), and patchi.
|
protected |
Merge received patch data into global data.
Definition at line 299 of file FvFaceCellWave.C.
References FvFaceCellWave< Type, TrackingData >::getChangedPatchFaces(), and fvPatch::index().
Referenced by FvFaceCellWave< Type, TrackingData >::hasPatch().
|
protected |
Extract info for single patch only.
Definition at line 330 of file FvFaceCellWave.C.
References forAll, fvPatch::index(), and FvFaceCellWave< Type, TrackingData >::transform().
Referenced by FvFaceCellWave< Type, TrackingData >::mergeFaceInfo().
|
protected |
Transform across an interface.
Definition at line 357 of file FvFaceCellWave.C.
Referenced by FvFaceCellWave< Type, TrackingData >::getChangedPatchFaces().
|
protected |
Merge data from across processor boundaries.
Definition at line 373 of file FvFaceCellWave.C.
References Foam::endl(), PstreamBuffers::finishedSends(), forAll, fvPatch::name(), processorFvPatch::neighbProcNo(), patchi, Foam::Pout, fvPatch::size(), Foam::transform(), and processorFvPatch::transform().
|
protected |
Merge data from across cyclics.
Definition at line 470 of file FvFaceCellWave.C.
References Foam::endl(), forAll, fvPatch::name(), cyclicFvPatch::nbrPatch(), patchi, Foam::Pout, fvPatch::size(), Foam::transform(), and cyclicFvPatch::transform().
|
protected |
Merge data from across AMI cyclics.
Definition at line 533 of file FvFaceCellWave.C.
References cyclicAMIFvPatch::AMIs(), cyclicAMIFvPatch::AMITransforms(), List< T >::append(), cyclicAMIFvPatch::applyLowWeightCorrection(), Foam::combine(), FvFaceCellWave< Type, TrackingData >::data(), forAll, FvFaceCellWave< Type, TrackingData >::FvFaceCellWave(), Foam::identity(), fvPatch::index(), FvFaceCellWave< Type, TrackingData >::mesh(), cyclicAMIFvPatch::nbrPatch(), cyclicAMIFvPatch::owner(), fvPatch::patch(), patchi, polyPatch::patchInternalList(), FvFaceCellWave< Type, TrackingData >::propagationTol(), fvPatch::size(), Foam::transform(), cyclicAMIFvPatch::transform(), transformer::transformsPosition(), x, and y.
|
inlinestatic |
Access to tolerance.
Definition at line 232 of file FvFaceCellWave.H.
References FvFaceCellWave< Type, TrackingData >::propagationTol_.
Referenced by FvFaceCellWave< Type, TrackingData >::handleCyclicAMIPatches().
|
inlinestatic |
Change tolerance.
Definition at line 238 of file FvFaceCellWave.H.
References FvFaceCellWave< Type, TrackingData >::FvFaceCellWave(), FvFaceCellWave< Type, TrackingData >::internalFaceInfo(), FvFaceCellWave< Type, TrackingData >::listListSizes(), FvFaceCellWave< Type, TrackingData >::mesh(), FvFaceCellWave< Type, TrackingData >::patchFaceInfo(), s(), and FvFaceCellWave< Type, TrackingData >::sizesListList().
|
static |
...
Referenced by FvFaceCellWave< Type, TrackingData >::setPropagationTol().
|
static |
...
Definition at line 69 of file FvFaceCellWave.C.
References FvFaceCellWave< Type, TrackingData >::faceInfo(), forAll, and List< T >::size().
Referenced by FvFaceCellWave< Type, TrackingData >::listListSizes(), and FvFaceCellWave< Type, TrackingData >::setPropagationTol().
|
inline |
Access internalFaceInfo.
Definition at line 294 of file FvFaceCellWave.H.
References FvFaceCellWave< Type, TrackingData >::internalFaceInfo_.
Referenced by Foam::fvPatchDistWave::getInternalInfo(), and FvFaceCellWave< Type, TrackingData >::setPropagationTol().
Access patchFaceInfo.
Definition at line 300 of file FvFaceCellWave.H.
References FvFaceCellWave< Type, TrackingData >::patchFaceInfo_.
Referenced by FvFaceCellWave< Type, TrackingData >::setPropagationTol().
Access cellInfo.
Definition at line 306 of file FvFaceCellWave.H.
References FvFaceCellWave< Type, TrackingData >::cellInfo_.
Referenced by Foam::fvPatchDistWave::getInternalInfo().
|
inline |
Additional data to be passed into container.
Definition at line 312 of file FvFaceCellWave.H.
References FvFaceCellWave< Type, TrackingData >::td_.
Referenced by FvFaceCellWave< Type, TrackingData >::handleCyclicAMIPatches(), and Foam::fvc::sweep().
|
inline |
Additional data to be passed into container.
Definition at line 318 of file FvFaceCellWave.H.
References FvFaceCellWave< Type, TrackingData >::td_.
|
inline |
Access mesh.
Definition at line 324 of file FvFaceCellWave.H.
References FvFaceCellWave< Type, TrackingData >::cellToFace(), FvFaceCellWave< Type, TrackingData >::faceToCell(), FvFaceCellWave< Type, TrackingData >::iterate(), FvFaceCellWave< Type, TrackingData >::mesh_, FvFaceCellWave< Type, TrackingData >::operator=(), and FvFaceCellWave< Type, TrackingData >::setFaceInfo().
Referenced by FvFaceCellWave< Type, TrackingData >::handleCyclicAMIPatches(), and FvFaceCellWave< Type, TrackingData >::setPropagationTol().
void setFaceInfo | ( | const List< labelPair > & | changedPatchAndFaces, |
const List< Type > & | changedFacesInfo | ||
) |
Set initial changed faces.
Definition at line 826 of file FvFaceCellWave.C.
References List< T >::append(), and forAll.
Referenced by FvFaceCellWave< Type, TrackingData >::FvFaceCellWave(), Foam::fvPatchDistWave::getInternalInfo(), FvFaceCellWave< Type, TrackingData >::mesh(), Foam::min(), Foam::fvc::spread(), and Foam::fvc::sweep().
|
virtual |
Propagate from face to cell. Returns total number of cells.
(over all processors) changed.
Definition at line 849 of file FvFaceCellWave.C.
References Foam::abort(), List< T >::clear(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, Pair< Type >::first(), forAll, patchi, Foam::Pout, Foam::returnReduce(), and Pair< Type >::second().
Referenced by Foam::fvPatchDistWave::getInternalInfo(), and FvFaceCellWave< Type, TrackingData >::mesh().
|
virtual |
Propagate from cell to face. Returns total number of faces.
(over all processors) changed. (Faces on processorpatches are counted double)
Definition at line 929 of file FvFaceCellWave.C.
References Foam::abort(), cells, List< T >::clear(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, FvFaceCellWave< Type, TrackingData >::iterate(), patches, Foam::Pout, Foam::returnReduce(), and UList< T >::shallowCopy().
Referenced by FvFaceCellWave< Type, TrackingData >::mesh().
|
virtual |
Iterate until no changes or maxIter reached. Returns actual.
number of iterations.
Definition at line 1023 of file FvFaceCellWave.C.
References Foam::endl(), Foam::Info, and Foam::nl.
Referenced by FvFaceCellWave< Type, TrackingData >::cellToFace(), Foam::fvPatchDistWave::getInternalInfo(), FvFaceCellWave< Type, TrackingData >::mesh(), Foam::min(), Foam::fvc::spread(), and Foam::fvc::sweep().
|
delete |
Disallow default bitwise assignment.
Referenced by FvFaceCellWave< Type, TrackingData >::mesh().
Foam::labelList listListSizes | ( | const ListList & | ll | ) |
Definition at line 53 of file FvFaceCellWave.C.
References forAll, s(), and FvFaceCellWave< Type, TrackingData >::sizesListList().
|
staticprotected |
...
Definition at line 83 of file FvFaceCellWave.H.
|
staticprotected |
...
Definition at line 86 of file FvFaceCellWave.H.
Referenced by FvFaceCellWave< Type, TrackingData >::propagationTol().
|
protected |
Reference to mesh.
Definition at line 92 of file FvFaceCellWave.H.
Referenced by FvFaceCellWave< Type, TrackingData >::mesh().
|
protected |
Information for internal faces.
Definition at line 95 of file FvFaceCellWave.H.
Referenced by FvFaceCellWave< Type, TrackingData >::internalFaceInfo().
Information for patch faces.
Definition at line 98 of file FvFaceCellWave.H.
Referenced by FvFaceCellWave< Type, TrackingData >::patchFaceInfo().
|
protected |
Information for all cells.
Definition at line 101 of file FvFaceCellWave.H.
Referenced by FvFaceCellWave< Type, TrackingData >::cellInfo().
|
protected |
Additional data to be passed into container.
Definition at line 104 of file FvFaceCellWave.H.
Referenced by FvFaceCellWave< Type, TrackingData >::data().
|
protected |
Has internal face changed?
Definition at line 107 of file FvFaceCellWave.H.
|
protected |
Has patch face changed?
Definition at line 110 of file FvFaceCellWave.H.
|
protected |
Has cell changed?
Definition at line 113 of file FvFaceCellWave.H.
|
protected |
List of changed patch and faces.
Definition at line 116 of file FvFaceCellWave.H.
|
protected |
List of changed cells.
Definition at line 119 of file FvFaceCellWave.H.
|
protected |
Contains cyclics.
Definition at line 122 of file FvFaceCellWave.H.
|
protected |
Contains cyclicAMI.
Definition at line 125 of file FvFaceCellWave.H.
|
static |
Default tracking data to go with default template argument.
Definition at line 226 of file FvFaceCellWave.H.