Loading...
Searching...
No Matches
faConvectionScheme.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::convectionScheme
28
29Description
30 Abstract base class for finite area calculus convection schemes.
31
32SourceFiles
33 faConvectionScheme.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef faConvectionScheme_H
38#define faConvectionScheme_H
39
40#include "areaFieldsFwd.H"
41#include "edgeFieldsFwd.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
48
49// Forward Declarations
50template<class Type>
51class faMatrix;
52
53class faMesh;
54
55// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56
57namespace fa
58{
59
60/*---------------------------------------------------------------------------*\
61 Class convectionScheme Declaration
62\*---------------------------------------------------------------------------*/
63
64template<class Type>
66:
67 public refCount
68{
69 // Private Data
70
71 //- Reference to mesh
72 const faMesh& mesh_;
73
74
75public:
77 // Declare run-time constructor selection tables
78
80 (
81 tmp,
83 Istream,
84 (
85 const faMesh& mesh,
86 const edgeScalarField& faceFlux,
87 Istream& schemeData
88 ),
89 (mesh, faceFlux, schemeData)
90 );
91
92
93 // Generated Methods
94
95 //- No copy construct
96 convectionScheme(const convectionScheme&) = delete;
97
98 //- No copy assignment
99 void operator=(const convectionScheme&) = delete;
101
102 // Constructors
103
104 //- Construct from mesh, flux and Istream
106 (
107 const faMesh& mesh,
108 const edgeScalarField& faceFlux
109 )
110 :
111 mesh_(mesh)
112 {}
113
114
115 // Selectors
116
117 //- Return a pointer to a new convectionScheme created on freestore
119 (
120 const faMesh& mesh,
121 const edgeScalarField& faceFlux,
122 Istream& schemeData
123 );
124
125
126 //- Destructor
127 virtual ~convectionScheme();
128
129
130 // Member Functions
131
132 //- Return mesh reference
133 const faMesh& mesh() const noexcept { return mesh_; }
134
136 (
137 const edgeScalarField&,
139 ) const = 0;
140
143 const edgeScalarField&,
145 ) const = 0;
146
148 (
149 const edgeScalarField&,
151 ) const = 0;
152};
153
154
155// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157} // End namespace fa
158
159// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160
161} // End namespace Foam
162
163// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164
165// Add the patch constructor functions to the hash tables
166
167#define makeFaConvectionTypeScheme(SS, Type) \
168 \
169 defineNamedTemplateTypeNameAndDebug(Foam::fa::SS<Foam::Type>, 0); \
170 \
171 namespace Foam \
172 { \
173 namespace fa \
174 { \
175 convectionScheme<Type>::addIstreamConstructorToTable<SS<Type>> \
176 add##SS##Type##IstreamConstructorToTable_; \
177 } \
178 }
179
180
181#define makeFaConvectionScheme(SS) \
182 \
183makeFaConvectionTypeScheme(SS, scalar) \
184makeFaConvectionTypeScheme(SS, vector) \
185makeFaConvectionTypeScheme(SS, tensor)
186
187// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188
189#ifdef NoRepository
191#endif
192
193// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194
195#endif
196
197// ************************************************************************* //
Forwards and collection of common area field types.
Generic GeometricField class.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition Istream.H:60
A special matrix type and solver, designed for finite area solutions of scalar equations....
Definition faMatrix.H:108
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, faPatchField, areaMesh > > facDiv(const edgeScalarField &, const GeometricField< Type, faPatchField, areaMesh > &) const =0
convectionScheme(const faMesh &mesh, const edgeScalarField &faceFlux)
Construct from mesh, flux and Istream.
virtual tmp< faMatrix< Type > > famDiv(const edgeScalarField &, const GeometricField< Type, faPatchField, areaMesh > &) const =0
const faMesh & mesh() const noexcept
Return mesh reference.
virtual ~convectionScheme()
Destructor.
convectionScheme(const convectionScheme &)=delete
No copy construct.
static tmp< convectionScheme< Type > > New(const faMesh &mesh, const edgeScalarField &faceFlux, Istream &schemeData)
Return a pointer to a new convectionScheme created on freestore.
virtual tmp< GeometricField< Type, faePatchField, edgeMesh > > flux(const edgeScalarField &, const GeometricField< Type, faPatchField, areaMesh > &) const =0
declareRunTimeSelectionTable(tmp, convectionScheme, Istream,(const faMesh &mesh, const edgeScalarField &faceFlux, Istream &schemeData),(mesh, faceFlux, schemeData))
void operator=(const convectionScheme &)=delete
No copy assignment.
constexpr refCount() noexcept
Default construct, initializing count to 0.
Definition refCount.H:63
A class for managing temporary objects.
Definition tmp.H:75
dynamicFvMesh & mesh
Forwards for edge field types.
Namespace for finite-area.
Definition limitHeight.C:30
Namespace for OpenFOAM.
GeometricField< scalar, faePatchField, edgeMesh > edgeScalarField
const direction noexcept
Definition scalarImpl.H:265
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes).