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();
void size(const label n)
Older name for setAddressableSize.
virtual bool movePoints()
Update the least square vectors when the mesh moves.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
virtual ~LeastSquaresVectors()
Destructor.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define forAll(list, i)
Loop across all elements in list.
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
void collectData(const GeometricField< Type, fvPatchField, volMesh > &fld, List< List< Type >> &stencilFld) const
Use map to get the data into stencil order.
#define DebugInFunction
Report an information message using Foam::Info.
LeastSquaresVectors(const fvMesh &)
Construct given an fvMesh and the minimum determinant criterion.
#define DebugInfo
Report an information message using Foam::Info.
Templated 3D Vector derived from VectorSpace adding construction from 3 components, element access using x(), y() and z() member functions and the inner-product (dot-product) and cross-product operators.
Mesh data needed to do the Finite Volume discretisation.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
Least-squares gradient scheme vectors.
static constexpr const zero Zero
Global zero (0)