fourthGrad.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) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2019-2021 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::fv::fourthGrad
29 
30 Group
31  grpFvGradSchemes
32 
33 Description
34  Second-order gradient scheme using least-squares.
35 
36 SourceFiles
37  fourthGrad.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef fourthGrad_H
42 #define fourthGrad_H
43 
44 #include "gradScheme.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace fv
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class fourthGrad Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 template<class Type>
61 class fourthGrad
62 :
63  public fv::gradScheme<Type>
64 {
65  // Private Member Functions
66 
67  //- No copy construct
68  fourthGrad(const fourthGrad&) = delete;
69 
70  //- No copy assignment
71  void operator=(const fourthGrad&) = delete;
72 
73 
74 public:
75 
76  //- Runtime type information
77  TypeName("fourth");
78 
79 
80  // Constructors
81 
82  //- Construct from Istream
83  fourthGrad(const fvMesh& mesh, Istream&)
84  :
85  gradScheme<Type>(mesh)
86  {}
87 
88 
89  // Member Functions
90 
91  //- Return the gradient of the given field to the gradScheme::grad
92  //- for optional caching
93  virtual tmp
94  <
97  > calcGrad
98  (
100  const word& name
101  ) const;
102 };
103 
104 
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 
107 } // End namespace fv
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 } // End namespace Foam
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 #ifdef NoRepository
116  #include "fourthGrad.C"
117 #endif
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 #endif
122 
123 // ************************************************************************* //
Foam::fvPatchField
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: volSurfaceMapping.H:51
Foam::fv::fourthGrad
Second-order gradient scheme using least-squares.
Definition: fourthGrad.H:60
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::volMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: volMesh.H:51
Foam::outerProduct::type
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) >::type type
Definition: products.H:114
fourthGrad.C
Foam::fv::fourthGrad::calcGrad
virtual tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > calcGrad(const GeometricField< Type, fvPatchField, volMesh > &vsf, const word &name) const
Foam::fv::fourthGrad::fourthGrad
fourthGrad(const fvMesh &mesh, Istream &)
Construct from Istream.
Definition: fourthGrad.H:82
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::fv::gradScheme::mesh
const fvMesh & mesh() const
Return const reference to mesh.
Definition: gradScheme.H:126
gradScheme.H
Foam::fv::gradScheme
Abstract base class for gradient schemes.
Definition: gradScheme.H:63
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
fv
labelList fv(nPoints)
Foam::name
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
Foam::fv::fourthGrad::TypeName
TypeName("fourth")
Runtime type information.
Foam::GeometricField
Generic GeometricField class.
Definition: areaFieldsFwd.H:53