faD2dt2Scheme.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) 2017 Volkswagen AG
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::faD2dt2Scheme
28
29Description
30 Abstract base class for d2dt2 schemes.
31
32SourceFiles
33 faD2dt2Scheme.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef faD2dt2Scheme_H
38#define faD2dt2Scheme_H
39
40#include "tmp.H"
41#include "dimensionedType.H"
42#include "areaFieldsFwd.H"
43#include "edgeFieldsFwd.H"
44#include "typeInfo.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52template<class Type>
53class faMatrix;
54
55class faMesh;
56
57// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58
59namespace fa
60{
61
62/*---------------------------------------------------------------------------*\
63 Class faD2dt2Scheme Declaration
64\*---------------------------------------------------------------------------*/
65
66template<class Type>
67class faD2dt2Scheme
68:
69 public refCount
70{
71
72protected:
73
74 // Protected data
76 const faMesh& mesh_;
77
78
79 // Private Member Functions
80
81 //- No copy construct
82 faD2dt2Scheme(const faD2dt2Scheme&) = delete;
83
84 //- No copy assignment
85 void operator=(const faD2dt2Scheme&) = delete;
86
87
88public:
89
90 //- Runtime type information
91 virtual const word& type() const = 0;
92
93
94 // Declare run-time constructor selection tables
97 (
98 tmp,
100 Istream,
101 (const faMesh& mesh, Istream& schemeData),
102 (mesh, schemeData)
103 );
104
105
106 // Constructors
107
108 //- Construct from mesh
110 :
111 mesh_(mesh)
112 {}
113
114 //- Construct from mesh and Istream
116 :
117 mesh_(mesh)
118 {}
119
120
121 // Selectors
122
123 //- Return a pointer to a new d2dt2Scheme created on freestore
125 (
126 const faMesh& mesh,
127 Istream& schemeData
128 );
129
130
131 //- Destructor
132 virtual ~faD2dt2Scheme();
133
134
135 // Member Functions
136
137 //- Return mesh reference
138 const faMesh& mesh() const
139 {
140 return mesh_;
141 }
144 (
146 ) = 0;
149 (
151 ) = 0;
154 (
155 const dimensionedScalar&,
157 ) = 0;
160 (
161 const areaScalarField&,
163 ) = 0;
166 (
168 ) = 0;
171 (
172 const dimensionedScalar&,
174 ) = 0;
177 (
178 const areaScalarField&,
180 ) = 0;
181};
182
183
184// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185
186} // End namespace fa
187
188// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189
190} // End namespace Foam
191
192// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193
194// Add the patch constructor functions to the hash tables
196#define makeFaD2dt2TypeScheme(SS, Type) \
197 \
198 defineNamedTemplateTypeNameAndDebug(Foam::fa::SS<Foam::Type>, 0); \
199 \
200 namespace Foam \
201 { \
202 namespace fa \
203 { \
204 faD2dt2Scheme<Type>::addIstreamConstructorToTable<SS<Type>> \
205 add##SS##Type##IstreamConstructorToTable_; \
206 } \
207 }
208
210#define makeFaD2dt2Scheme(SS) \
211 \
212makeFaD2dt2TypeScheme(SS, scalar) \
213makeFaD2dt2TypeScheme(SS, vector) \
214makeFaD2dt2TypeScheme(SS, tensor)
215
216
217// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218
219#ifdef NoRepository
220# include "faD2dt2Scheme.C"
221#endif
222
223// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
224
225#endif
226
227// ************************************************************************* //
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:64
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:100
Abstract base class for d2dt2 schemes.
Definition: faD2dt2Scheme.H:69
faD2dt2Scheme(const faMesh &mesh, Istream &)
Construct from mesh and Istream.
virtual ~faD2dt2Scheme()
Destructor.
Definition: faD2dt2Scheme.C:91
void operator=(const faD2dt2Scheme &)=delete
No copy assignment.
faD2dt2Scheme(const faD2dt2Scheme &)=delete
No copy construct.
const faMesh & mesh_
Definition: faD2dt2Scheme.H:75
virtual tmp< GeometricField< Type, faPatchField, areaMesh > > facD2dt2(const GeometricField< Type, faPatchField, areaMesh > &)=0
virtual tmp< faMatrix< Type > > famD2dt2(const GeometricField< Type, faPatchField, areaMesh > &)=0
virtual tmp< faMatrix< Type > > famD2dt2(const areaScalarField &, const GeometricField< Type, faPatchField, areaMesh > &)=0
faD2dt2Scheme(const faMesh &mesh)
Construct from mesh.
static tmp< faD2dt2Scheme< Type > > New(const faMesh &mesh, Istream &schemeData)
Return a pointer to a new d2dt2Scheme created on freestore.
Definition: faD2dt2Scheme.C:49
const faMesh & mesh() const
Return mesh reference.
virtual tmp< GeometricField< Type, faPatchField, areaMesh > > facD2dt2(const areaScalarField &, const GeometricField< Type, faPatchField, areaMesh > &)=0
declareRunTimeSelectionTable(tmp, faD2dt2Scheme, Istream,(const faMesh &mesh, Istream &schemeData),(mesh, schemeData))
virtual tmp< GeometricField< Type, faPatchField, areaMesh > > facD2dt2(const dimensionedScalar &, const GeometricField< Type, faPatchField, areaMesh > &)=0
virtual const word & type() const =0
Runtime type information.
virtual tmp< GeometricField< Type, faPatchField, areaMesh > > facD2dt2(const dimensioned< Type >)=0
virtual tmp< faMatrix< Type > > famD2dt2(const dimensionedScalar &, const GeometricField< Type, faPatchField, areaMesh > &)=0
Reference counter for various OpenFOAM components.
Definition: refCount.H:51
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
Forwards for edge field types.
Abstract base class for finite area d2dt2 schemes.
Namespace for OpenFOAM.
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)