Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
inverseDistance Class Reference

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

Inheritance diagram for inverseDistance:
Inheritance graph
[legend]
Collaboration diagram for inverseDistance:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("inverseDistance")
 
 inverseDistance (const fvMesh &, const dictionary &, const bool)
 
virtual ~inverseDistance ()
 
virtual bool update ()
 
virtual const labelUListcellTypes () const
 
virtual const labelUListinterpolationCells () const
 
virtual const mapDistributecellInterpolationMap () const
 
virtual const labelListListcellStencil () const
 
virtual const scalarListListcellInterpolationWeights () const
 
virtual const scalarListcellInterpolationWeight () const
 
virtual void stencilWeights (const point &sample, const pointList &donorCcs, scalarList &weights) const
 
- Public Member Functions inherited from cellCellStencil
 TypeName ("cellCellStencil")
 
 declareRunTimeSelectionTable (autoPtr, cellCellStencil, mesh,(const fvMesh &mesh, const dictionary &dict, const bool update),(mesh, dict, update))
 
 cellCellStencil (const fvMesh &)
 
virtual ~cellCellStencil ()
 
virtual const wordHashSetnonInterpolatedFields () const
 
virtual wordHashSetnonInterpolatedFields ()
 
bool localStencil (const labelUList &) const
 
const labelIOListzoneID () const
 
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 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
 
bool betterDonor (const label destMesh, const label currentDonorMesh, const label newDonorMesh) const
 
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
 
void uncompactedRegionSplit (const fvMesh &mesh, const globalIndex &globalFaces, const label nZones, const labelList &zoneID, const labelList &cellTypes, const boolList &isBlockedFace, labelList &cellRegion) const
 
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
 
void seedCell (const label cellI, const scalar wantedFraction, bitSet &isFront, scalarField &fraction) const
 
void walkFront (const scalar layerRelax, const labelListList &allStencil, labelList &allCellTypes, scalarField &allWeight) const
 
virtual void createStencil (const globalIndex &)
 

Static Protected Member Functions

static label index (const labelVector &nDivs, const labelVector &)
 
static labelVector index3 (const labelVector &nDivs, const label)
 
static labelVector index3 (const boundBox &bb, const labelVector &nDivs, const point &pt)
 
static point position (const boundBox &bb, const labelVector &nDivs, const label boxI)
 
static void fill (PackedList< 2 > &elems, const boundBox &bb, const labelVector &nDivs, const boundBox &subBb, const unsigned int val)
 
static bool overlaps (const boundBox &bb, const labelVector &nDivs, const PackedList< 2 > &voxels, const treeBoundBox &subBb, const unsigned int val)
 
static void markBoundaries (const fvMesh &mesh, const vector &smallVec, const boundBox &bb, const labelVector &nDivs, PackedList< 2 > &patchTypes, const labelList &cellMap, labelList &patchCellTypes)
 
static treeBoundBox cellBb (const primitiveMesh &mesh, const label celli)
 
- Static Protected Member Functions inherited from cellCellStencil
static labelList count (const label size, const labelUList &lst)
 
template<class Type >
static tmp< volScalarFieldcreateField (const fvMesh &mesh, const word &name, const UList< Type > &)
 

Protected Attributes

const dictionary dict_
 
vector smallVec_
 
labelList cellTypes_
 
labelList interpolationCells_
 
autoPtr< mapDistributecellInterpolationMap_
 
labelListList cellStencil_
 
scalarListList cellInterpolationWeights_
 
volScalarField cellInterpolationWeight_
 
- Protected Attributes inherited from cellCellStencil
const fvMeshmesh_
 
wordHashSet nonInterpolatedFields_
 

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)
 
static const labelIOListzoneID (const fvMesh &)
 
static void globalCellCells (const globalIndex &gi, const polyMesh &mesh, const boolList &isValidDonor, const labelList &selectedCells, labelListList &cellCells, pointListList &cellCellCentres)
 
- Static Protected Attributes inherited from cellCellStencil
static const Enum< cellTypecellTypeNames_
 

Detailed Description

Inverse-distance-weighted interpolation stencil.

hole finding:

Source files

Definition at line 63 of file inverseDistanceCellCellStencil.H.

Constructor & Destructor Documentation

◆ inverseDistance()

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

Definition at line 1651 of file inverseDistanceCellCellStencil.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), forAll, Foam::Pout, IOobject::typeHeaderOk(), update(), and zoneID.

Here is the call graph for this function:

◆ ~inverseDistance()

~inverseDistance ( )
virtual

Definition at line 1731 of file inverseDistanceCellCellStencil.C.

Member Function Documentation

◆ index()

Foam::label index ( const labelVector nDivs,
const labelVector ijk 
)
staticprotected

Definition at line 53 of file inverseDistanceCellCellStencil.C.

◆ index3() [1/2]

Foam::labelVector index3 ( const labelVector nDivs,
const label  boxI 
)
staticprotected

Definition at line 63 of file inverseDistanceCellCellStencil.C.

References k.

◆ index3() [2/2]

Foam::labelVector index3 ( const boundBox bb,
const labelVector nDivs,
const point pt 
)
staticprotected

Definition at line 78 of file inverseDistanceCellCellStencil.C.

References boundBox::min(), and boundBox::span().

Here is the call graph for this function:

◆ position()

Foam::point position ( const boundBox bb,
const labelVector nDivs,
const label  boxI 
)
staticprotected

Definition at line 97 of file inverseDistanceCellCellStencil.C.

