Public Member Functions | Static Public Member Functions | List of all members
PointEdgeWave< Type, TrackingData > Class Template Reference

Wave propagation of information through grid. Every iteration information goes through one layer of edges. More...

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

Public Member Functions

 PointEdgeWave (const polyMesh &mesh, const labelList &initialPoints, const List< Type > &initialPointsInfo, UList< Type > &allPointInfo, UList< Type > &allEdgeInfo, const label maxIter, TrackingData &td=dummyTrackData_)
 
 PointEdgeWave (const polyMesh &mesh, UList< Type > &allPointInfo, UList< Type > &allEdgeInfo, TrackingData &td=dummyTrackData_)
 
 ~PointEdgeWave ()=default
 
UList< Type > & allPointInfo () const
 
UList< Type > & allEdgeInfo () const
 
const TrackingData & data () const
 
label nUnvisitedEdges () const
 
label nUnvisitedPoints () const
 
void setPointInfo (const labelList &changedPoints, const List< Type > &changedPointsInfo)
 
label pointToEdge ()
 
label edgeToPoint ()
 
label iterate (const label maxIter)
 
template<class PatchType >
Foam::label countPatchType () const
 

Static Public Member Functions

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

Detailed Description

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

Wave propagation of information through grid. Every iteration information goes through one layer of edges.

Templated on information that is transferred.

Handles parallel and cyclics. Only parallel reasonably tested. Cyclics hardly tested.

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.

Note: parallel is done in two steps:

  1. transfer patch points in offset notation, i.e. every patch point is denoted by a patchface label and an index in this face. Receiving end uses that fact that f[0] is shared and order is reversed.
  2. do all non-local shared points by means of reduce of data on them.

Note: cyclics is with offset in patchface as well. Patch is divided into two sub patches and the point-point addressing is never explicitly calculated but instead use is made of the face-face correspondence. (it probably is more efficient to calculate a point-point correspondence at the start and then reuse this; task to be done)

Source files

Definition at line 84 of file PointEdgeWave.H.

Constructor & Destructor Documentation

◆ PointEdgeWave() [1/2]

PointEdgeWave ( const polyMesh mesh,
const labelList initialPoints,
const List< Type > &  initialPointsInfo,
UList< Type > &  allPointInfo,
UList< Type > &  allEdgeInfo,
const label  maxIter,
TrackingData &  td = dummyTrackData_ 
)

Definition at line 607 of file PointEdgeWave.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::Info, and Foam::returnReduce().

Here is the call graph for this function:

◆ PointEdgeWave() [2/2]

PointEdgeWave ( const polyMesh mesh,
UList< Type > &  allPointInfo,
UList< Type > &  allEdgeInfo,
TrackingData &  td = dummyTrackData_ 
)

Definition at line 680 of file PointEdgeWave.C.

◆ ~PointEdgeWave()

~PointEdgeWave ( )
default

Member Function Documentation

◆ propagationTol()

static scalar propagationTol ( )
inlinestatic

Definition at line 223 of file PointEdgeWave.H.

◆ setPropagationTol()

static void setPropagationTol ( const scalar  tol)
inlinestatic

Definition at line 229 of file PointEdgeWave.H.

◆ allPointInfo()

UList<Type>& allPointInfo ( ) const
inline

Definition at line 271 of file PointEdgeWave.H.

◆ allEdgeInfo()

UList<Type>& allEdgeInfo ( ) const
inline

Definition at line 277 of file PointEdgeWave.H.

◆ data()

const TrackingData& data ( ) const
inline

Definition at line 283 of file PointEdgeWave.H.

◆ nUnvisitedEdges()

Foam::label nUnvisitedEdges

Definition at line 714 of file PointEdgeWave.C.

◆ nUnvisitedPoints()

Foam::label nUnvisitedPoints

Definition at line 707 of file PointEdgeWave.C.

◆ setPointInfo()

void setPointInfo ( const labelList changedPoints,
const List< Type > &  changedPointsInfo 
)

Definition at line 723 of file PointEdgeWave.C.

References forAll.

◆ pointToEdge()

Foam::label pointToEdge

Definition at line 835 of file PointEdgeWave.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::nl, and reduce().

Here is the call graph for this function:

◆ edgeToPoint()

Foam::label edgeToPoint

Definition at line 759 of file PointEdgeWave.C.

References Foam::abort(), Foam::constant::electromagnetic::e, Foam::FatalError, FatalErrorInFunction, forAll, Foam::nl, and reduce().

Here is the call graph for this function:

◆ iterate()

Foam::label iterate ( const label  maxIter)

Definition at line 904 of file PointEdgeWave.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), Foam::Info, Foam::nl, nPoints, and Foam::returnReduce().

Here is the call graph for this function:

◆ countPatchType()

Foam::label countPatchType ( ) const

Definition at line 290 of file PointEdgeWave.C.

References forAll, and nPatches.


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