DAObjFuncCenterOfPressure.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2 
3  DAFoam : Discrete Adjoint with OpenFOAM
4  Version : v3
5 
6  Description:
7  Child class for center of pressure
8 
9 \*---------------------------------------------------------------------------*/
10 
11 #ifndef DAObjFuncCenterOfPressure_H
12 #define DAObjFuncCenterOfPressure_H
13 
14 #include "DAObjFunc.H"
15 #include "addToRunTimeSelectionTable.H"
16 
17 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
18 
19 namespace Foam
20 {
21 
22 /*---------------------------------------------------------------------------*\
23  Class DAObjFuncCenterOfPressure Declaration
24 \*---------------------------------------------------------------------------*/
25 
27  : public DAObjFunc
28 {
29 
30 protected:
31 
33  vector axis_;
34 
36  vector forceAxis_;
37 
39  vector center_;
40 
41 public:
42  TypeName("centerOfPressure");
43  // Constructors
44 
45  //- Construct from components
47  const fvMesh& mesh,
48  const DAOption& daOption,
49  const DAModel& daModel,
50  const DAIndex& daIndex,
51  const DAResidual& daResidual,
52  const word objFuncName,
53  const word objFuncPart,
54  const dictionary& objFuncDict);
55 
56  //- Destructor
58  {
59  }
60 
62  virtual void calcObjFunc(
63  const labelList& objFuncFaceSources,
64  const labelList& objFuncCellSources,
65  scalarList& objFuncFaceValues,
66  scalarList& objFuncCellValues,
67  scalar& objFuncValue);
68 };
69 
70 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71 
72 } // End namespace Foam
73 
74 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
75 
76 #endif
77 
78 // ************************************************************************* //
Foam::DAObjFuncCenterOfPressure
Definition: DAObjFuncCenterOfPressure.H:26
Foam::DAOption
Definition: DAOption.H:29
Foam::DAObjFuncCenterOfPressure::TypeName
TypeName("centerOfPressure")
daOption
DAOption daOption(mesh, pyOptions_)
Foam::DAObjFuncCenterOfPressure::forceAxis_
vector forceAxis_
the direction to project the force onto
Definition: DAObjFuncCenterOfPressure.H:36
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
Foam::DAIndex
Definition: DAIndex.H:32
Foam::DAObjFuncCenterOfPressure::~DAObjFuncCenterOfPressure
virtual ~DAObjFuncCenterOfPressure()
Definition: DAObjFuncCenterOfPressure.H:57
Foam::DAObjFuncCenterOfPressure::calcObjFunc
virtual void calcObjFunc(const labelList &objFuncFaceSources, const labelList &objFuncCellSources, scalarList &objFuncFaceValues, scalarList &objFuncCellValues, scalar &objFuncValue)
calculate the value of objective function
Definition: DAObjFuncCenterOfPressure.C:77
Foam::DAModel
Definition: DAModel.H:59
Foam
Definition: multiFreqScalarFvPatchField.C:144
Foam::DAObjFuncCenterOfPressure::axis_
vector axis_
the direction to project the center of pressure onto
Definition: DAObjFuncCenterOfPressure.H:33
Foam::DAResidual
Definition: DAResidual.H:35
Foam::DAObjFuncCenterOfPressure::DAObjFuncCenterOfPressure
DAObjFuncCenterOfPressure(const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex, const DAResidual &daResidual, const word objFuncName, const word objFuncPart, const dictionary &objFuncDict)
Definition: DAObjFuncCenterOfPressure.C:19
daModel
DAModel daModel(mesh, daOption)
daIndex
DAIndex daIndex(mesh, daOption, daModel)
Foam::DAObjFuncCenterOfPressure::center_
vector center_
The point to compute center of pressure about.
Definition: DAObjFuncCenterOfPressure.H:39
DAObjFunc.H
Foam::DAObjFunc
Definition: DAObjFunc.H:33