Go to the documentation of this file.
63 #ifndef LeastSquaresGrad_H
64 #define LeastSquaresGrad_H
82 template<
class Type,
class Stencil>
83 class LeastSquaresGrad
85 public fv::gradScheme<Type>
145 #define makeLeastSquaresGradTypeScheme(SS, STENCIL, TYPE) \
146 typedef Foam::fv::LeastSquaresGrad<Foam::TYPE, Foam::STENCIL> \
147 LeastSquaresGrad##TYPE##STENCIL##_; \
149 defineTemplateTypeNameAndDebugWithName \
150 (LeastSquaresGrad##TYPE##STENCIL##_, #SS, 0); \
156 typedef LeastSquaresGrad<Foam::TYPE, Foam::STENCIL> \
157 LeastSquaresGrad##TYPE##STENCIL##_; \
159 gradScheme<Foam::TYPE>::addIstreamConstructorToTable \
160 <LeastSquaresGrad<Foam::TYPE, Foam::STENCIL> > \
161 add##SS##STENCIL##TYPE##IstreamConstructorToTable_; \
165 #define makeLeastSquaresGradScheme(SS, STENCIL) \
166 typedef Foam::fv::LeastSquaresVectors<Foam::STENCIL> \
167 LeastSquaresVectors##STENCIL##_; \
169 defineTemplateTypeNameAndDebugWithName \
170 (LeastSquaresVectors##STENCIL##_, #SS, 0); \
172 makeLeastSquaresGradTypeScheme(SS,STENCIL,scalar) \
173 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 string.
A class for managing temporary objects.
Mesh data needed to do the Finite Volume discretisation.
LeastSquaresGrad(const fvMesh &mesh, Istream &schemeData)
Construct from Istream.
typeOfRank< typename pTraits< arg1 >::cmptType, int(pTraits< arg1 >::rank)+int(pTraits< arg2 >::rank) >::type type
scalar minDet_
Minimum determinant criterion to choose extra cells.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
const fvMesh & mesh() const
Return mesh reference.
TypeName("LeastSquares")
Runtime type information.
Abstract base class for gradient schemes.
LeastSquaresGrad(const LeastSquaresGrad &)
Disallow default bitwise copy construct.
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 &)
Disallow default bitwise assignment.
Generic GeometricField class.
word name(const complex &)
Return a string representation of a complex.