Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
FaceCellWave< Type, TrackingData > Class Template Reference

Wave propagation of information through grid. Every iteration information goes through one layer of cells. Templated on information that is transferred. More...

Inheritance diagram for FaceCellWave< Type, TrackingData >:
Inheritance graph
[legend]
Collaboration diagram for FaceCellWave< Type, TrackingData >:
Collaboration graph
[legend]

Public Member Functions

 FaceCellWave (const polyMesh &mesh, UList< Type > &allFaceInfo, UList< Type > &allCellInfo, TrackingData &td=dummyTrackData_)
 
 FaceCellWave (const polyMesh &mesh, const labelUList &initialChangedFaces, const List< Type > &changedFacesInfo, UList< Type > &allFaceInfo, UList< Type > &allCellInfo, const label maxIter, TrackingData &td=dummyTrackData_)
 
 FaceCellWave (const polyMesh &mesh, const labelPairList &explicitConnections, const bool handleCyclicAMI, const labelUList &initialChangedFaces, const List< Type > &changedFacesInfo, UList< Type > &allFaceInfo, UList< Type > &allCellInfo, const label maxIter, TrackingData &td=dummyTrackData_)
 
virtual ~FaceCellWave ()=default
 
UList< Type > & allFaceInfo ()
 
UList< Type > & allCellInfo ()
 
const TrackingData & data () const
 
const polyMeshmesh () const
 
label nUnvisitedCells () const
 
label nUnvisitedFaces () const
 
void setFaceInfo (const label facei, const Type &faceInfo)
 
void setFaceInfo (const labelUList &changedFaces, const List< Type > &changedFacesInfo)
 
virtual label faceToCell ()
 
virtual label cellToFace ()
 
virtual label iterate (const label maxIter)
 

Static Public Member Functions

static scalar propagationTol ()
 
static void setPropagationTol (const scalar tol)
 

Protected Types

typedef std::pair< label, Type > taggedInfoType
 

Protected Member Functions

bool updateCell (const label celli, const label neighbourFacei, const Type &neighbourInfo, const scalar tol, Type &cellInfo)
 
bool updateFace (const label facei, const label neighbourCelli, const Type &neighbourInfo, const scalar tol, Type &faceInfo)
 
bool updateFace (const label facei, const Type &neighbourInfo, const scalar tol, Type &faceInfo)
 
void checkCyclic (const polyPatch &pPatch) const
 
template<class PatchType >
bool hasPatch () const
 
void mergeFaceInfo (const polyPatch &patch, const label nFaces, const labelUList &changedFaces, const List< Type > &changedFacesInfo)
 
label getChangedPatchFaces (const polyPatch &patch, const label startFacei, const label nFaces, labelList &changedPatchFaces, List< Type > &changedPatchFacesInfo) const
 
void leaveDomain (const polyPatch &patch, const label nFaces, const labelUList &faceLabels, List< Type > &faceInfo) const
 
void enterDomain (const polyPatch &patch, const label nFaces, const labelUList &faceLabels, List< Type > &faceInfo) const
 
void transform (const tensorField &rotTensor, const label nFaces, List< Type > &faceInfo)
 
void handleProcPatches ()
 
void handleCyclicPatches ()
 
void handleAMICyclicPatches ()
 
void handleExplicitConnections ()
 
 FaceCellWave (const FaceCellWave &)=delete
 
void operator= (const FaceCellWave &)=delete
 

Static Protected Member Functions

static void offset (const polyPatch &patch, const label off, const label nFaces, labelList &faces)
 

Protected Attributes

const polyMeshmesh_
 
const labelPairList explicitConnections_
 
UList< Type > & allFaceInfo_
 
UList< Type > & allCellInfo_
 
TrackingData & td_
 
bitSet changedFace_
 
bitSet changedCell_
 
DynamicList< label > changedFaces_
 
DynamicList< label > changedCells_
 
DynamicList< taggedInfoTypechangedBaffles_
 
const bool hasCyclicPatches_
 
const bool hasCyclicAMIPatches_
 
label nEvals_
 
label nUnvisitedCells_
 
label nUnvisitedFaces_
 

Static Protected Attributes

static const scalar geomTol_ = 1e-6
 
static scalar propagationTol_ = 0.01
 
static int dummyTrackData_ = 12345
 

Detailed Description

template<class Type, class TrackingData = int>
class Foam::FaceCellWave< Type, TrackingData >

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.

Source files

Definition at line 74 of file FaceCellWave.H.

Member Typedef Documentation

◆ taggedInfoType

typedef std::pair<label,Type> taggedInfoType
protected

Definition at line 82 of file FaceCellWave.H.

Constructor & Destructor Documentation

◆ FaceCellWave() [1/4]

