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