Wave propagation of information through grid. Every iteration information goes through one layer of cells. Templated on information that is transferred. More...
#include <FaceCellWave.H>


Public Member Functions | |
| FaceCellWave (const polyMesh &mesh, UList< Type > &allFaceInfo, UList< Type > &allCellInfo, TrackingData &td=FaceCellWaveBase::dummyTrackData_) | |
| Construct from mesh. Use setFaceInfo and iterate() to do actual calculation. | |
| FaceCellWave (const polyMesh &mesh, const labelUList &initialChangedFaces, const UList< Type > &changedFacesInfo, UList< Type > &allFaceInfo, UList< Type > &allCellInfo, const label maxIter, TrackingData &td=FaceCellWaveBase::dummyTrackData_) | |
| Construct from mesh and list of changed faces with the Type. | |
| FaceCellWave (const polyMesh &mesh, const UList< labelPair > &explicitConnections, const bool handleCyclicAMI, const labelUList &initialChangedFaces, const UList< Type > &changedFacesInfo, UList< Type > &allFaceInfo, UList< Type > &allCellInfo, const label maxIter, TrackingData &td=FaceCellWaveBase::dummyTrackData_) | |
| Construct from mesh and explicitly connected boundary faces. | |
| virtual | ~FaceCellWave ()=default |
| Destructor. | |
| UList< Type > & | allFaceInfo () noexcept |
| Access allFaceInfo. | |
| UList< Type > & | allCellInfo () noexcept |
| Access allCellInfo. | |
| const TrackingData & | data () const noexcept |
| Additional data to be passed into container. | |
| void | setFaceInfo (const label facei, const Type &faceInfo) |
| Set single initial changed face. | |
| void | setFaceInfo (const labelUList &changedFaces, const UList< Type > &changedFacesInfo) |
| Set initial changed faces. | |
| virtual label | faceToCell () |
| Propagate from face to cell. | |
| virtual label | cellToFace () |
| Propagate from cell to face. | |
| virtual label | iterate (const label maxIter) |
| Iterate until no changes or maxIter reached. | |
| Public Member Functions inherited from FaceCellWaveBase | |
| ClassName ("FaceCellWave") | |
| Runtime type information. | |
| FaceCellWaveBase (const polyMesh &mesh) | |
| Construct with mesh reference and set initial sizes. | |
| const polyMesh & | mesh () const noexcept |
| Return access to the mesh. | |
| label | nChangedCells () const noexcept |
| Current number of changed cells. | |
| label | nChangedFaces () const noexcept |
| Current number of changed faces. | |
| label | nUnvisitedCells () const noexcept |
| Get number of unvisited cells, i.e. cells that were not (yet) reached from walking across mesh. | |
| label | nUnvisitedFaces () const noexcept |
| Get number of unvisited faces. | |
Protected Types | |
| typedef std::pair< label, Type > | taggedInfoType |
| Information tagged with a source or destination id. | |
Protected Member Functions | |
| bool | updateCell (const label celli, const label neighbourFacei, const Type &neighbourInfo, const scalar tol, Type &cellInfo) |
| Updates cellInfo with information from neighbour. | |
| bool | updateFace (const label facei, const label neighbourCelli, const Type &neighbourInfo, const scalar tol, Type &faceInfo) |
| Updates faceInfo with information from neighbour. | |
| bool | updateFace (const label facei, const Type &neighbourInfo, const scalar tol, Type &faceInfo) |
| Updates faceInfo with information from same face. | |
| void | checkCyclic (const polyPatch &pPatch) const |
| Debugging: check info on both sides of cyclic. | |
| template<class PatchType> | |
| bool | hasPatch () const |
| Has cyclic patch? | |
| void | mergeFaceInfo (const polyPatch &patch, const label nFaces, const labelUList &changedFaces, const UList< Type > &changedFacesInfo) |
| Merge received patch data into global data. | |
| label | getChangedPatchFaces (const polyPatch &patch, const label startFacei, const label nFaces, labelUList &changedPatchFaces, UList< Type > &changedPatchFacesInfo) const |
| Extract info for single patch only. | |
| void | leaveDomain (const polyPatch &patch, const label nFaces, const labelUList &faceLabels, UList< Type > &faceInfo) const |
| Handle leaving domain. Implementation referred to Type. | |
| void | enterDomain (const polyPatch &patch, const label nFaces, const labelUList &faceLabels, UList< Type > &faceInfo) const |
| Handle leaving domain. Implementation referred to Type. | |
| void | transform (const tensorField &rotTensor, const label nFaces, UList< Type > &faceInfo) |
| Apply transformation to Type. | |
| void | handleProcPatches () |
| Merge data from across processor boundaries. | |
| void | handleCyclicPatches () |
| Merge data from across cyclics. | |
| void | handleAMICyclicPatches () |
| Merge data from across AMI cyclics. | |
| void | handleExplicitConnections () |
| Merge data across explicitly provided local connections. | |
| FaceCellWave (const FaceCellWave &)=delete | |
| No copy construct. | |
| void | operator= (const FaceCellWave &)=delete |
| No copy assignment. | |
Static Protected Member Functions | |
| static void | offset (const polyPatch &patch, const label off, const label nFaces, labelUList &faces) |
| Offset face labels by constant value. | |
Protected Attributes | |
| const labelPairList | explicitConnections_ |
| Optional boundary faces that information should travel through. | |
| UList< Type > & | allFaceInfo_ |
| Information for all faces. | |
| UList< Type > & | allCellInfo_ |
| Information for all cells. | |
| TrackingData & | td_ |
| Additional data to be passed into container. | |
| DynamicList< taggedInfoType > | changedBaffles_ |
| const bool | hasCyclicPatches_ |
| Contains cyclics. | |
| const bool | hasCyclicAMIPatches_ |
| Contains cyclicAMI. | |
| label | nEvals_ |
| Number of evaluations. | |
| Protected Attributes inherited from FaceCellWaveBase | |
| const polyMesh & | mesh_ |
| Reference to mesh. | |
| PstreamBuffers | pBufs_ |
| Buffers when updating processor patches. | |
| bitSet | changedFace_ |
| Track if face has changed. | |
| bitSet | changedCell_ |
| Track if cell has changed. | |
| DynamicList< label > | changedFaces_ |
| List of changed faces. | |
| DynamicList< label > | changedCells_ |
| List of changed cells. | |
| label | nUnvisitedFaces_ |
| Current count of unvisited faces. | |
| label | nUnvisitedCells_ |
| Current count of unvisited cells. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from FaceCellWaveBase | |
| static scalar | propagationTol () noexcept |
| Access to propagation tolerance. | |
| static scalar | setPropagationTol (const scalar tol) noexcept |
| Change propagation tolerance, return previous value. | |
| Static Public Attributes inherited from FaceCellWaveBase | |
| static int | dummyTrackData_ = 12345 |
| Default trackData value (for default template argument). | |
| Static Protected Attributes inherited from FaceCellWaveBase | |
| static const scalar | geomTol_ = 1e-6 |
| static scalar | propagationTol_ = 0.01 |
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 206 of file FaceCellWave.H.
|
protected |
Information tagged with a source or destination id.
With std::pair as lightweight, movable container.
Definition at line 217 of file FaceCellWave.H.
|
protecteddelete |
No copy construct.
References FaceCellWave().
Referenced by FaceCellWave(), and operator=().


| FaceCellWave | ( | const polyMesh & | mesh, |
| UList< Type > & | allFaceInfo, | ||
| UList< Type > & | allCellInfo, | ||
| TrackingData & | td = FaceCellWaveBase::dummyTrackData_ ) |
Construct from mesh. Use setFaceInfo and iterate() to do actual calculation.
Definition at line 1029 of file FaceCellWave.C.
References allCellInfo(), allCellInfo_, allFaceInfo(), allFaceInfo_, changedBaffles_, explicitConnections_, FaceCellWaveBase::FaceCellWaveBase(), hasCyclicAMIPatches_, hasCyclicPatches_, hasPatch(), FaceCellWaveBase::mesh(), FaceCellWaveBase::mesh_, nEvals_, Foam::returnReduceOr(), td(), and td_.

| FaceCellWave | ( | const polyMesh & | mesh, |
| const labelUList & | initialChangedFaces, | ||
| const UList< Type > & | changedFacesInfo, | ||
| UList< Type > & | allFaceInfo, | ||
| UList< Type > & | allCellInfo, | ||
| const label | maxIter, | ||
| TrackingData & | td = FaceCellWaveBase::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 or negative). 0 initializes, -1 does not
Definition at line 1069 of file FaceCellWave.C.
References allCellInfo(), allCellInfo_, allFaceInfo(), allFaceInfo_, changedBaffles_, Foam::endl(), Foam::exit(), explicitConnections_, FaceCellWaveBase::FaceCellWaveBase(), Foam::FatalError, FatalErrorInFunction, hasCyclicAMIPatches_, hasCyclicPatches_, hasPatch(), iterate(), FaceCellWaveBase::mesh(), FaceCellWaveBase::mesh_, FaceCellWaveBase::nChangedCells(), FaceCellWaveBase::nChangedFaces(), nEvals_, Foam::nl, Foam::returnReduceOr(), setFaceInfo(), td(), and td_.

