Go to the documentation of this file.
36 namespace cellCellStencils
54 label nD = donorCcs.size();
76 d[j] = donorCcs[j] -
sample;
80 if (
mag(d[j]) < ROOTVSMALL)
86 LSQw[j] = 1.0/
magSqr(d[j]);
113 for (label i = 0; i < 3; i++)
120 W -= Row[j]*LSQw[j]*dw[i];
124 if (
mag(W) < SMALL*
mag(saveDiag))
136 - ATAinvAT[0][j]*LSQw[j]*dw[0]
137 - ATAinvAT[1][j]*LSQw[j]*dw[1]
138 - ATAinvAT[2][j]*LSQw[j]*dw[2]
157 Foam::cellCellStencils::leastSquares::leastSquares
const Cmpt & x() const
Access to the vector x component.
Inverse-distance-weighted interpolation stencil.
static constexpr const zero Zero
Global zero (0)
static const Foam::dimensionedScalar A("", Foam::dimPressure, 611.21)
dimensioned< Type > T() const
Return transpose.
const Cmpt & z() const
Access to the vector z component.
#define forAll(list, i)
Loop across all elements in list.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
virtual ~leastSquares()
Destructor.
void setSize(const label n)
Alias for resize()
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
Mesh data needed to do the Finite Volume discretisation.
addToRunTimeSelectionTable(cellCellStencil, cellVolumeWeight, mesh)
const Cmpt & y() const
Access to the vector y component.
virtual void stencilWeights(const point &sample, const pointList &donorCcs, scalarList &weights) const
Calculate lsq weights for single acceptor.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Singular value decomposition of a rectangular matrix.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
defineTypeNameAndDebug(cellVolumeWeight, 0)
Minimal example by using system/controlDict.functions: