78 GradFieldType& lsGrad = tlsGrad.
ref();
91 const label ownFacei = own[facei];
92 const label neiFacei = nei[facei];
94 const Type deltaVsf(vsf[neiFacei] - vsf[ownFacei]);
96 lsGrad[ownFacei] += ownLs[facei]*deltaVsf;
97 lsGrad[neiFacei] -= neiLs[facei]*deltaVsf;
115 forAll(neiVsf, patchFacei)
118 patchOwnLs[patchFacei]
119 *(neiVsf[patchFacei] - vsf[
faceCells[patchFacei]]);
126 forAll(patchVsf, patchFacei)
129 patchOwnLs[patchFacei]
130 *(patchVsf[patchFacei] - vsf[
faceCells[patchFacei]]);
136 lsGrad.correctBoundaryConditions();
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.
static FOAM_NO_DANGLING_REFERENCE const leastSquaresVectors & New(const fvMesh &mesh, Args &&... args)
Generic dimensioned Type class.
Smooth ATC in cells next to a set of patches supplied by type.
Mesh data needed to do the Finite Volume discretisation.
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...
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.
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 surfaceVectorField & pVectors() const
Return const reference to owner least square vectors.
const surfaceVectorField & nVectors() const
Return const reference to neighbour least square vectors.
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.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
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.
UList< label > labelUList
A UList of labels.
fvsPatchField< vector > fvsPatchVectorField
#define forAll(list, i)
Loop across all elements in list.