DAInput.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2 
3  DAFoam : Discrete Adjoint with OpenFOAM
4  Version : v4
5 
6  Description:
7  Assign the input array to the OF variables
8 
9 \*---------------------------------------------------------------------------*/
10 
11 #ifndef DAInput_H
12 #define DAInput_H
13 
14 #include "runTimeSelectionTables.H"
15 #include "fvOptions.H"
16 #include "DAOption.H"
17 #include "DAModel.H"
18 #include "DAIndex.H"
19 #include "DAStateInfo.H"
20 
21 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
22 
23 namespace Foam
24 {
25 
26 /*---------------------------------------------------------------------------*\
27  Class DAInput Declaration
28 \*---------------------------------------------------------------------------*/
29 
30 class DAInput
31 {
32 
33 private:
35  DAInput(const DAInput&);
36 
38  void operator=(const DAInput&);
39 
40 protected:
42  const word inputName_;
43 
45  const word inputType_;
46 
48  fvMesh& mesh_;
49 
52 
54  const DAModel& daModel_;
55 
57  const DAIndex& daIndex_;
58 
60  HashTable<wordList> stateInfo_;
61 
62 public:
64  TypeName("DAInput");
65 
66  // Declare run-time constructor selection table
68  autoPtr,
69  DAInput,
70  dictionary,
71  (
72  const word inputName,
73  const word inputType,
74  fvMesh& mesh,
75  const DAOption& daOption,
76  const DAModel& daModel,
77  const DAIndex& daIndex),
78  (
79  inputName,
80  inputType,
81  mesh,
82  daOption,
83  daModel,
84  daIndex));
85 
86  // Constructors
87 
88  //- Construct from components
89  DAInput(
90  const word inputName,
91  const word inputType,
92  fvMesh& mesh,
93  const DAOption& daOption,
94  const DAModel& daModel,
95  const DAIndex& daIndex);
96 
97  // Selectors
98 
99  //- Return a reference to the selected model
100  static autoPtr<DAInput> New(
101  const word inputName,
102  const word inputType,
103  fvMesh& mesh,
104  const DAOption& daOption,
105  const DAModel& daModel,
106  const DAIndex& daIndex);
107 
108  //- Destructor
109  virtual ~DAInput()
110  {
111  }
112 
113  virtual void run(const scalarList& input) = 0;
114 
115  virtual label size() = 0;
116 
117  virtual label distributed() = 0;
118 };
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 } // End namespace Foam
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #endif
127 
128 // ************************************************************************* //
DAOption.H
Foam::DAInput::size
virtual label size()=0
Foam::DAInput::daIndex_
const DAIndex & daIndex_
DAIndex object.
Definition: DAInput.H:57
DAIndex.H
Foam::DAInput::inputName_
const word inputName_
name of the input
Definition: DAInput.H:42
Foam::DAOption
Definition: DAOption.H:29
Foam::DAInput::daModel_
const DAModel & daModel_
DAIndex object.
Definition: DAInput.H:54
Foam::DAInput::New
static autoPtr< DAInput > New(const word inputName, const word inputType, fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex)
Definition: DAInput.C:44
DAModel.H
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
Foam::DAInput::distributed
virtual label distributed()=0
Foam::DAInput::TypeName
TypeName("DAInput")
Runtime type information.
Foam::DAIndex
Definition: DAIndex.H:32
Foam::DAInput::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, DAInput, dictionary,(const word inputName, const word inputType, fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex),(inputName, inputType, mesh, daOption, daModel, daIndex))
Foam::DAInput::stateInfo_
HashTable< wordList > stateInfo_
the stateInfo_ list from DAStateInfo object
Definition: DAInput.H:60
Foam::DAInput::daOption_
const DAOption & daOption_
DAOption object.
Definition: DAInput.H:51
Foam::DAModel
Definition: DAModel.H:57
Foam
Definition: checkGeometry.C:32
Foam::DAInput::inputType_
const word inputType_
type of the input
Definition: DAInput.H:45
Foam::DAInput::~DAInput
virtual ~DAInput()
Definition: DAInput.H:109
Foam::DAInput
Definition: DAInput.H:30
Foam::DAInput::run
virtual void run(const scalarList &input)=0
DAStateInfo.H
Foam::DAInput::mesh_
fvMesh & mesh_
fvMesh
Definition: DAInput.H:48