References boundBox::min(), and boundBox::span().

Here is the call graph for this function:

◆ fill()

void fill ( PackedList< 2 > &  elems,
const boundBox bb,
const labelVector nDivs,
const boundBox subBb,
const unsigned int  val 
)
staticprotected

Definition at line 114 of file inverseDistanceCellCellStencil.C.

References k, boundBox::max(), Foam::max(), boundBox::min(), and Foam::min().

Here is the call graph for this function:

◆ overlaps()

bool overlaps ( const boundBox bb,
const labelVector nDivs,
const PackedList< 2 > &  voxels,
const treeBoundBox subBb,
const unsigned int  val 
)
staticprotected

Definition at line 264 of file inverseDistanceCellCellStencil.C.

References k, boundBox::max(), Foam::max(), boundBox::min(), and Foam::min().

Here is the call graph for this function:

◆ markBoundaries()

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

◆ cellBb()

Foam::treeBoundBox cellBb ( const primitiveMesh mesh,
const label  celli 
)
staticprotected

Definition at line 230 of file inverseDistanceCellCellStencil.C.

References cells, f(), forAll, boundBox::max(), Foam::max(), mesh, boundBox::min(), Foam::min(), p, and points.

Here is the call graph for this function:

◆ markPatchesAsHoles()

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
protected

◆ betterDonor()

bool betterDonor ( const label  destMesh,
const label  currentDonorMesh,
const label  newDonorMesh 
) const
protected

Definition at line 434 of file inverseDistanceCellCellStencil.C.

References Foam::mag().

Here is the call graph for this function:

◆ markDonors()

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
protected

◆ uncompactedRegionSplit()

void uncompactedRegionSplit ( const fvMesh mesh,
const globalIndex globalFaces,
const label  nZones,
const labelList zoneID,
const labelList cellTypes,
const boolList isBlockedFace,
labelList cellRegion 
) const
protected

◆ compactedRegionSplit()

autoPtr<globalIndex> compactedRegionSplit ( const fvMesh mesh,
const globalIndex globalFaces,
labelList cellRegion 
) const
protected

◆ findHoles()

void findHoles ( const globalIndex globalCells,
const fvMesh mesh,
const labelList zoneID,
const labelListList stencil,
labelList cellTypes 
) const
protected

◆ seedCell()

void seedCell ( const label  cellI,
const scalar  wantedFraction,
bitSet isFront,
scalarField fraction 
) const
protected

Definition at line 1220 of file inverseDistanceCellCellStencil.C.

References forAll, and bitSet::set().

Here is the call graph for this function:

◆ walkFront()

void walkFront ( const scalar  layerRelax,
const labelListList allStencil,
labelList allCellTypes,
scalarField allWeight 
) const
protected

◆ createStencil()

void createStencil ( const globalIndex globalCells)
protectedvirtual

Definition at line 1463 of file inverseDistanceCellCellStencil.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, nSamples(), Foam::returnReduce(), samples(), bitSet::set(), and List::transfer().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "inverseDistance"  )

◆ update()

bool update ( )
virtual

◆ cellTypes()

virtual const labelUList& cellTypes ( ) const
inlinevirtual

Implements cellCellStencil.

Definition at line 288 of file inverseDistanceCellCellStencil.H.

References inverseDistance::cellTypes_.

◆ interpolationCells()

virtual const labelUList& interpolationCells ( ) const
inlinevirtual

◆ cellInterpolationMap()

virtual const mapDistribute& cellInterpolationMap ( ) const
inlinevirtual

Implements cellCellStencil.

Definition at line 300 of file inverseDistanceCellCellStencil.H.

References inverseDistance::cellInterpolationMap_, and inverseDistance::update().

Here is the call graph for this function:

◆ cellStencil()

virtual const labelListList& cellStencil ( ) const
inlinevirtual

Implements cellCellStencil.

Definition at line 311 of file inverseDistanceCellCellStencil.H.

References inverseDistance::cellStencil_.

◆ cellInterpolationWeights()

virtual const scalarListList& cellInterpolationWeights ( ) const
inlinevirtual

◆ cellInterpolationWeight()

virtual const scalarList& cellInterpolationWeight ( ) const
inlinevirtual

◆ stencilWeights()

void stencilWeights ( const point sample,
const pointList donorCcs,
scalarList weights 
) const
virtual

Implements cellCellStencil.

Reimplemented in leastSquares.

Definition at line 1428 of file inverseDistanceCellCellStencil.C.

References forAll, Foam::mag(), List::setSize(), and Foam::sum().

Here is the call graph for this function:

Member Data Documentation

◆ dict_

const dictionary dict_
protected

Definition at line 72 of file inverseDistanceCellCellStencil.H.

◆ smallVec_

vector smallVec_
protected

Definition at line 75 of file inverseDistanceCellCellStencil.H.

◆ cellTypes_

labelList cellTypes_
protected

Definition at line 78 of file inverseDistanceCellCellStencil.H.

Referenced by inverseDistance::cellTypes().

◆ interpolationCells_

labelList interpolationCells_
protected

◆ cellInterpolationMap_

autoPtr<mapDistribute> cellInterpolationMap_
protected

◆ cellStencil_

labelListList cellStencil_
protected

Definition at line 87 of file inverseDistanceCellCellStencil.H.

Referenced by inverseDistance::cellStencil().

◆ cellInterpolationWeights_

scalarListList cellInterpolationWeights_
protected

◆ cellInterpolationWeight_

volScalarField cellInterpolationWeight_
protected

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