| FaceCellWave | ( | const polyMesh & | mesh, |
| const UList< labelPair > & | explicitConnections, | ||
| const bool | handleCyclicAMI, | ||
| const labelUList & | initialChangedFaces, | ||
| const UList< Type > & | changedFacesInfo, | ||
| UList< Type > & | allFaceInfo, | ||
| UList< Type > & | allCellInfo, | ||
| const label | maxIter, | ||
| TrackingData & | td = FaceCellWaveBase::dummyTrackData_ ) |
Construct from mesh and explicitly connected boundary faces.
and list of changed faces with the Type for these faces. Iterates until nothing changes or maxIter reached. (maxIter can be 0 or negative). 0 initializes, -1 does not
Definition at line 1128 of file FaceCellWave.C.
References allCellInfo(), allCellInfo_, allFaceInfo(), allFaceInfo_, changedBaffles_, Foam::endl(), Foam::exit(), explicitConnections_, FaceCellWaveBase::FaceCellWaveBase(), Foam::FatalError, FatalErrorInFunction, hasCyclicAMIPatches_, hasCyclicPatches_, hasPatch(), iterate(), FaceCellWaveBase::mesh(), FaceCellWaveBase::mesh_, FaceCellWaveBase::nChangedCells(), FaceCellWaveBase::nChangedFaces(), nEvals_, Foam::nl, Foam::returnReduceOr(), setFaceInfo(), td(), and td_.

|
virtualdefault |
Destructor.
|
protected |
Updates cellInfo with information from neighbour.
Updates all statistics.
Definition at line 197 of file FaceCellWave.C.
References FaceCellWaveBase::changedCell_, FaceCellWaveBase::changedCells_, FaceCellWaveBase::mesh_, nEvals_, FaceCellWaveBase::nUnvisitedCells_, td_, cellInfo::updateCell(), and cellInfo::valid().
Referenced by faceToCell().


|
protected |
Updates faceInfo with information from neighbour.
Updates all statistics.
Definition at line 245 of file FaceCellWave.C.
References FaceCellWaveBase::mesh_, nEvals_, and td_.
Referenced by cellToFace(), handleAMICyclicPatches(), handleExplicitConnections(), and mergeFaceInfo().

|
protected |
Updates faceInfo with information from same face.
Updates all statistics.
Definition at line 293 of file FaceCellWave.C.
|
protected |
Debugging: check info on both sides of cyclic.
Definition at line 339 of file FaceCellWave.C.
Referenced by handleCyclicPatches().

|
protected |
Has cyclic patch?
Definition at line 386 of file FaceCellWave.C.
References FaceCellWaveBase::mesh_, and p.
Referenced by FaceCellWave(), FaceCellWave(), and FaceCellWave().

|
protected |
Merge received patch data into global data.
Definition at line 453 of file FaceCellWave.C.
References allFaceInfo_, FaceCellWaveBase::propagationTol_, td_, and updateFace().
Referenced by handleCyclicPatches(), and handleProcPatches().


|
protected |
Extract info for single patch only.
Definition at line 487 of file FaceCellWave.C.
References allFaceInfo_, and FaceCellWaveBase::changedFace_.
Referenced by handleCyclicPatches(), and handleProcPatches().

|
protected |
Handle leaving domain. Implementation referred to Type.
Definition at line 519 of file FaceCellWave.C.
References faceLabels(), and FaceCellWaveBase::mesh_.
Referenced by handleCyclicPatches(), and handleProcPatches().


