correctedLnGrad.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 -------------------------------------------------------------------------------
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::correctedLnGrad
28 
29 Description
30  Simple central-difference lnGrad scheme with non-orthogonal correction.
31 
32 SourceFiles
33  correctedLnGrad.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef correctedLnGrad_H
38 #define correctedLnGrad_H
39 
40 #include "lnGradScheme.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace fa
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class correctedLnGrad Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 template<class Type>
57 class correctedLnGrad
58 :
59  public lnGradScheme<Type>
60 {
61  // Private Member Functions
62 
63  //- No copy assignment
64  void operator=(const correctedLnGrad&) = delete;
65 
66 
67 public:
68 
69  //- Runtime type information
70  TypeName("corrected");
71 
72 
73  // Constructors
74 
75  //- Construct from mesh
77  :
78  lnGradScheme<Type>(mesh)
79  {}
80 
81 
82  //- Construct from mesh and data stream
84  :
85  lnGradScheme<Type>(mesh)
86  {}
87 
88 
89  //- Destructor
90  virtual ~correctedLnGrad();
91 
92 
93  // Member Functions
94 
95  //- Return the interpolation weighting factors for the given field
97  (
99  ) const
100  {
101  return this->mesh().deltaCoeffs();
102  }
103 
104  //- Return true if this scheme uses an explicit correction
105  virtual bool corrected() const
106  {
107  return !this->mesh().orthogonal();
108  }
109 
110  //- Return the explicit correction to the correctedLnGrad
111  // for the given field
114 };
115 
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 } // End namespace fa
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 } // End namespace Foam
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 #ifdef NoRepository
128  #include "correctedLnGrad.C"
129 #endif
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #endif
134 
135 // ************************************************************************* //
Foam::fa::correctedLnGrad::~correctedLnGrad
virtual ~correctedLnGrad()
Destructor.
Definition: correctedLnGrad.C:47
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::fa::correctedLnGrad::correctedLnGrad
correctedLnGrad(const faMesh &mesh, Istream &)
Construct from mesh and data stream.
Definition: correctedLnGrad.H:82
Foam::fa::correctedLnGrad::correctedLnGrad
correctedLnGrad(const faMesh &mesh)
Construct from mesh.
Definition: correctedLnGrad.H:75
Foam::fa::lnGradScheme::mesh
const faMesh & mesh() const
Return mesh reference.
Definition: lnGradScheme.H:118
Foam::fa::correctedLnGrad::corrected
virtual bool corrected() const
Return true if this scheme uses an explicit correction.
Definition: correctedLnGrad.H:104
correctedLnGrad.C
Foam::edgeInterpolation::deltaCoeffs
const edgeScalarField & deltaCoeffs() const
Return reference to difference factors array.
Definition: edgeInterpolation.C:101
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::edgeInterpolation::orthogonal
bool orthogonal() const
Return whether mesh is orthogonal or not.
Definition: edgeInterpolation.C:112
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::fa::correctedLnGrad::TypeName
TypeName("corrected")
Runtime type information.
Foam::fa::correctedLnGrad::deltaCoeffs
virtual tmp< edgeScalarField > deltaCoeffs(const GeometricField< Type, faPatchField, areaMesh > &) const
Return the interpolation weighting factors for the given field.
Definition: correctedLnGrad.H:96
Foam::fa::correctedLnGrad
Simple central-difference lnGrad scheme with non-orthogonal correction.
Definition: correctedLnGrad.H:56
Foam::fa::correctedLnGrad::correction
virtual tmp< GeometricField< Type, faePatchField, edgeMesh > > correction(const GeometricField< Type, faPatchField, areaMesh > &) const
Return the explicit correction to the correctedLnGrad.
Definition: correctedLnGrad.C:56
Foam::faMesh
Finite area mesh. Used for 2-D non-Euclidian finite area method.
Definition: faMesh.H:82
lnGradScheme.H
Foam::GeometricField
Generic GeometricField class.
Definition: areaFieldsFwd.H:53
Foam::fa::lnGradScheme
Abstract base class for lnGrad schemes.
Definition: lnGradScheme.H:62