DAGlobalVar.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2 
3  DAFoam : Discrete Adjoint with OpenFOAM
4  Version : v4
5 
6  Description:
7  This class saves global variables and register it to mesh.thisDb()
8  such that all other class can access its members
9 
10 \*---------------------------------------------------------------------------*/
11 
12 #ifndef DAGlobalVar_H
13 #define DAGlobalVar_H
14 
15 #include "fvOptions.H"
16 
17 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
18 
19 namespace Foam
20 {
21 
22 /*---------------------------------------------------------------------------*\
23  Class DAGlobalVar Declaration
24 \*---------------------------------------------------------------------------*/
25 
27  : public regIOobject
28 {
29 
30 private:
32  DAGlobalVar(const DAGlobalVar&);
33 
35  void operator=(const DAGlobalVar&);
36 
37 protected:
39  const fvMesh& mesh_;
40 
41 public:
43  DAGlobalVar(const fvMesh& mesh);
44 
46  virtual ~DAGlobalVar()
47  {
48  }
49 
51  bool writeData(Ostream& os) const
52  {
53  return true;
54  }
55 
56  // ************** global variables ******************
57 
59  scalarList patchVelocity = {0.0, 0.0};
60 
62  scalar primalMaxRes = 0.0;
63 
65  HashTable<List<scalar>> actuatorDiskPars;
66 
68  HashTable<List<scalar>> actuatorLinePars;
69 
71  HashTable<List<scalar>> actuatorPointPars;
72 
74  HashTable<List<scalar>> heatSourcePars;
75 
77  HashTable<List<scalar>> inputFieldUnsteady;
78 };
79 
80 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
81 
82 } // End namespace Foam
83 
84 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
85 
86 #endif
87 
88 // ************************************************************************* //
Foam::DAGlobalVar::mesh_
const fvMesh & mesh_
Foam::fvMesh object.
Definition: DAGlobalVar.H:39
Foam::DAGlobalVar::actuatorDiskPars
HashTable< List< scalar > > actuatorDiskPars
the list of parameters for all the actuator disks
Definition: DAGlobalVar.H:65
Foam::DAGlobalVar::patchVelocity
scalarList patchVelocity
patch velocity list [UMag, AOA] AoA is in degrees
Definition: DAGlobalVar.H:59
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
Foam::DAGlobalVar::~DAGlobalVar
virtual ~DAGlobalVar()
Destructor.
Definition: DAGlobalVar.H:46
Foam::DAGlobalVar::writeData
bool writeData(Ostream &os) const
this is a virtual function for regIOobject
Definition: DAGlobalVar.H:51
Foam::DAGlobalVar::heatSourcePars
HashTable< List< scalar > > heatSourcePars
the list of parameters for all the actuator disks
Definition: DAGlobalVar.H:74
Foam::DAGlobalVar::inputFieldUnsteady
HashTable< List< scalar > > inputFieldUnsteady
the unsteady field inputs with the key being the fieldName
Definition: DAGlobalVar.H:77
Foam::DAGlobalVar::primalMaxRes
scalar primalMaxRes
the maximal residual for primal this var will be used in multiple classes
Definition: DAGlobalVar.H:62
Foam
Definition: checkGeometry.C:32
Foam::DAGlobalVar::actuatorPointPars
HashTable< List< scalar > > actuatorPointPars
the list of parameters for all the actuator points
Definition: DAGlobalVar.H:71
Foam::DAGlobalVar
Definition: DAGlobalVar.H:26
Foam::DAGlobalVar::actuatorLinePars
HashTable< List< scalar > > actuatorLinePars
the list of parameters for all the actuator lines
Definition: DAGlobalVar.H:68