Go to the documentation of this file.
33 template<
class Stencil>
40 vectors_(
mesh.nCells())
42 calcLeastSquaresVectors();
48 template<
class Stencil>
55 template<
class Stencil>
76 for (label j = 1; j < lsvi.size(); ++j)
78 lsvi[j] = lsvi[j] - lsvi[0];
79 const scalar magSqrLsvi =
magSqr(lsvi[j]);
80 dd +=
sqr(lsvi[j])/magSqrLsvi;
81 lsvi[j] /= magSqrLsvi;
92 for (label j = 1; j < lsvi.size(); ++j)
94 lsvi[j] = dd & lsvi[j];
100 <<
"Finished calculating least square gradient vectors" <<
endl;
104 template<
class Stencil>
107 calcLeastSquaresVectors();
static constexpr const zero Zero
Global zero (0)
virtual bool movePoints()
Update the least square vectors when the mesh moves.
virtual ~LeastSquaresVectors()
Destructor.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void collectData(const GeometricField< Type, fvPatchField, volMesh > &fld, List< List< Type >> &stencilFld) const
Use map to get the data into stencil order.
#define forAll(list, i)
Loop across all elements in list.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
#define DebugInFunction
Report an information message using Foam::Info.
Mesh data needed to do the Finite Volume discretisation.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
#define DebugInfo
Report an information message using Foam::Info.
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
Least-squares gradient scheme vectors.
LeastSquaresVectors(const fvMesh &)
Construct given an fvMesh and the minimum determinant criterion.