Loading...
Searching...
No Matches
leastSquaresFaGrad.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2016-2017 Wikki Ltd
9 Copyright (C) 2023 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::fa::leastSquaresFaGrad
29
30Description
31 Second-order gradient scheme using least-squares.
32
33Author
34 Hrvoje Jasak, Wikki Ltd.
35
36SourceFiles
37 leastSquaresFaGrad.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef leastSquaresFaGrad_H
42#define leastSquaresFaGrad_H
43
44#include "faGradScheme.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50
51// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52
53namespace fa
54{
55
56/*---------------------------------------------------------------------------*\
57 Class leastSquaresFaGrad Declaration\*-------------------
58\*---------------------------------------------------------------------------*/
59
60template<class Type>
62:
63 public fa::gradScheme<Type>
64{
65public:
66
67 //- Runtime type information
68 TypeName("leastSquares");
69
70
71 // Generated Methods
72
73 //- No copy construct
75
76 //- No copy assignment
77 void operator=(const leastSquaresFaGrad&) = delete;
79
80 // Constructors
81
82 //- Construct from mesh
84 :
85 gradScheme<Type>(mesh)
86 {}
87
88 //- Construct from Istream
90 :
91 gradScheme<Type>(mesh)
92 {}
93
95 // Member Functions
96
97 //- Return the gradient of the given field to the
98 //- gradScheme::grad for optional caching
99 virtual tmp
100 <
103 > calcGrad
104 (
106 const word& name
107 ) const;
108};
109
110
111// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112
113} // End namespace fa
114
115// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116
117} // End namespace Foam
118
119// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120
121#ifdef NoRepository
122 #include "leastSquaresFaGrad.C"
123#endif
124
125// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126
127#endif
128
129// ************************************************************************* //
Generic GeometricField class.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition Istream.H:60
Mesh data needed to do the Finite Area discretisation.
Definition areaFaMesh.H:50
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
Definition faMesh.H:140
faPatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cover...
Abstract base class for finite area calculus gradient schemes.
const faMesh & mesh() const noexcept
Return mesh reference.
gradScheme(const gradScheme &)=delete
No copy construct.
TypeName("leastSquares")
Runtime type information.
leastSquaresFaGrad(const leastSquaresFaGrad &)=delete
No copy construct.
leastSquaresFaGrad(const faMesh &mesh, Istream &)
Construct from Istream.
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.
leastSquaresFaGrad(const faMesh &mesh)
Construct from mesh.
void operator=(const leastSquaresFaGrad &)=delete
No copy assignment.
typeOfRank< typenamepTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank)>::type type
Definition products.H:118
A class for managing temporary objects.
Definition tmp.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
dynamicFvMesh & mesh
Namespace for finite-area.
Definition limitHeight.C:30
Namespace for OpenFOAM.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68