62 #ifndef LeastSquaresGrad_H
63 #define LeastSquaresGrad_H
81 template<
class Type,
class Stencil>
82 class LeastSquaresGrad
84 public fv::gradScheme<Type>
141 #define makeLeastSquaresGradTypeScheme(SS, STENCIL, TYPE) \
142 typedef Foam::fv::LeastSquaresGrad<Foam::TYPE, Foam::STENCIL> \
143 LeastSquaresGrad##TYPE##STENCIL##_; \
145 defineTemplateTypeNameAndDebugWithName \
146 (LeastSquaresGrad##TYPE##STENCIL##_, #SS, 0); \
152 typedef LeastSquaresGrad<Foam::TYPE, Foam::STENCIL> \
153 LeastSquaresGrad##TYPE##STENCIL##_; \
155 gradScheme<Foam::TYPE>::addIstreamConstructorToTable \
156 <LeastSquaresGrad<Foam::TYPE, Foam::STENCIL>> \
157 add##SS##STENCIL##TYPE##IstreamConstructorToTable_; \
161 #define makeLeastSquaresGradScheme(SS, STENCIL) \
162 typedef Foam::fv::LeastSquaresVectors<Foam::STENCIL> \
163 LeastSquaresVectors##STENCIL##_; \
165 defineTemplateTypeNameAndDebugWithName \
166 (LeastSquaresVectors##STENCIL##_, #SS, 0); \
168 makeLeastSquaresGradTypeScheme(SS,STENCIL,scalar) \
169 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.
Gradient calculated using weighted least-squares on an arbitrary stencil. The stencil type is provide...
void operator=(const LeastSquaresGrad &)=delete
Disallow default bitwise assignment.
LeastSquaresGrad(const fvMesh &mesh, Istream &schemeData)
Construct from Istream.
virtual tmp< VolField< typename outerProduct< vector, Type >::type > > calcGrad(const VolField< Type > &vsf, const word &name) const
Return the gradient of the given field to the gradScheme::grad.
TypeName("LeastSquares")
Runtime type information.
Abstract base class for gradient schemes.
const fvMesh & mesh() const
Return mesh reference.
A class for managing temporary objects.
A class for handling words, derived from string.
word name(const bool)
Return a word representation of a bool.