|
protected |
Handle leaving domain. Implementation referred to Type.
Definition at line 542 of file FaceCellWave.C.
Referenced by handleCyclicPatches(), and handleProcPatches().

|
staticprotected |
Offset face labels by constant value.
Definition at line 594 of file FaceCellWave.C.
|
protected |
Apply transformation to Type.
Definition at line 565 of file FaceCellWave.C.
References FaceCellWaveBase::mesh_, UList< T >::size(), Foam::T(), and td_.
Referenced by handleAMICyclicPatches(), handleCyclicPatches(), and handleProcPatches().


|
protected |
Merge data from across processor boundaries.
Transfer changed faces from neighbouring processors.
Definition at line 613 of file FaceCellWave.C.
References UList< T >::empty(), Foam::endl(), enterDomain(), getChangedPatchFaces(), leaveDomain(), mergeFaceInfo(), FaceCellWaveBase::mesh_, FaceCellWaveBase::pBufs_, Foam::Pout, globalMeshData::processorPatches(), processorTopology::procNeighbours(), Foam::refCast(), DynamicList< T, SizeMin >::resize(), DynamicList< T, SizeMin >::resize_nocopy(), UList< T >::size(), globalMeshData::topology(), and transform().
Referenced by cellToFace(), and iterate().


|
protected |
Merge data from across cyclics.
Transfer changed faces across cyclic halves
Definition at line 758 of file FaceCellWave.C.
References checkCyclic(), Foam::endl(), enterDomain(), getChangedPatchFaces(), Foam::isA(), leaveDomain(), mergeFaceInfo(), FaceCellWaveBase::mesh_, cyclicPolyPatch::neighbPatch(), Foam::Pout, UList< T >::size(), and transform().
Referenced by cellToFace(), and iterate().


|
protected |
Merge data from across AMI cyclics.
Definition at line 841 of file FaceCellWave.C.
References allCellInfo_, allFaceInfo_, polyPatch::faceCentres(), forAll, Foam::isA(), FaceCellWaveBase::mesh_, cyclicPolyPatch::neighbPatch(), UList< T >::null(), coupledPolyPatch::parallel(), polyPatch::patchSlice(), FaceCellWaveBase::propagationTol_, coupledPolyPatch::separated(), UList< T >::size(), td_, transform(), and updateFace().
Referenced by cellToFace(), and iterate().


|
protected |
Merge data across explicitly provided local connections.
These are usually baffles
Definition at line 977 of file FaceCellWave.C.
References allFaceInfo_, changedBaffles_, FaceCellWaveBase::changedFace_, explicitConnections_, FaceCellWaveBase::propagationTol_, td_, and updateFace().
Referenced by cellToFace().


|
protecteddelete |
No copy assignment.
References allCellInfo(), allFaceInfo(), FaceCellWaveBase::dummyTrackData_, FaceCellWave(), FaceCellWaveBase::mesh(), and td().

|
inlinenoexcept |
Access allFaceInfo.
Definition at line 490 of file FaceCellWave.H.
References allFaceInfo_, and Foam::noexcept.
Referenced by FaceCellWave(), FaceCellWave(), FaceCellWave(), and operator=().

|
inlinenoexcept |
Access allCellInfo.
Definition at line 498 of file FaceCellWave.H.
References allCellInfo_, and Foam::noexcept.
Referenced by FaceCellWave(), FaceCellWave(), FaceCellWave(), and operator=().

|
inlinenoexcept |
Additional data to be passed into container.
Definition at line 506 of file FaceCellWave.H.
References Foam::noexcept, and td_.
Referenced by wallDistAddressing::correct(), decompositionMethod::decompose(), structuredDecomp::decompose(), wallDistAddressing::getValues(), and levelSetDesignVariables::updateSignedDistances().

| void setFaceInfo | ( | const label | facei, |
| const Type & | faceInfo ) |
Set single initial changed face.
This is a noop if the face had already been visited
Definition at line 400 of file FaceCellWave.C.
Referenced by hexRef8::consistentSlowRefinement(), FaceCellWave(), and FaceCellWave().

| void setFaceInfo | ( | const labelUList & | changedFaces, |
| const UList< Type > & | changedFacesInfo ) |
Set initial changed faces.
Definition at line 424 of file FaceCellWave.C.
References allFaceInfo_, FaceCellWaveBase::changedFace_, FaceCellWaveBase::changedFaces_, forAll, FaceCellWaveBase::nUnvisitedFaces_, and td_.
|
virtual |
Propagate from face to cell.
Reimplemented in OppositeFaceCellWave< Type, TrackingData >.
Definition at line 1192 of file FaceCellWave.C.
References Foam::abort(), allCellInfo_, allFaceInfo_, FaceCellWaveBase::changedFace_, FaceCellWaveBase::changedFaces_, Foam::endl(), Foam::FatalError, FatalErrorInFunction, FaceCellWaveBase::mesh_, FaceCellWaveBase::nChangedCells(), Foam::Pout, FaceCellWaveBase::propagationTol_, Foam::returnReduce(), td_, and updateCell().
Referenced by iterate().


|
virtual |
Propagate from cell to face.
Reimplemented in OppositeFaceCellWave< Type, TrackingData >.
Definition at line 1269 of file FaceCellWave.C.
References Foam::abort(), allCellInfo_, allFaceInfo_, cells, FaceCellWaveBase::changedCell_, FaceCellWaveBase::changedCells_, Foam::endl(), faceLabels(), Foam::FatalError, FatalErrorInFunction, handleAMICyclicPatches(), handleCyclicPatches(), handleExplicitConnections(), handleProcPatches(), hasCyclicAMIPatches_, hasCyclicPatches_, FaceCellWaveBase::mesh_, FaceCellWaveBase::nChangedFaces(), UPstream::parRun(), Foam::Pout, FaceCellWaveBase::propagationTol_, Foam::returnReduce(), td_, and updateFace().
Referenced by iterate().


|
virtual |
Iterate until no changes or maxIter reached.
Definition at line 1345 of file FaceCellWave.C.
References cellToFace(), Foam::endl(), faceToCell(), handleAMICyclicPatches(), handleCyclicPatches(), handleProcPatches(), hasCyclicAMIPatches_, hasCyclicPatches_, Foam::Info, nEvals_, Foam::nl, FaceCellWaveBase::nUnvisitedCells_, FaceCellWaveBase::nUnvisitedFaces_, and UPstream::parRun().
Referenced by hexRef8::consistentSlowRefinement(), FaceCellWave(), FaceCellWave(), and structuredRenumber::renumber().


|
protected |
Optional boundary faces that information should travel through.
Definition at line 225 of file FaceCellWave.H.
Referenced by FaceCellWave(), FaceCellWave(), FaceCellWave(), and handleExplicitConnections().
|
protected |
Information for all faces.
Definition at line 230 of file FaceCellWave.H.
Referenced by allFaceInfo(), cellToFace(), FaceCellWave(), FaceCellWave(), FaceCellWave(), faceToCell(), getChangedPatchFaces(), handleAMICyclicPatches(), handleExplicitConnections(), mergeFaceInfo(), and setFaceInfo().
|
protected |
Information for all cells.
Definition at line 235 of file FaceCellWave.H.
Referenced by allCellInfo(), cellToFace(), FaceCellWave(), FaceCellWave(), FaceCellWave(), faceToCell(), and handleAMICyclicPatches().
|
protected |
Additional data to be passed into container.
Definition at line 240 of file FaceCellWave.H.
Referenced by cellToFace(), data(), FaceCellWave(), FaceCellWave(), FaceCellWave(), faceToCell(), handleAMICyclicPatches(), handleExplicitConnections(), mergeFaceInfo(), setFaceInfo(), transform(), updateCell(), updateFace(), and updateFace().
|
protected |
Definition at line 244 of file FaceCellWave.H.
Referenced by FaceCellWave(), FaceCellWave(), FaceCellWave(), and handleExplicitConnections().
|
protected |
Contains cyclics.
Definition at line 249 of file FaceCellWave.H.
Referenced by cellToFace(), FaceCellWave(), FaceCellWave(), FaceCellWave(), and iterate().
|
protected |
Contains cyclicAMI.
Definition at line 254 of file FaceCellWave.H.
Referenced by cellToFace(), FaceCellWave(), FaceCellWave(), FaceCellWave(), and iterate().
|
protected |
Number of evaluations.
Definition at line 259 of file FaceCellWave.H.
Referenced by FaceCellWave(), FaceCellWave(), FaceCellWave(), iterate(), updateCell(), updateFace(), and updateFace().