Loading...
Searching...
No Matches
gaussLaplacianScheme.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 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::fv::gaussLaplacianScheme
29
30Group
31 grpFvLaplacianSchemes
32
33Description
34 Basic second-order laplacian using face-gradients and Gauss' theorem.
35
36SourceFiles
37 gaussLaplacianScheme.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef gaussLaplacianScheme_H
42#define gaussLaplacianScheme_H
43
44#include "laplacianScheme.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50
51// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52
53namespace fv
54{
55
56/*---------------------------------------------------------------------------*\
57 Class gaussLaplacianScheme Declaration
58\*---------------------------------------------------------------------------*/
59
60template<class Type, class GType>
61class gaussLaplacianScheme
62:
63 public fv::laplacianScheme<Type, GType>
64{
65 // Private Member Functions
66
68 (
69 const surfaceVectorField& SfGammaCorr,
71 );
72
73 //- No copy construct
74 gaussLaplacianScheme(const gaussLaplacianScheme&) = delete;
75
76 //- No copy assignment
77 void operator=(const gaussLaplacianScheme&) = delete;
78
79
80public:
81
82 //- Runtime type information
83 TypeName("Gauss");
85
86 // Constructors
87
88 //- Construct null
89 gaussLaplacianScheme(const fvMesh& mesh)
90 :
91 laplacianScheme<Type, GType>(mesh)
92 {}
93
94 //- Construct from Istream
96 :
97 laplacianScheme<Type, GType>(mesh, is)
98 {}
99
100 //- Construct from mesh, interpolation and snGradScheme schemes
101 gaussLaplacianScheme
102 (
103 const fvMesh& mesh,
105 const tmp<snGradScheme<Type>>& sngs
106 )
107 :
108 laplacianScheme<Type, GType>(mesh, igs, sngs)
109 {}
110
111
112 //- Destructor
113 virtual ~gaussLaplacianScheme() = default;
114
115
116 // Member Functions
117
119 (
120 const surfaceScalarField& gammaMagSf,
121 const surfaceScalarField& deltaCoeffs,
123 );
124
126 (
128 );
129
131 (
134 );
135
137 (
140 );
141};
142
143
144// Use macros to emulate partial-specialisation of the Laplacian functions
145// for scalar diffusivity gamma
146
147#define defineFvmLaplacianScalarGamma(Type) \
148 \
149template<> \
150tmp<fvMatrix<Type>> gaussLaplacianScheme<Type, scalar>::fvmLaplacian \
151( \
152 const GeometricField<scalar, fvsPatchField, surfaceMesh>&, \
153 const GeometricField<Type, fvPatchField, volMesh>& \
154); \
155 \
156template<> \
157tmp<GeometricField<Type, fvPatchField, volMesh>> \
158gaussLaplacianScheme<Type, scalar>::fvcLaplacian \
159( \
160 const GeometricField<scalar, fvsPatchField, surfaceMesh>&, \
161 const GeometricField<Type, fvPatchField, volMesh>& \
162);
163
164
170
171
172// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173
174} // End namespace fv
176// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178} // End namespace Foam
179
180// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181
182#ifdef NoRepository
183 #include "gaussLaplacianScheme.C"
184#endif
185
186// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187
188#endif
189
190// ************************************************************************* //
Generic GeometricField class.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition Istream.H:60
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
Basic second-order laplacian using face-gradients and Gauss' theorem.
gaussLaplacianScheme(const fvMesh &mesh, Istream &is)
Construct from Istream.
virtual ~gaussLaplacianScheme()=default
Destructor.
gaussLaplacianScheme(const fvMesh &mesh)
Construct null.
tmp< GeometricField< Type, fvPatchField, volMesh > > fvcLaplacian(const GeometricField< Type, fvPatchField, volMesh > &)
gaussLaplacianScheme(const fvMesh &mesh, const tmp< surfaceInterpolationScheme< GType > > &igs, const tmp< snGradScheme< Type > > &sngs)
Construct from mesh, interpolation and snGradScheme schemes.
TypeName("Gauss")
Runtime type information.
tmp< fvMatrix< Type > > fvmLaplacian(const GeometricField< GType, fvsPatchField, surfaceMesh > &, const GeometricField< Type, fvPatchField, volMesh > &)
static tmp< fvMatrix< Type > > fvmLaplacianUncorrected(const surfaceScalarField &gammaMagSf, const surfaceScalarField &deltaCoeffs, const GeometricField< Type, fvPatchField, volMesh > &)
Abstract base class for laplacian schemes.
laplacianScheme(const laplacianScheme &)=delete
No copy construct.
const fvMesh & mesh() const
Return mesh reference.
Abstract base class for runtime selected snGrad surface normal gradient schemes.
Abstract base class for surface interpolation schemes.
Tensor of scalars, i.e. Tensor<scalar>.
A class for managing temporary objects.
Definition tmp.H:75
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
dynamicFvMesh & mesh
#define defineFvmLaplacianScalarGamma(Type)
Namespace for finite-volume.
Namespace for OpenFOAM.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Tensor< scalar > tensor
Definition symmTensor.H:57
Vector< scalar > vector
Definition vector.H:57
SphericalTensor< scalar > sphericalTensor
SphericalTensor of scalars, i.e. SphericalTensor<scalar>.
SymmTensor< scalar > symmTensor
SymmTensor of scalars, i.e. SymmTensor<scalar>.
Definition symmTensor.H:55
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68