Go to the documentation of this file.
67 #ifndef LeastSquaresGrad_H
68 #define LeastSquaresGrad_H
86 template<
class Type,
class Stencil>
87 class LeastSquaresGrad
89 public fv::gradScheme<Type>
100 LeastSquaresGrad(
const LeastSquaresGrad&) =
delete;
149 #define makeLeastSquaresGradTypeScheme(SS, STENCIL, TYPE) \
150 typedef Foam::fv::LeastSquaresGrad<Foam::TYPE, Foam::STENCIL> \
151 LeastSquaresGrad##TYPE##STENCIL##_; \
153 defineTemplateTypeNameAndDebugWithName \
154 (LeastSquaresGrad##TYPE##STENCIL##_, #SS, 0); \
160 typedef LeastSquaresGrad<Foam::TYPE, Foam::STENCIL> \
161 LeastSquaresGrad##TYPE##STENCIL##_; \
163 gradScheme<Foam::TYPE>::addIstreamConstructorToTable \
164 <LeastSquaresGrad<Foam::TYPE, Foam::STENCIL>> \
165 add##SS##STENCIL##TYPE##IstreamConstructorToTable_; \
169 #define makeLeastSquaresGradScheme(SS, STENCIL) \
170 typedef Foam::fv::LeastSquaresVectors<Foam::STENCIL> \
171 LeastSquaresVectors##STENCIL##_; \
173 defineTemplateTypeNameAndDebugWithName \
174 (LeastSquaresVectors##STENCIL##_, #SS, 0); \
176 makeLeastSquaresGradTypeScheme(SS,STENCIL,scalar) \
177 makeLeastSquaresGradTypeScheme(SS,STENCIL,vector)
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
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.
A class for handling words, derived from Foam::string.
A class for managing temporary objects.
Mesh data needed to do the Finite Volume discretisation.
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) >::type type
LeastSquaresGrad(const fvMesh &mesh, Istream &schemeData)
Construct from Istream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
word name(const complex &c)
Return string representation of complex.
const fvMesh & mesh() const
Return mesh reference.
TypeName("LeastSquares")
Runtime type information.
Abstract base class for gradient schemes.
Mesh data needed to do the Finite Volume discretisation.
Gradient calculated using weighted least-squares on an arbitrary stencil. The stencil type is provide...
Generic GeometricField class.