Loading...
Searching...
No Matches
faDdtScheme.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::DdtScheme
28
29Description
30 Abstract base class for finite volume calculus ddt schemes.
31
32SourceFiles
33 faDdtScheme.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef faDdtScheme_H
38#define faDdtScheme_H
39
40#include "dimensionedType.H"
41#include "areaFieldsFwd.H"
42#include "edgeFieldsFwd.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49
50// Forward Declarations
51template<class Type>
52class faMatrix;
53
54class faMesh;
55
56// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57
58namespace fa
59{
60
61/*---------------------------------------------------------------------------*\
62 Class faDdtScheme Declaration
63\*---------------------------------------------------------------------------*/
64
65template<class Type>
66class faDdtScheme
67:
68 public refCount
69{
70protected:
71
72 // Protected Data
73
74 //- Reference to mesh
75 const faMesh& mesh_;
76
77
78public:
79
80 //- Runtime type information
81 virtual const word& type() const = 0;
82
83
84 // Declare run-time constructor selection tables
87 (
88 tmp,
90 Istream,
91 (const faMesh& mesh, Istream& schemeData),
92 (mesh, schemeData)
93 );
94
95
96 // Generated Methods
97
98 //- No copy construct
99 faDdtScheme(const faDdtScheme&) = delete;
101 //- No copy assignment
102 void operator=(const faDdtScheme&) = delete;
103
104
105 // Constructors
106
107 //- Construct from mesh
108 faDdtScheme(const faMesh& mesh)
109 :
110 mesh_(mesh)
111 {}
112
113 //- Construct from mesh and Istream
115 :
116 mesh_(mesh)
117 {}
118
119
120 // Selectors
122 //- Return a pointer to a new faDdtScheme created on freestore
124 (
125 const faMesh& mesh,
126 Istream& schemeData
127 );
128
129
130 //- Destructor
131 virtual ~faDdtScheme();
132
133
134 // Member Functions
135
136 //- Return mesh reference
137 const faMesh& mesh() const noexcept { return mesh_; }
138
140 (
142 ) = 0;
143
145 (
147 ) = 0;
148
152 ) = 0;
153
155 (
157 ) = 0;
158
160 (
161 const dimensionedScalar&,
163 ) = 0;
164
166 (
169 ) = 0;
170
173 const areaScalarField&,
175 ) = 0;
176
179 const areaScalarField&,
181 ) = 0;
182
186 ) = 0;
187
189 (
192 ) = 0;
193
195 (
198 ) = 0;
199};
200
202// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203
204} // End namespace fa
205
206// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208} // End namespace Foam
209
210// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211
212// Add the patch constructor functions to the hash tables
213
214#define makeFaDdtTypeScheme(SS, Type) \
215 \
216 defineNamedTemplateTypeNameAndDebug(Foam::fa::SS<Foam::Type>, 0); \
217 \
218 namespace Foam \
219 { \
220 namespace fa \
221 { \
222 faDdtScheme<Type>::addIstreamConstructorToTable<SS<Type>> \
223 add##SS##Type##IstreamConstructorToTable_; \
224 } \
225 }
226
228#define makeFaDdtScheme(SS) \
229 \
230makeFaDdtTypeScheme(SS, scalar) \
231makeFaDdtTypeScheme(SS, vector) \
232makeFaDdtTypeScheme(SS, tensor)
233
234
235// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
236
237#ifdef NoRepository
238 #include "faDdtScheme.C"
239#endif
240
241// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
242
243#endif
244
245// ************************************************************************* //
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
Generic dimensioned Type class.
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
Definition faMesh.H:140
faDdtScheme(const faMesh &mesh, Istream &)
Construct from mesh and Istream.
virtual tmp< GeometricField< Type, faPatchField, areaMesh > > facDdt0(const areaScalarField &, const GeometricField< Type, faPatchField, areaMesh > &)=0
virtual ~faDdtScheme()
Destructor.
Definition faDdtScheme.C:81
void operator=(const faDdtScheme &)=delete
No copy assignment.
virtual tmp< GeometricField< Type, faPatchField, areaMesh > > facDdt(const areaScalarField &, const GeometricField< Type, faPatchField, areaMesh > &)=0
virtual tmp< GeometricField< Type, faPatchField, areaMesh > > facDdt(const dimensioned< Type >)=0
virtual tmp< faMatrix< Type > > famDdt(const GeometricField< Type, faPatchField, areaMesh > &)=0
virtual tmp< GeometricField< Type, faPatchField, areaMesh > > facDdt0(const dimensionedScalar &, const GeometricField< Type, faPatchField, areaMesh > &)=0
const faMesh & mesh() const noexcept
Return mesh reference.
faDdtScheme(const faMesh &mesh)
Construct from mesh.
virtual tmp< faMatrix< Type > > famDdt(const dimensionedScalar &, const GeometricField< Type, faPatchField, areaMesh > &)=0
const faMesh & mesh_
Reference to mesh.
Definition faDdtScheme.H:72
declareRunTimeSelectionTable(tmp, faDdtScheme, Istream,(const faMesh &mesh, Istream &schemeData),(mesh, schemeData))
virtual tmp< GeometricField< Type, faPatchField, areaMesh > > facDdt0(const dimensioned< Type >)=0
virtual tmp< faMatrix< Type > > famDdt(const areaScalarField &, const GeometricField< Type, faPatchField, areaMesh > &)=0
static tmp< faDdtScheme< Type > > New(const faMesh &mesh, Istream &schemeData)
Return a pointer to a new faDdtScheme created on freestore.
Definition faDdtScheme.C:38
virtual tmp< GeometricField< Type, faPatchField, areaMesh > > facDdt(const dimensionedScalar &, const GeometricField< Type, faPatchField, areaMesh > &)=0
virtual tmp< GeometricField< Type, faPatchField, areaMesh > > facDdt(const GeometricField< Type, faPatchField, areaMesh > &)=0
virtual const word & type() const =0
Runtime type information.
virtual tmp< GeometricField< Type, faPatchField, areaMesh > > facDdt0(const GeometricField< Type, faPatchField, areaMesh > &)=0
faDdtScheme(const faDdtScheme &)=delete
No copy construct.
constexpr refCount() noexcept
Default construct, initializing count to 0.
Definition refCount.H:63
A class for managing temporary objects.
Definition tmp.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
dynamicFvMesh & mesh
Forwards for edge field types.
Namespace for OpenFOAM.
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
const direction noexcept
Definition scalarImpl.H:265
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
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).