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... | |
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... | |
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 533 of file FvFaceCellWave.C.
References fvMesh::boundary(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, FvFaceCellWave< Type, TrackingData >::internalFaceInfo(), FvFaceCellWave< Type, TrackingData >::listListSizes(), FvFaceCellWave< Type, TrackingData >::mesh_, primitiveMesh::nCells(), primitiveMesh::nInternalFaces(), FvFaceCellWave< Type, TrackingData >::patchFaceInfo(), and List< T >::size().
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 592 of file FvFaceCellWave.C.
References FvFaceCellWave< Type, TrackingData >::changedCells_, FvFaceCellWave< Type, TrackingData >::changedPatchAndFaces_, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, FvFaceCellWave< Type, TrackingData >::iterate(), FvFaceCellWave< Type, TrackingData >::setFaceInfo(), and List< T >::size().
|
delete |
Disallow default bitwise copy construction.
|
inlinevirtual |
Destructor.
Definition at line 279 of file FvFaceCellWave.H.
|
protected |
...
Definition at line 85 of file FvFaceCellWave.C.
References Pair< Type >::first(), and Pair< Type >::second().
|
protected |
...
Definition at line 98 of file FvFaceCellWave.C.
References Pair< Type >::first(), and Pair< Type >::second().
|
protected |
...
Definition at line 111 of file FvFaceCellWave.C.
References Pair< Type >::first(), and Pair< Type >::second().
|
protected |
...
Definition at line 126 of file FvFaceCellWave.C.
References Pair< Type >::first(), and Pair< Type >::second().
|
protected |
Updates cellInfo with information from neighbour. Updates all.
statistics.
Definition at line 139 of file FvFaceCellWave.C.
References cellInfo::updateCell().
|
protected |
Updates faceInfo with information from neighbour. Updates all.
statistics.
Definition at line 173 of file FvFaceCellWave.C.
|
protected |
Updates faceInfo with information from same face. Updates all.
statistics.
Definition at line 209 of file FvFaceCellWave.C.
|
protected |
Debugging: check info on both sides of cyclic.
Definition at line 243 of file FvFaceCellWave.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, fvPatch::index(), and cyclicFvPatch::nbrPatch().
|
protected |
|
protected |
Merge received patch data into global data.
Definition at line 297 of file FvFaceCellWave.C.
References fvPatch::index().
|
protected |
Extract info for single patch only.
Definition at line 328 of file FvFaceCellWave.C.
References forAll, and fvPatch::index().
|
protected |
Transform across an interface.
Definition at line 355 of file FvFaceCellWave.C.
References Foam::transform().
|
protected |
Merge data from across processor boundaries.
Definition at line 372 of file FvFaceCellWave.C.
References Foam::endl(), PstreamBuffers::finishedSends(), forAll, fvPatch::name(), processorFvPatch::neighbProcNo(), patchi, Foam::Pout, fvPatch::size(), List< T >::size(), processorFvPatch::transform(), and Foam::transform().
|
protected |
Merge data from across cyclics.
Definition at line 469 of file FvFaceCellWave.C.
References Foam::endl(), forAll, fvPatch::name(), cyclicFvPatch::nbrPatch(), patchi, Foam::Pout, fvPatch::size(), cyclicFvPatch::transform(), and Foam::transform().
|
inlinestatic |
Access to tolerance.
Definition at line 226 of file FvFaceCellWave.H.
References FvFaceCellWave< Type, TrackingData >::propagationTol_.
|
inlinestatic |
Change tolerance.
Definition at line 232 of file FvFaceCellWave.H.
References FvFaceCellWave< Type, TrackingData >::propagationTol_.
|
static |
...
Referenced by FvFaceCellWave< Type, TrackingData >::FvFaceCellWave().
|
static |
|
inline |
Access internalFaceInfo.
Definition at line 288 of file FvFaceCellWave.H.
References FvFaceCellWave< Type, TrackingData >::internalFaceInfo_.
Referenced by FvFaceCellWave< Type, TrackingData >::FvFaceCellWave().
Access patchFaceInfo.
Definition at line 294 of file FvFaceCellWave.H.
References FvFaceCellWave< Type, TrackingData >::patchFaceInfo_.
Referenced by FvFaceCellWave< Type, TrackingData >::FvFaceCellWave().
Access cellInfo.
Definition at line 300 of file FvFaceCellWave.H.
References FvFaceCellWave< Type, TrackingData >::cellInfo_.
|
inline |
Additional data to be passed into container.
Definition at line 306 of file FvFaceCellWave.H.
References FvFaceCellWave< Type, TrackingData >::td_.
|
inline |
Additional data to be passed into container.
Definition at line 312 of file FvFaceCellWave.H.
References FvFaceCellWave< Type, TrackingData >::td_.
|
inline |
Access mesh.
Definition at line 318 of file FvFaceCellWave.H.
References FvFaceCellWave< Type, TrackingData >::mesh_.
void setFaceInfo | ( | const List< labelPair > & | changedPatchAndFaces, |
const List< Type > & | changedFacesInfo | ||
) |
Set initial changed faces.
Definition at line 635 of file FvFaceCellWave.C.
References List< T >::append(), and forAll.
Referenced by FvFaceCellWave< Type, TrackingData >::FvFaceCellWave().
|
virtual |
Propagate from face to cell. Returns total number of cells.
(over all processors) changed.
Definition at line 659 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().
|
virtual |
Propagate from cell to face. Returns total number of faces.
(over all processors) changed. (Faces on processorpatches are counted double)
Definition at line 739 of file FvFaceCellWave.C.
References Foam::abort(), cells, Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, UPstream::parRun(), patches, Foam::Pout, Foam::returnReduce(), and UList< T >::shallowCopy().
|
virtual |
Iterate until no changes or maxIter reached. Returns actual.
number of iterations.
Definition at line 826 of file FvFaceCellWave.C.
References Foam::endl(), Foam::Info, Foam::nl, and UPstream::parRun().
Referenced by FvFaceCellWave< Type, TrackingData >::FvFaceCellWave().
|
delete |
Disallow default bitwise assignment.
Foam::labelList listListSizes | ( | const ListList & | ll | ) |
|
staticprotected |
...
Definition at line 83 of file FvFaceCellWave.H.
|
staticprotected |
...
Definition at line 86 of file FvFaceCellWave.H.
Referenced by FvFaceCellWave< Type, TrackingData >::propagationTol(), and FvFaceCellWave< Type, TrackingData >::setPropagationTol().
|
protected |
Reference to mesh.
Definition at line 92 of file FvFaceCellWave.H.
Referenced by FvFaceCellWave< Type, TrackingData >::FvFaceCellWave(), and 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.
Referenced by FvFaceCellWave< Type, TrackingData >::FvFaceCellWave().
|
protected |
List of changed cells.
Definition at line 119 of file FvFaceCellWave.H.
Referenced by FvFaceCellWave< Type, TrackingData >::FvFaceCellWave().
|
protected |
Contains cyclics.
Definition at line 122 of file FvFaceCellWave.H.
|
static |
Default tracking data to go with default template argument.
Definition at line 220 of file FvFaceCellWave.H.