DAFoam
v4.0.2
Discrete Adjoint with OpenFOAM
dafoam
src
adjoint
DAFunction
DAFunctionVariableVolSum.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 variable volume sum
8
9
\*---------------------------------------------------------------------------*/
10
11
#ifndef DAFunctionVariableVolSum_H
12
#define DAFunctionVariableVolSum_H
13
14
#include "
DAFunction.H
"
15
#include "addToRunTimeSelectionTable.H"
16
17
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
18
19
namespace
Foam
20
{
21
22
/*---------------------------------------------------------------------------*\
23
Class DAFunctionVariableVolSum Declaration
24
\*---------------------------------------------------------------------------*/
25
26
class
DAFunctionVariableVolSum
27
:
public
DAFunction
28
{
29
30
protected
:
32
word
varName_
;
33
35
word
varType_
;
36
38
label
index_
;
39
41
label
isSquare_
;
42
44
label
divByTotalVol_
;
45
47
label
multiplyVol_
;
48
49
public
:
50
TypeName
(
"variableVolSum"
);
51
// Constructors
52
53
//- Construct from components
54
DAFunctionVariableVolSum
(
55
const
fvMesh&
mesh
,
56
const
DAOption
& daOption,
57
const
DAModel
& daModel,
58
const
DAIndex
& daIndex,
59
const
word functionName);
60
61
//- Destructor
62
virtual
~DAFunctionVariableVolSum
()
63
{
64
}
65
67
virtual
scalar
calcFunction
();
68
};
69
70
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71
72
}
// End namespace Foam
73
74
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
75
76
#endif
77
78
// ************************************************************************* //
Foam::DAFunctionVariableVolSum::varType_
word varType_
type of the variable either vector or scalar
Definition:
DAFunctionVariableVolSum.H:35
Foam::DAFunctionVariableVolSum::varName_
word varName_
name of the variable
Definition:
DAFunctionVariableVolSum.H:32
Foam::DAFunctionVariableVolSum::multiplyVol_
label multiplyVol_
whether to multiply the variable by the volume
Definition:
DAFunctionVariableVolSum.H:47
Foam::DAFunctionVariableVolSum::isSquare_
label isSquare_
whether to take a square of the variable
Definition:
DAFunctionVariableVolSum.H:41
Foam::DAFunctionVariableVolSum::calcFunction
virtual scalar calcFunction()
calculate the value of objective function
Definition:
DAFunctionVariableVolSum.C:47
Foam::DAOption
Definition:
DAOption.H:29
DAFunction.H
Foam::DAFunctionVariableVolSum::DAFunctionVariableVolSum
DAFunctionVariableVolSum(const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex, const word functionName)
Definition:
DAFunctionVariableVolSum.C:19
Foam::DAFunctionVariableVolSum::~DAFunctionVariableVolSum
virtual ~DAFunctionVariableVolSum()
Definition:
DAFunctionVariableVolSum.H:62
mesh
fvMesh & mesh
Definition:
createRefsHeatTransfer.H:4
Foam::DAFunctionVariableVolSum::divByTotalVol_
label divByTotalVol_
whether to normalize the volume sum with the total volume
Definition:
DAFunctionVariableVolSum.H:44
Foam::DAIndex
Definition:
DAIndex.H:32
Foam::DAModel
Definition:
DAModel.H:57
Foam::DAFunction
Definition:
DAFunction.H:31
Foam
Definition:
checkGeometry.C:32
Foam::DAFunctionVariableVolSum
Definition:
DAFunctionVariableVolSum.H:26
Foam::DAFunctionVariableVolSum::index_
label index_
if vector which element/index?
Definition:
DAFunctionVariableVolSum.H:38
Foam::DAFunctionVariableVolSum::TypeName
TypeName("variableVolSum")
Generated by
1.8.17