trackingInverseDistance Class Reference

Inverse-distance-weighted interpolation stencil. More...

Inheritance diagram for trackingInverseDistance:
[legend]
Collaboration diagram for trackingInverseDistance:
[legend]

Public Member Functions

 TypeName ("trackingInverseDistance")
 Runtime type information. More...
 
 trackingInverseDistance (const fvMesh &, const dictionary &, const bool)
 Construct from fvMesh. More...
 
virtual ~trackingInverseDistance ()
 Destructor. More...
 
virtual bool update ()
 Update stencils. Return false if nothing changed. More...
 
- Public Member Functions inherited from inverseDistance
 TypeName ("inverseDistance")
 Runtime type information. More...
 
 inverseDistance (const fvMesh &, const dictionary &, const bool)
 Construct from fvMesh. More...
 
virtual ~inverseDistance ()
 Destructor. More...
 
virtual bool update ()
 Update stencils. Return false if nothing changed. More...
 
virtual const labelUListcellTypes () const
 Return the cell type list. More...
 
virtual const labelUListinterpolationCells () const
 Indices of interpolated cells. More...
 
virtual const mapDistributecellInterpolationMap () const
 Return a communication schedule. More...
 
virtual const labelListListcellStencil () const
 Per interpolated cell the neighbour cells (in terms of slots as. More...
 
virtual const scalarListListcellInterpolationWeights () const
 Weights for cellStencil. More...
 
virtual const scalarListcellInterpolationWeight () const
 Per interpolated cell the interpolation factor. (0 = use. More...
 
virtual void stencilWeights (const point &sample, const pointList &donorCcs, scalarList &weights) const
 Calculate inverse distance weights for a single acceptor. More...
 
- Public Member Functions inherited from cellCellStencil
 TypeName ("cellCellStencil")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, cellCellStencil, mesh,(const fvMesh &mesh, const dictionary &dict, const bool update),(mesh, dict, update))
 
 cellCellStencil (const fvMesh &)
 Construct from fvMesh. More...
 
virtual ~cellCellStencil ()
 Destructor. More...
 
virtual bool update ()=0
 Update stencils. Return false if nothing changed. More...
 
virtual const labelUListcellTypes () const =0
 Return the cell type list. More...
 
virtual const labelUListinterpolationCells () const =0
 Indices of interpolated cells. More...
 
virtual const mapDistributecellInterpolationMap () const =0
 Return a communication schedule. More...
 
virtual const labelListListcellStencil () const =0
 Per interpolated cell the neighbour cells (in terms of slots as. More...
 
virtual const List< scalarList > & cellInterpolationWeights () const =0
 Weights for cellStencil. More...
 
virtual const scalarListcellInterpolationWeight () const =0
 Per interpolated cell the interpolation factor. (0 = use. More...
 
virtual void stencilWeights (const point &sample, const pointList &donorCcs, scalarList &weights) const =0
 Calculate weights for a single acceptor. More...
 
virtual const wordHashSetnonInterpolatedFields () const
 Return the names of any (stencil or mesh specific) fields that. More...
 
virtual wordHashSetnonInterpolatedFields ()
 Return non-const non-interpolating fields. More...
 
bool localStencil (const labelUList &) const
 Helper: is stencil fully local. More...
 
const labelIOListzoneID () const
 Helper: get reference to registered zoneID. Loads volScalarField. More...
 
template<class Type >
Foam::tmp< Foam::volScalarFieldcreateField (const fvMesh &mesh, const word &name, const UList< Type > &psi)
 

Protected Member Functions

void markPatchesAsHoles (PstreamBuffers &pBufs, const List< treeBoundBoxList > &patchBb, const List< labelVector > &patchDivisions, const PtrList< PackedList< 2 > > &patchParts, const label srcI, const label tgtI, labelList &allCellTypes) const
 Mark all cells overlapping (a voxel covered by) a src patch. More...
 
void markDonors (PstreamBuffers &pBufs, const List< treeBoundBoxList > &meshBb, const PtrList< voxelMeshSearch > &meshSearches, const labelList &allCellTypes, const label srcI, const label tgtI, labelListList &allStencil, labelList &allDonor) const
 
- Protected Member Functions inherited from inverseDistance
void markPatchesAsHoles (PstreamBuffers &pBufs, const PtrList< fvMeshSubset > &meshParts, const List< treeBoundBoxList > &patchBb, const List< labelVector > &patchDivisions, const PtrList< PackedList< 2 > > &patchParts, const label srcI, const label tgtI, labelList &allCellTypes) const
 Mark all cells overlapping (a voxel covered by) a src patch. More...
 
bool betterDonor (const label destMesh, const label currentDonorMesh, const label newDonorMesh) const
 If multiple donors meshes: decide which is best. More...
 
void markDonors (const globalIndex &globalCells, PstreamBuffers &pBufs, const PtrList< fvMeshSubset > &meshParts, const List< treeBoundBoxList > &meshBb, const labelList &allCellTypes, const label srcI, const label tgtI, labelListList &allStencil, labelList &allDonor) const
 Determine donors for all tgt cells. More...
 
void uncompactedRegionSplit (const fvMesh &mesh, const globalIndex &globalFaces, const label nZones, const labelList &zoneID, const labelList &cellTypes, const boolList &isBlockedFace, labelList &cellRegion) const
 Replacement of regionSplit. More...
 
autoPtr< globalIndexcompactedRegionSplit (const fvMesh &mesh, const globalIndex &globalFaces, labelList &cellRegion) const
 
void findHoles (const globalIndex &globalCells, const fvMesh &mesh, const labelList &zoneID, const labelListList &stencil, labelList &cellTypes) const
 Do flood filling to detect unreachable (from patches) sections. More...
 
void seedCell (const label cellI, const scalar wantedFraction, bitSet &isFront, scalarField &fraction) const
 Seed faces of cell with wantedFraction (if higher than current) More...
 
void walkFront (const scalar layerRelax, const labelListList &allStencil, labelList &allCellTypes, scalarField &allWeight) const
 Surround holes with layer(s) of interpolated cells. More...
 
virtual void createStencil (const globalIndex &)
 Create stencil starting from the donor containing the acceptor. More...
 

Static Protected Member Functions

static bool markBoundaries (const fvMesh &mesh, const vector &smallVec, const boundBox &bb, labelVector &nDivs, PackedList< 2 > &patchTypes, const labelList &cellMap, labelList &patchCellTypes)
 Mark voxels of patchTypes with type of patch face. More...
 
- Static Protected Member Functions inherited from inverseDistance
static label index (const labelVector &nDivs, const labelVector &)
 Convert ijk indices into single index. More...
 
static labelVector index3 (const labelVector &nDivs, const label)
 Convert single index into ijk. More...
 
static labelVector index3 (const boundBox &bb, const labelVector &nDivs, const point &pt)
 Convert coordinate into ijk. More...
 
static point position (const boundBox &bb, const labelVector &nDivs, const label boxI)
 Convert index back into coordinate. More...
 
static void fill (PackedList< 2 > &elems, const boundBox &bb, const labelVector &nDivs, const boundBox &subBb, const unsigned int val)
 Fill all elements overlapping subBb with value val. More...
 
static bool overlaps (const boundBox &bb, const labelVector &nDivs, const PackedList< 2 > &voxels, const treeBoundBox &subBb, const unsigned int val)
 Is any voxel inside subBb set to val. More...
 
static void markBoundaries (const fvMesh &mesh, const vector &smallVec, const boundBox &bb, const labelVector &nDivs, PackedList< 2 > &patchTypes, const labelList &cellMap, labelList &patchCellTypes)
 Mark voxels of patchTypes with type of patch face. More...
 
static treeBoundBox cellBb (const primitiveMesh &mesh, const label celli)
 Calculate bounding box of cell. More...
 
- Static Protected Member Functions inherited from cellCellStencil
static labelList count (const label size, const labelUList &lst)
 Count occurrences (in parallel) More...
 
template<class Type >
static tmp< volScalarFieldcreateField (const fvMesh &mesh, const word &name, const UList< Type > &)
 Helper: create volScalarField for postprocessing. More...
 

Protected Attributes

globalIndex globalCells_
 Global indexing for cells. More...
 
labelList globalDonor_
 Current (global) donor cell. More...
 
PtrList< fvMeshSubsetmeshParts_
 Subset according to zone. More...
 
- Protected Attributes inherited from inverseDistance
const dictionary dict_
 Dictionary of motion control parameters. More...
 
vector smallVec_
 Small perturbation vector for geometric tests. More...
 
labelList cellTypes_
 Per cell the cell type. More...
 
labelList interpolationCells_
 Indices of interpolated cells. More...
 
autoPtr< mapDistributecellInterpolationMap_
 Fetch interpolated cells. More...
 
labelListList cellStencil_
 Interpolation stencil. More...
 
scalarListList cellInterpolationWeights_
 Interpolation weights. More...
 
volScalarField cellInterpolationWeight_
 Amount of interpolation. More...
 
- Protected Attributes inherited from cellCellStencil
const fvMeshmesh_
 Reference to the mesh. More...
 
wordHashSet nonInterpolatedFields_
 Set of fields that should not be interpolated. More...
 

Additional Inherited Members

- Public Types inherited from cellCellStencil
enum  patchCellType { OTHER = 0 , PATCH = 1 , OVERSET = 2 }
 
enum  cellType { CALCULATED = 0 , INTERPOLATED = 1 , HOLE = 2 }
 
- Static Public Member Functions inherited from cellCellStencil
static autoPtr< cellCellStencilNew (const fvMesh &, const dictionary &dict, const bool update=true)
 New function which constructs and returns pointer to a. More...
 
static const labelIOListzoneID (const fvMesh &)
 Helper: get reference to registered zoneID. Loads volScalarField. More...
 
static void globalCellCells (const globalIndex &gi, const polyMesh &mesh, const boolList &isValidDonor, const labelList &selectedCells, labelListList &cellCells, pointListList &cellCellCentres)
 Helper: create cell-cell addressing in global numbering. More...
 
- Static Protected Attributes inherited from cellCellStencil
static const Enum< cellTypecellTypeNames_
 Mode type names. More...
 

Detailed Description

Inverse-distance-weighted interpolation stencil.

Source files

Definition at line 56 of file trackingInverseDistanceCellCellStencil.H.

Constructor & Destructor Documentation

◆ trackingInverseDistance()

trackingInverseDistance ( const fvMesh mesh,
const dictionary dict,
const bool  doUpdate 
)

◆ ~trackingInverseDistance()

Destructor.

Definition at line 562 of file trackingInverseDistanceCellCellStencil.C.

Member Function Documentation

◆ markBoundaries()

bool markBoundaries ( const fvMesh mesh,
const vector smallVec,
const boundBox bb,
labelVector nDivs,
PackedList< 2 > &  patchTypes,
const labelList cellMap,
labelList patchCellTypes 
)
staticprotected

◆ markPatchesAsHoles()

void markPatchesAsHoles ( PstreamBuffers pBufs,
const List< treeBoundBoxList > &  patchBb,
const List< labelVector > &  patchDivisions,
const PtrList< PackedList< 2 > > &  patchParts,
const label  srcI,
const label  tgtI,
labelList allCellTypes 
) const
protected

Mark all cells overlapping (a voxel covered by) a src patch.

with type HOLE

Definition at line 196 of file trackingInverseDistanceCellCellStencil.C.

References PstreamBuffers::allProcs(), PstreamBuffers::clear(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, PstreamBuffers::finishedSends(), forAll, boundBox::max(), boundBox::min(), processorFaPatch::myProcNo(), os(), PDRparams::overlaps, and treeBoundBox::overlaps().

Here is the call graph for this function:

◆ markDonors()

void markDonors ( PstreamBuffers pBufs,
const List< treeBoundBoxList > &  meshBb,
const PtrList< voxelMeshSearch > &  meshSearches,
const labelList allCellTypes,
const label  srcI,
const label  tgtI,
labelListList allStencil,
labelList allDonor 
) const
protected

◆ TypeName()

TypeName ( "trackingInverseDistance"  )

Runtime type information.

◆ update()

bool update ( )
virtual

Update stencils. Return false if nothing changed.

Reimplemented from inverseDistance.

Definition at line 568 of file trackingInverseDistanceCellCellStencil.C.

References Pstream::allGatherList(), DynamicList< T, SizeMin >::append(), GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), List< T >::clear(), Foam::cmptProduct(), GeometricField< Type, PatchField, GeoMesh >::correctBoundaryConditions(), DebugInfo, Foam::decrIndent(), Foam::dimless, e, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, forAll, FUNCTION_NAME, Foam::incrIndent(), Foam::indent(), Foam::Info, GeometricField< Type, PatchField, GeoMesh >::internalField(), meshBb(), boundBox::min(), Foam::mkDir(), fvMesh::movePoints(), processorFaPatch::myProcNo(), OFstream::name(), Foam::name(), Foam::nl, IOobject::NO_READ, IOobject::NO_WRITE, UPstream::nonBlocking, primitiveMesh::nPoints(), PstreamBuffers::nProcs(), nZones, IOobject::objectPath(), polyMesh::points(), Foam::Pout, Foam::reduce(), Foam::returnReduce(), PtrList< T >::set(), List< T >::setSize(), PtrList< T >::setSize(), UPtrList< T >::size(), UList< T >::size(), boundBox::span(), List< T >::transfer(), regIOobject::write(), OBJstream::write(), Ostream::write(), Foam::Zero, and zoneID.

Referenced by trackingInverseDistance::trackingInverseDistance().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ globalCells_

globalIndex globalCells_
protected

Global indexing for cells.

Definition at line 65 of file trackingInverseDistanceCellCellStencil.H.

◆ globalDonor_

labelList globalDonor_
protected

Current (global) donor cell.

Definition at line 68 of file trackingInverseDistanceCellCellStencil.H.

Referenced by trackingInverseDistance::trackingInverseDistance().

◆ meshParts_

PtrList<fvMeshSubset> meshParts_
protected

Subset according to zone.

Definition at line 71 of file trackingInverseDistanceCellCellStencil.H.

Referenced by trackingInverseDistance::trackingInverseDistance().


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