FaceCellWave ( const FaceCellWave< Type, TrackingData > &  )
protecteddelete

◆ FaceCellWave() [2/4]

FaceCellWave ( const polyMesh mesh,
UList< Type > &  allFaceInfo,
UList< Type > &  allCellInfo,
TrackingData &  td = dummyTrackData_ 
)

Definition at line 876 of file FaceCellWave.C.

◆ FaceCellWave() [3/4]

FaceCellWave ( const polyMesh mesh,
const labelUList initialChangedFaces,
const List< Type > &  changedFacesInfo,
UList< Type > &  allFaceInfo,
UList< Type > &  allCellInfo,
const label  maxIter,
TrackingData &  td = dummyTrackData_ 
)

Definition at line 921 of file FaceCellWave.C.

◆ FaceCellWave() [4/4]

FaceCellWave ( const polyMesh mesh,
const labelPairList explicitConnections,
const bool  handleCyclicAMI,
const labelUList initialChangedFaces,
const List< Type > &  changedFacesInfo,
UList< Type > &  allFaceInfo,
UList< Type > &  allCellInfo,
const label  maxIter,
TrackingData &  td = dummyTrackData_ 
)

Definition at line 985 of file FaceCellWave.C.

◆ ~FaceCellWave()

virtual ~FaceCellWave ( )
virtualdefault

Member Function Documentation

◆ updateCell()

bool updateCell ( const label  celli,
const label  neighbourFacei,
const Type &  neighbourInfo,
const scalar  tol,
Type &  cellInfo 
)
protected

Definition at line 108 of file FaceCellWave.C.

◆ updateFace() [1/2]

bool updateFace ( const label  facei,
const label  neighbourCelli,
const Type &  neighbourInfo,
const scalar  tol,
Type &  faceInfo 
)
protected

Definition at line 156 of file FaceCellWave.C.

◆ updateFace() [2/2]

bool updateFace ( const label  facei,
const Type &  neighbourInfo,
const scalar  tol,
Type &  faceInfo 
)
protected

Definition at line 204 of file FaceCellWave.C.

◆ checkCyclic()

void checkCyclic ( const polyPatch pPatch) const
protected

Definition at line 250 of file FaceCellWave.C.

◆ hasPatch()

bool hasPatch
protected

Definition at line 296 of file FaceCellWave.C.

◆ mergeFaceInfo()

void mergeFaceInfo ( const polyPatch patch,
const label  nFaces,
const labelUList changedFaces,
const List< Type > &  changedFacesInfo 
)
protected

Definition at line 364 of file FaceCellWave.C.

◆ getChangedPatchFaces()

Foam::label getChangedPatchFaces ( const polyPatch patch,
const label  startFacei,
const label  nFaces,
labelList changedPatchFaces,
List< Type > &  changedPatchFacesInfo 
) const
protected

Definition at line 398 of file FaceCellWave.C.

◆ leaveDomain()

void leaveDomain ( const polyPatch patch,
const label  nFaces,
const labelUList faceLabels,
List< Type > &  faceInfo 
) const
protected

Definition at line 430 of file FaceCellWave.C.

◆ enterDomain()

void enterDomain ( const polyPatch patch,
const label  nFaces,
const labelUList faceLabels,
List< Type > &  faceInfo 
) const
protected

Definition at line 453 of file FaceCellWave.C.

◆ offset()

void offset ( const polyPatch patch,
const label  off,
const label  nFaces,
labelList faces 
)
staticprotected

Definition at line 505 of file FaceCellWave.C.

◆ transform()

void transform ( const tensorField rotTensor,
const label  nFaces,
List< Type > &  faceInfo 
)
protected

Definition at line 476 of file FaceCellWave.C.

◆ handleProcPatches()

void handleProcPatches
protected

Definition at line 523 of file FaceCellWave.C.

◆ handleCyclicPatches()

void handleCyclicPatches
protected

Definition at line 639 of file FaceCellWave.C.

◆ handleAMICyclicPatches()

void handleAMICyclicPatches
protected

Definition at line 723 of file FaceCellWave.C.

◆ handleExplicitConnections()

void handleExplicitConnections
protected

Definition at line 823 of file FaceCellWave.C.

◆ operator=()

void operator= ( const FaceCellWave< Type, TrackingData > &  )
protecteddelete

◆ propagationTol()

static scalar propagationTol ( )
inlinestatic

Definition at line 267 of file FaceCellWave.H.

Referenced by hexRef8::consistentSlowRefinement2(), and combine< Type, TrackingData >::operator()().

Here is the caller graph for this function:

◆ setPropagationTol()

static void setPropagationTol ( const scalar  tol)
inlinestatic

Definition at line 273 of file FaceCellWave.H.

◆ allFaceInfo()

UList<Type>& allFaceInfo ( )
inline

Definition at line 332 of file FaceCellWave.H.

◆ allCellInfo()

UList<Type>& allCellInfo ( )
inline

Definition at line 338 of file FaceCellWave.H.

◆ data()

const TrackingData& data ( ) const
inline

◆ mesh()

const polyMesh& mesh ( ) const
inline

Definition at line 350 of file FaceCellWave.H.

Referenced by combine< Type, TrackingData >::operator()().

Here is the caller graph for this function:

◆ nUnvisitedCells()

Foam::label nUnvisitedCells

Definition at line 1053 of file FaceCellWave.C.

Referenced by MeshWave< Type, TrackingData >::nUnvisitedCells().

Here is the caller graph for this function:

◆ nUnvisitedFaces()

Foam::label nUnvisitedFaces

Definition at line 1060 of file FaceCellWave.C.

Referenced by MeshWave< Type, TrackingData >::nUnvisitedFaces().

Here is the caller graph for this function:

◆ setFaceInfo() [1/2]

void setFaceInfo ( const label  facei,
const Type &  faceInfo 
)

Definition at line 311 of file FaceCellWave.C.

Referenced by hexRef8::consistentSlowRefinement().

Here is the caller graph for this function:

◆ setFaceInfo() [2/2]

void setFaceInfo ( const labelUList changedFaces,
const List< Type > &  changedFacesInfo 
)

Definition at line 335 of file FaceCellWave.C.

◆ faceToCell()

Foam::label faceToCell
virtual

Reimplemented in OppositeFaceCellWave< Type, TrackingData >.

Definition at line 1067 of file FaceCellWave.C.

◆ cellToFace()

Foam::label cellToFace
virtual

Reimplemented in OppositeFaceCellWave< Type, TrackingData >.

Definition at line 1144 of file FaceCellWave.C.

◆ iterate()

Foam::label iterate ( const label  maxIter)
virtual

Definition at line 1220 of file FaceCellWave.C.

Referenced by hexRef8::consistentSlowRefinement(), and MeshWave< Type, TrackingData >::iterate().

Here is the caller graph for this function:

Member Data Documentation

◆ geomTol_

const Foam::scalar geomTol_ = 1e-6
staticprotected

Definition at line 87 of file FaceCellWave.H.

◆ propagationTol_

Foam::scalar propagationTol_ = 0.01
staticprotected

◆ dummyTrackData_

int dummyTrackData_ = 12345
staticprotected

Definition at line 91 of file FaceCellWave.H.

◆ mesh_

const polyMesh& mesh_
protected

Definition at line 97 of file FaceCellWave.H.

Referenced by FaceCellWave< Type, int >::mesh().

◆ explicitConnections_

const labelPairList explicitConnections_
protected

Definition at line 100 of file FaceCellWave.H.

◆ allFaceInfo_

UList<Type>& allFaceInfo_
protected

Definition at line 103 of file FaceCellWave.H.

Referenced by FaceCellWave< Type, int >::allFaceInfo().

◆ allCellInfo_

UList<Type>& allCellInfo_
protected

Definition at line 106 of file FaceCellWave.H.

Referenced by FaceCellWave< Type, int >::allCellInfo().

◆ td_

TrackingData& td_
protected

Definition at line 109 of file FaceCellWave.H.

Referenced by FaceCellWave< Type, int >::data().

◆ changedFace_

bitSet changedFace_
protected

Definition at line 112 of file FaceCellWave.H.

◆ changedCell_

bitSet changedCell_
protected

Definition at line 115 of file FaceCellWave.H.

◆ changedFaces_

DynamicList<label> changedFaces_
protected

Definition at line 118 of file FaceCellWave.H.

◆ changedCells_

DynamicList<label> changedCells_
protected

Definition at line 121 of file FaceCellWave.H.

◆ changedBaffles_

DynamicList<taggedInfoType> changedBaffles_
protected

Definition at line 125 of file FaceCellWave.H.

◆ hasCyclicPatches_

const bool hasCyclicPatches_
protected

Definition at line 128 of file FaceCellWave.H.

◆ hasCyclicAMIPatches_

const bool hasCyclicAMIPatches_
protected

Definition at line 131 of file FaceCellWave.H.

◆ nEvals_

label nEvals_
protected

Definition at line 134 of file FaceCellWave.H.

◆ nUnvisitedCells_

label nUnvisitedCells_
protected

Definition at line 137 of file FaceCellWave.H.

◆ nUnvisitedFaces_

label nUnvisitedFaces_
protected

Definition at line 138 of file FaceCellWave.H.


The documentation for this class was generated from the following files: