33template<
class Stencil>
40 vectors_(
mesh.nCells())
42 calcLeastSquaresVectors();
48template<
class Stencil>
55template<
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;
104template<
class Stencil>
107 calcLeastSquaresVectors();
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
void size(const label n)
Older name for setAddressableSize.
void collectData(const GeometricField< Type, fvPatchField, volMesh > &fld, List< List< Type > > &stencilFld) const
Use map to get the data into stencil order.
Mesh data needed to do the Finite Volume discretisation.
Least-squares gradient scheme vectors.
virtual bool movePoints()
Update the least square vectors when the mesh moves.
virtual ~LeastSquaresVectors()
Destructor.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
#define DebugInfo
Report an information message using Foam::Info.
#define DebugInFunction
Report an information message using Foam::Info.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.