OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

PointEdgeWave< Type > Class Template Reference

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

Collaboration diagram for PointEdgeWave< Type >:

List of all members.


Public Member Functions

 PointEdgeWave (const polyMesh &mesh, const labelList &initialPoints, const List< Type > &initialPointsInfo, List< Type > &allPointInfo, List< Type > &allEdgeInfo, const label maxIter)
 Construct from mesh, list of changed points with the Type.
 ~PointEdgeWave ()
const List< Type > & allPointInfo () const
 Get allPointInfo.
const List< Type > & allEdgeInfo () const
 Get allEdgeInfo.
label getUnsetEdges () const
 Get number of unvisited edges, i.e. edges that were not (yet).
label getUnsetPoints () const
void setPointInfo (const labelList &changedPoints, const List< Type > &changedPointsInfo)
 Copy initial data into allPointInfo_.
label pointToEdge ()
 Propagate from point to edge. Returns total number of edges.
label edgeToPoint ()
 Propagate from edge to point. Returns total number of points.
label iterate (const label maxIter)
 Iterate until no changes or maxIter reached. Returns actual.

Static Public Member Functions

static scalar propagationTol ()
 Access to tolerance.
static void setPropagationTol (const scalar tol)
 Change tolerance.

Detailed Description

template<class Type>
class Foam::PointEdgeWave< Type >

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

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 85 of file PointEdgeWave.H.


Constructor & Destructor Documentation

PointEdgeWave ( const polyMesh &  mesh,
const labelList &  initialPoints,
const List< Type > &  initialPointsInfo,
List< Type > &  allPointInfo,
List< Type > &  allEdgeInfo,
const label  maxIter 
) [inline]

Construct from mesh, list of changed points with the Type.

for these points. Gets work arrays to operate on, one of size number of mesh points, the other number of mesh edges. Iterates until nothing changes or maxIter reached. (maxIter can be 0)

Definition at line 677 of file PointEdgeWave.C.

~PointEdgeWave (  )  [inline]

Definition at line 768 of file PointEdgeWave.C.


Member Function Documentation

static scalar propagationTol (  )  [inline, static]

Access to tolerance.

Definition at line 254 of file PointEdgeWave.H.

static void setPropagationTol ( const scalar  tol  )  [inline, static]

Change tolerance.

Definition at line 260 of file PointEdgeWave.H.

const List<Type>& allPointInfo (  )  const [inline]

Get allPointInfo.

Definition at line 295 of file PointEdgeWave.H.

const List<Type>& allEdgeInfo (  )  const [inline]

Get allEdgeInfo.

Definition at line 301 of file PointEdgeWave.H.

Foam::label getUnsetEdges (  )  const [inline]

Get number of unvisited edges, i.e. edges that were not (yet).

reached from walking across mesh. This can happen from

  • not enough iterations done
  • a disconnected mesh
  • a mesh without walls in it

Definition at line 783 of file PointEdgeWave.C.

Foam::label getUnsetPoints (  )  const [inline]

Definition at line 776 of file PointEdgeWave.C.

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

Copy initial data into allPointInfo_.

Definition at line 792 of file PointEdgeWave.C.

Foam::label pointToEdge (  )  [inline]

Propagate from point to edge. Returns total number of edges.

(over all processors) changed.

Definition at line 902 of file PointEdgeWave.C.

Foam::label edgeToPoint (  )  [inline]

Propagate from edge to point. Returns total number of points.

(over all processors) changed.

Definition at line 825 of file PointEdgeWave.C.

Foam::label iterate ( const label  maxIter  )  [inline]

Iterate until no changes or maxIter reached. Returns actual.

number of iterations.

Definition at line 971 of file PointEdgeWave.C.


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd