94 const label ownEdgeI = own[edgei];
95 const label neiEdgeI = nei[edgei];
97 const Type deltaVsf(vsf[neiEdgeI] - vsf[ownEdgeI]);
99 lsGrad[ownEdgeI] += ownLs[edgei]*deltaVsf;
100 lsGrad[neiEdgeI] -= neiLs[edgei]*deltaVsf;
114 const auto& vsfp = tvsfp();
122 lsGrad[edgeFaces[pEdgei]] +=
123 ownLsp[pEdgei]*(vsfp[pEdgei] - vsf[edgeFaces[pEdgei]]);
const Mesh & mesh() const noexcept
Return const reference to mesh.
const dimensionSet & dimensions() const noexcept
Return dimensions.
Generic GeometricField class.
void correctBoundaryConditions()
Correct boundary field.
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 objectRegistry & db() const noexcept
Return the local objectRegistry.
const fileName & instance() const noexcept
Read access to instance path component.
static FOAM_NO_DANGLING_REFERENCE const leastSquaresFaVectors & New(const faMesh &mesh, Args &&... args)
Mesh data needed to do the Finite Area discretisation.
Generic dimensioned Type class.
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
virtual bool coupled() const
True if the patch field is coupled.
static const word & zeroGradientType() noexcept
The type name for zeroGradient patch fields.
faPatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cover...
virtual tmp< Field< Type > > patchNeighbourField() const
Return patchField on the opposite patch of a coupled patch.
static void correctBoundaryConditions(const GeometricField< Type, faPatchField, areaMesh > &, GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh > &)
Correct the boundary values of the gradient using the patchField.
const faMesh & mesh() const noexcept
Return mesh reference.
virtual tmp< GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh > > calcGrad(const GeometricField< Type, faPatchField, areaMesh > &vsf, const word &name) const
Return the gradient of the given field to the gradScheme::grad for optional caching.
Least-squares gradient scheme vectors for the Finite Area method.
const edgeVectorField & pVectors() const
Return reference to owner least square vectors.
const edgeVectorField & nVectors() const
Return 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.
A class for handling words, derived from Foam::string.
Namespace for finite-area.
GeometricField< vector, faePatchField, edgeMesh > edgeVectorField
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.
faePatchField< vector > faePatchVectorField
UList< label > labelUList
A UList of labels.
#define forAll(list, i)
Loop across all elements in list.