gaussFaConvectionScheme.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::gaussConvectionScheme
28 
29 Description
30  Basic second-order convection using face-gradients and Gauss' theorem.
31 
32 SourceFiles
33  gaussFaConvectionScheme.C
34  gaussFaConvectionSchemes.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef gaussFaConvectionScheme_H
39 #define gaussFaConvectionScheme_H
40 
41 #include "faConvectionScheme.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace fa
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class gaussConvectionScheme Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 template<class Type>
60 :
61  public fa::convectionScheme<Type>
62 {
63  // Private data
64 
65  tmp<edgeInterpolationScheme<Type>> tinterpScheme_;
66 
67 
68  // Private Member Functions
69 
70  //- No copy construct
72 
73  //- No copy assignment
74  void operator=(const gaussConvectionScheme&) = delete;
75 
76 
77 public:
78 
79  //- Runtime type information
80  TypeName("Gauss");
81 
82 
83  // Constructors
84 
85  //- Construct from flux and interpolation scheme
87  (
88  const faMesh& mesh,
89  const edgeScalarField& faceFlux,
91  )
92  :
93  convectionScheme<Type>(mesh, faceFlux),
94  tinterpScheme_(scheme)
95  {}
96 
97  //- Construct from flux and Istream
99  (
100  const faMesh& mesh,
101  const edgeScalarField& faceFlux,
102  Istream& is
103  )
104  :
105  convectionScheme<Type>(mesh, faceFlux),
106  tinterpScheme_
107  (
108  edgeInterpolationScheme<Type>::New(mesh, faceFlux, is)
109  )
110  {}
111 
112 
113  // Member Functions
114 
116  (
117  const edgeScalarField&,
119  ) const;
120 
122  (
123  const edgeScalarField&,
125  ) const;
126 
128  (
129  const edgeScalarField&,
131  ) const;
132 };
133 
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 } // End namespace fa
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 } // End namespace Foam
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 #ifdef NoRepository
146  #include "gaussFaConvectionScheme.C"
147 #endif
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 #endif
152 
153 // ************************************************************************* //
edgeInterpolationScheme.H
Foam::edgeInterpolationScheme
Abstract base class for edge interpolation schemes.
Definition: edgeInterpolationScheme.H:57
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
faConvectionScheme.H
Foam::fa::gaussConvectionScheme::facDiv
tmp< GeometricField< Type, faPatchField, areaMesh > > facDiv(const edgeScalarField &, const GeometricField< Type, faPatchField, areaMesh > &) const
Definition: gaussFaConvectionScheme.C:112
Foam::fa::gaussConvectionScheme::flux
tmp< GeometricField< Type, faePatchField, edgeMesh > > flux(const edgeScalarField &, const GeometricField< Type, faPatchField, areaMesh > &) const
Definition: gaussFaConvectionScheme.C:47
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::fa::gaussConvectionScheme
Basic second-order convection using face-gradients and Gauss' theorem.
Definition: gaussFaConvectionScheme.H:58
Foam::fa::convectionScheme
Abstract base class for finite area calculus convection schemes.
Definition: faConvectionScheme.H:65
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::fa::convectionScheme::New
static tmp< convectionScheme< Type > > New(const faMesh &mesh, const edgeScalarField &faceFlux, Istream &schemeData)
Return a pointer to a new convectionScheme created on freestore.
Definition: faConvectionScheme.C:37
Foam::fa::gaussConvectionScheme::TypeName
TypeName("Gauss")
Runtime type information.
Foam::fa::gaussConvectionScheme::famDiv
tmp< faMatrix< Type > > famDiv(const edgeScalarField &, const GeometricField< Type, faPatchField, areaMesh > &) const
Definition: gaussFaConvectionScheme.C:59
Foam::faMesh
Finite area mesh. Used for 2-D non-Euclidian finite area method.
Definition: faMesh.H:82
Foam::GeometricField< scalar, faePatchField, edgeMesh >
gaussFaConvectionScheme.C
Foam::fac::scheme
static tmp< edgeInterpolationScheme< Type > > scheme(const edgeScalarField &faceFlux, Istream &schemeData)
Return weighting factors for scheme given from Istream.
Foam::fa::convectionScheme::mesh
const faMesh & mesh() const
Return mesh reference.
Definition: faConvectionScheme.H:132