uncorrectedSnGrad.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 -------------------------------------------------------------------------------
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::fv::uncorrectedSnGrad
28 
29 Group
30  grpFvSnGradSchemes
31 
32 Description
33  Simple central-difference snGrad scheme using the non-orthogonal mesh
34  delta-coefficients but without non-orthogonal correction.
35 
36 SourceFiles
37  uncorrectedSnGrad.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef uncorrectedSnGrad_H
42 #define uncorrectedSnGrad_H
43 
44 #include "snGradScheme.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace fv
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class uncorrectedSnGrad Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 template<class Type>
62 :
63  public snGradScheme<Type>
64 {
65  // Private Member Functions
66 
67  //- No copy assignment
68  void operator=(const uncorrectedSnGrad&) = delete;
69 
70 
71 public:
72 
73  //- Runtime type information
74  TypeName("uncorrected");
75 
76 
77  // Constructors
78 
79  //- Construct from mesh
81  :
82  snGradScheme<Type>(mesh)
83  {}
84 
85 
86  //- Construct from mesh and data stream
88  :
89  snGradScheme<Type>(mesh)
90  {}
91 
92 
93  //- Destructor
94  virtual ~uncorrectedSnGrad();
95 
96 
97  // Member Functions
98 
99  //- Return the interpolation weighting factors for the given field
101  (
103  ) const
104  {
105  return this->mesh().nonOrthDeltaCoeffs();
106  }
107 
108  //- Return true if this scheme uses an explicit correction
109  virtual bool corrected() const
110  {
111  return false;
112  }
113 
114  //- Return the explicit correction to the uncorrectedSnGrad
115  // for the given field
118 };
119 
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 } // End namespace fv
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 } // End namespace Foam
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 #ifdef NoRepository
132  #include "uncorrectedSnGrad.C"
133 #endif
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
Foam::fv::uncorrectedSnGrad::uncorrectedSnGrad
uncorrectedSnGrad(const fvMesh &mesh)
Construct from mesh.
Definition: uncorrectedSnGrad.H:79
uncorrectedSnGrad.C
Simple central-difference snGrad scheme without non-orthogonal correction.
Foam::fv::uncorrectedSnGrad::uncorrectedSnGrad
uncorrectedSnGrad(const fvMesh &mesh, Istream &)
Construct from mesh and data stream.
Definition: uncorrectedSnGrad.H:86
Foam::surfaceInterpolation::nonOrthDeltaCoeffs
virtual const surfaceScalarField & nonOrthDeltaCoeffs() const
Return reference to non-orthogonal cell-centre difference.
Definition: surfaceInterpolation.C:125
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::fv::uncorrectedSnGrad::corrected
virtual bool corrected() const
Return true if this scheme uses an explicit correction.
Definition: uncorrectedSnGrad.H:108
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::fv::uncorrectedSnGrad
Simple central-difference snGrad scheme using the non-orthogonal mesh delta-coefficients but without ...
Definition: uncorrectedSnGrad.H:60
Foam::fv::uncorrectedSnGrad::TypeName
TypeName("uncorrected")
Runtime type information.
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:83
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::fv::uncorrectedSnGrad::deltaCoeffs
virtual tmp< surfaceScalarField > deltaCoeffs(const GeometricField< Type, fvPatchField, volMesh > &) const
Return the interpolation weighting factors for the given field.
Definition: uncorrectedSnGrad.H:100
fv
labelList fv(nPoints)
Foam::fv::snGradScheme::mesh
const fvMesh & mesh() const
Return mesh reference.
Definition: snGradScheme.H:128
Foam::fv::uncorrectedSnGrad::~uncorrectedSnGrad
virtual ~uncorrectedSnGrad()
Destructor.
Definition: uncorrectedSnGrad.C:48
Foam::fv::snGradScheme
Abstract base class for snGrad schemes.
Definition: snGradScheme.H:65
snGradScheme.H
Foam::GeometricField< Type, fvPatchField, volMesh >
Foam::fv::uncorrectedSnGrad::correction
virtual tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > correction(const GeometricField< Type, fvPatchField, volMesh > &) const
Return the explicit correction to the uncorrectedSnGrad.
Definition: uncorrectedSnGrad.C:57