uncorrectedLnGrad.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) 2022 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::fa::uncorrectedLnGrad
28 
29 Description
30  Simple central-difference lnGrad scheme with no non-orthogonal correction.
31 
32 SourceFiles
33  uncorrectedLnGrad.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef Foam_fa_uncorrectedLnGrad_H
38 #define Foam_fa_uncorrectedLnGrad_H
39 
40 #include "lnGradScheme.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace fa
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class uncorrectedLnGrad Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 template<class Type>
58 :
59  public lnGradScheme<Type>
60 {
61 public:
62 
63  //- Runtime type information
64  TypeName("uncorrected");
65 
66 
67  // Generated Methods
68 
69  //- No copy construct
70  uncorrectedLnGrad(const uncorrectedLnGrad&) = delete;
71 
72  //- No copy assignment
73  void operator=(const uncorrectedLnGrad&) = delete;
74 
75 
76  // Constructors
77 
78  //- Construct from mesh
80  :
82  {}
83 
84  //- Construct from mesh and data stream
86  :
87  lnGradScheme<Type>(mesh)
88  {}
89 
90 
91  //- Destructor
92  virtual ~uncorrectedLnGrad() = default;
93 
94 
95  // Member Functions
96 
97  //- Return the interpolation weighting factors for the given field
99  (
101  ) const
102  {
103  return this->mesh().deltaCoeffs();
104  }
105 
106  //- Return true if this scheme uses an explicit correction
107  virtual bool corrected() const { return false; }
109  //- Return the explicit correction to the uncorrectedLnGrad
110  //- for the given field
113 };
114 
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 } // End namespace fa
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 } // End namespace Foam
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #ifdef NoRepository
127  #include "uncorrectedLnGrad.C"
128 #endif
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #endif
133 
134 // ************************************************************************* //
virtual tmp< edgeScalarField > deltaCoeffs(const GeometricField< Type, faPatchField, areaMesh > &) const
Return the interpolation weighting factors for the given field.
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
Definition: faMesh.H:133
Simple central-difference lnGrad scheme with no non-orthogonal correction.
const edgeScalarField & deltaCoeffs() const
Return reference to difference factors array.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
virtual bool corrected() const
Return true if this scheme uses an explicit correction.
Generic GeometricField class.
const faMesh & mesh() const noexcept
Return mesh reference.
Definition: lnGradScheme.H:130
Abstract base class for lnGrad schemes.
Definition: lnGradScheme.H:57
uncorrectedLnGrad(const uncorrectedLnGrad &)=delete
No copy construct.
virtual ~uncorrectedLnGrad()=default
Destructor.
virtual tmp< GeometricField< Type, faePatchField, edgeMesh > > correction(const GeometricField< Type, faPatchField, areaMesh > &) const
Return the explicit correction to the uncorrectedLnGrad for the given field.
TypeName("uncorrected")
Runtime type information.
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Namespace for OpenFOAM.
void operator=(const uncorrectedLnGrad &)=delete
No copy assignment.