DAFunctionResidualNorm.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2 
3  DAFoam : Discrete Adjoint with OpenFOAM
4  Version : v4
5 
6  Description:
7  Child class for residual norm
8 
9 \*---------------------------------------------------------------------------*/
10 
11 #ifndef DAFunctionResidualNorm_H
12 #define DAFunctionResidualNorm_H
13 
14 #include "DAFunction.H"
15 #include "addToRunTimeSelectionTable.H"
16 #include "DAResidual.H"
17 
18 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
19 
20 namespace Foam
21 {
22 
23 /*---------------------------------------------------------------------------*\
24  Class DAFunctionResidualNorm Declaration
25 \*---------------------------------------------------------------------------*/
26 
28  : public DAFunction
29 {
30 
31 protected:
33  HashTable<scalar> resWeight_;
34 
36  HashTable<wordList> stateInfo_;
37 
38 public:
39  TypeName("residualNorm");
40  // Constructors
41 
42  //- Construct from components
44  const fvMesh& mesh,
45  const DAOption& daOption,
46  const DAModel& daModel,
47  const DAIndex& daIndex,
48  const word functionName);
49 
50  //- Destructor
52  {
53  }
54 
56  virtual scalar calcFunction();
57 };
58 
59 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 
61 } // End namespace Foam
62 
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 
65 #endif
66 
67 // ************************************************************************* //
Foam::DAFunctionResidualNorm::resWeight_
HashTable< scalar > resWeight_
weights of the residuals
Definition: DAFunctionResidualNorm.H:33
Foam::DAOption
Definition: DAOption.H:29
DAFunction.H
DAResidual.H
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
Foam::DAFunctionResidualNorm::TypeName
TypeName("residualNorm")
Foam::DAFunctionResidualNorm::calcFunction
virtual scalar calcFunction()
calculate the value of objective function
Definition: DAFunctionResidualNorm.C:49
Foam::DAIndex
Definition: DAIndex.H:32
Foam::DAModel
Definition: DAModel.H:57
Foam::DAFunction
Definition: DAFunction.H:31
Foam::DAFunctionResidualNorm::stateInfo_
HashTable< wordList > stateInfo_
the stateInfo_ list from DAStateInfo object
Definition: DAFunctionResidualNorm.H:36
Foam::DAFunctionResidualNorm::DAFunctionResidualNorm
DAFunctionResidualNorm(const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex, const word functionName)
Definition: DAFunctionResidualNorm.C:19
Foam
Definition: checkGeometry.C:32
Foam::DAFunctionResidualNorm::~DAFunctionResidualNorm
virtual ~DAFunctionResidualNorm()
Definition: DAFunctionResidualNorm.H:51
Foam::DAFunctionResidualNorm
Definition: DAFunctionResidualNorm.H:27