Public Member Functions | List of all members
leastSquares Class Reference

Least-squares-weighted interpolation stencil. More...

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

Public Member Functions

 TypeName ("leastSquares")
 
 leastSquares (const fvMesh &, const dictionary &, const bool)
 
virtual ~leastSquares ()
 
virtual void stencilWeights (const point &sample, const pointList &donorCcs, scalarList &weights) const
 
- Public Member Functions inherited from inverseDistance
 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
 
- 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)
 

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)
 
- 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
 
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 inherited from inverseDistance
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 inherited from inverseDistance
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_
 
- Static Protected Attributes inherited from cellCellStencil
static const Enum< cellTypecellTypeNames_
 

Detailed Description

Least-squares-weighted interpolation stencil.

Base machinery is similar to inverse distance interpolation stencil but weights minimize error in LSQ sense recovering exact solution for linear solution problems. Gradient and values are found simultaneously.

Source files

Definition at line 54 of file leastSquaresCellCellStencil.H.

Constructor & Destructor Documentation

◆ leastSquares()

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

Definition at line 151 of file leastSquaresCellCellStencil.C.

References update().

Here is the call graph for this function:

◆ ~leastSquares()

~leastSquares ( )
virtual

Definition at line 168 of file leastSquaresCellCellStencil.C.

Member Function Documentation

◆ TypeName()

TypeName ( "leastSquares"  )

◆ stencilWeights()

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

Reimplemented from inverseDistance.

Definition at line 39 of file leastSquaresCellCellStencil.C.

References A, forAll, Foam::mag(), Foam::magSqr(), List::setSize(), dimensioned::T(), SVD::VSinvUt(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), Vector< Cmpt >::z(), and Foam::Zero.

Here is the call graph for this function:

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