DAFoam
v3.0.6
Discrete Adjoint with OpenFOAM
dafoam
src
adjoint
DARegDb
DARegDbFluidThermo.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
3
DAFoam : Discrete Adjoint with OpenFOAM
4
Version : v3
5
6
Description:
7
Register fluidThermo to Foam::fvMesh
8
9
Example:
10
11
To register a fluidThermo object to fvMesh:
12
13
autoPtr<fluidThermo> fluidThermo = fluidThermo::New(mesh);
14
fluidThermo& thermo = fluidThermo();
15
DARegDbFluidThermo daThermo(mesh,thermo);
16
17
Then, to get the registered fluidThermo object from fvMesh:
18
19
const DARegDbFluidThermo& daThermo1 =
20
mesh.thisDb().lookupObject<DARegDbFluidThermo>("DARegDbFluidThermo");
21
const fluidThermo& thermo1 = daThermo1.getObject();
22
23
\*---------------------------------------------------------------------------*/
24
25
#ifndef DARegDbFluidThermo_H
26
#define DARegDbFluidThermo_H
27
28
#include "fvOptions.H"
29
#include "fluidThermo.H"
30
31
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32
33
namespace
Foam
34
{
35
36
/*---------------------------------------------------------------------------*\
37
Class DARegDbFluidThermo Declaration
38
\*---------------------------------------------------------------------------*/
39
40
class
DARegDbFluidThermo
41
:
public
regIOobject
42
{
43
44
private
:
46
DARegDbFluidThermo
(
const
DARegDbFluidThermo
&);
47
49
void
operator=(
const
DARegDbFluidThermo
&);
50
52
const
fvMesh& mesh_;
53
55
const
fluidThermo& fluidThermo_;
56
57
public
:
59
DARegDbFluidThermo
(
60
const
fvMesh&
mesh
,
61
const
fluidThermo& fluidThermo);
62
64
virtual
~DARegDbFluidThermo
();
65
67
const
fluidThermo&
getObject
()
const
68
{
69
return
fluidThermo_;
70
}
71
73
bool
writeData
(Ostream& os)
const
;
74
};
75
76
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77
78
}
// End namespace Foam
79
80
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
81
82
#endif
83
84
// ************************************************************************* //
mesh
fvMesh & mesh
Definition:
createRefsHeatTransfer.H:4
Foam::DARegDbFluidThermo::getObject
const fluidThermo & getObject() const
return fluidThermo
Definition:
DARegDbFluidThermo.H:67
Foam
Definition:
multiFreqScalarFvPatchField.C:144
Foam::DARegDbFluidThermo
Definition:
DARegDbFluidThermo.H:40
Foam::DARegDbFluidThermo::~DARegDbFluidThermo
virtual ~DARegDbFluidThermo()
Destructor.
Definition:
DARegDbFluidThermo.C:33
Foam::DARegDbFluidThermo::writeData
bool writeData(Ostream &os) const
this is a virtual function for regIOobject
Definition:
DARegDbFluidThermo.C:38
Generated by
1.8.17