38template<
class Type,
class Stencil>
74 flatVtf[celli] = vtf[celli];
84 -
mesh.nInternalFaces()
89 flatVtf[nCompact++] = ptf[i];
100 const labelList& compactCells = stencilAddr[celli];
105 lsGradIf[celli] += lsvc[i]*flatVtf[compactCells[i]];
110 lsGrad.correctBoundaryConditions();
115template<
class Type,
class Stencil>
153 GradFieldType& lsGrad = tlsGrad.
ref();
const Mesh & mesh() const noexcept
Return const reference to mesh.
const dimensionSet & dimensions() const noexcept
Return dimensions.
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Generic GeometricField class.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const fileName & instance() const noexcept
Read access to instance path component.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static FOAM_NO_DANGLING_REFERENCE const LeastSquaresVectors< Stencil > & New(const fvMesh &mesh, Args &&... args)
Generic dimensioned Type class.
const mapDistribute & map() const
Return reference to the parallel distribution map.
const labelListList & stencil() const
Return reference to the stencil.
Mesh data needed to do the Finite Volume discretisation.
const fvPatch & patch() const noexcept
Return the patch.
static const word & extrapolatedCalculatedType() noexcept
The type name for extrapolatedCalculated patch fields combines zero-gradient and calculated.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
label start() const noexcept
The patch start within the polyMesh face list.
virtual tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > calcGrad(const GeometricField< Type, fvPatchField, volMesh > &vsf, const word &name) const
Return the gradient of the given field to the gradScheme::grad for optional caching.
Least-squares gradient scheme vectors.
const extendedCentredCellToCellStencil & stencil() const
Return const reference to the stencil.
const List< List< vector > > & vectors() const
Return const reference to the least square vectors.
static void correctBoundaryConditions(const GeometricField< Type, fvPatchField, volMesh > &, GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > &)
Correct the boundary values of the gradient using the patchField snGrad functions.
const fvMesh & mesh() const
Return const reference to mesh.
label constructSize() const noexcept
Constructed data size.
void distribute(List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Distribute List data using default commsType, default flip/negate operator.
typeOfRank< typenamepTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank)>::type type
A class for managing temporary objects.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
Mesh data needed to do the Finite Volume discretisation.
A class for handling words, derived from Foam::string.
List< label > labelList
A List of labels.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
static constexpr const zero Zero
Global zero (0).
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
#define forAll(list, i)
Loop across all elements in list.