68#ifndef LeastSquaresGrad_H
69#define LeastSquaresGrad_H
87template<
class Type,
class Stencil>
90 public fv::gradScheme<Type>
101 LeastSquaresGrad(
const LeastSquaresGrad&) =
delete;
104 void operator=(
const LeastSquaresGrad&) =
delete;
118 gradScheme<Type>(
mesh)
158#define makeLeastSquaresGradTypeScheme(SS, STENCIL, TYPE) \
159 typedef Foam::fv::LeastSquaresGrad<Foam::TYPE, Foam::STENCIL> \
160 LeastSquaresGrad##TYPE##STENCIL##_; \
162 defineTemplateTypeNameAndDebugWithName \
163 (LeastSquaresGrad##TYPE##STENCIL##_, #SS, 0); \
169 typedef LeastSquaresGrad<Foam::TYPE, Foam::STENCIL> \
170 LeastSquaresGrad##TYPE##STENCIL##_; \
172 gradScheme<Foam::TYPE>::addIstreamConstructorToTable \
173 <LeastSquaresGrad<Foam::TYPE, Foam::STENCIL>> \
174 add##SS##STENCIL##TYPE##IstreamConstructorToTable_; \
178#define makeLeastSquaresGradScheme(SS, STENCIL) \
179 typedef Foam::fv::LeastSquaresVectors<Foam::STENCIL> \
180 LeastSquaresVectors##STENCIL##_; \
182 defineTemplateTypeNameAndDebugWithName \
183 (LeastSquaresVectors##STENCIL##_, #SS, 0); \
185 makeLeastSquaresGradTypeScheme(SS,STENCIL,scalar) \
186 makeLeastSquaresGradTypeScheme(SS,STENCIL,vector)
Generic GeometricField class.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Mesh data needed to do the Finite Volume discretisation.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Gradient calculated using weighted least-squares on an arbitrary stencil. The stencil type is provide...
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.
LeastSquaresGrad(const fvMesh &mesh, Istream &schemeData)
Construct from Istream.
virtual void calcGrad(GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > &res, const GeometricField< Type, fvPatchField, volMesh > &) const
Calculate the grad of the given field into supplied field.
TypeName("LeastSquares")
Runtime type information.
Abstract base class for gradient schemes.
const fvMesh & mesh() const
Return const reference to mesh.
typeOfRank< typenamepTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank)>::type type
A class for managing temporary objects.
Mesh data needed to do the Finite Volume discretisation.
A class for handling words, derived from Foam::string.
Namespace for finite-volume.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.