DAJacCondFdW.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 dFdW
8 
9 \*---------------------------------------------------------------------------*/
10 
11 #ifndef DAJacCondFdW_H
12 #define DAJacCondFdW_H
13 
14 #include "DAJacCon.H"
15 #include "addToRunTimeSelectionTable.H"
16 
17 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
18 
19 namespace Foam
20 {
21 
22 /*---------------------------------------------------------------------------*\
23  Class DAJacCondFdW Declaration
24 \*---------------------------------------------------------------------------*/
25 
27  : public DAJacCon
28 {
29 
30 protected:
32  void initializePetscVecs();
33 
36 
39  const word idxType,
40  const label idxI) const;
41 
44  const word idxType,
45  const label idxI) const;
46 
48  label objFuncFaceSize_ = 0;
49 
51  label objFuncCellSize_ = 0;
52 
53 public:
54  TypeName("dFdW");
55  // Constructors
56 
57  //- Construct from components
59  const word modelType,
60  const fvMesh& mesh,
61  const DAOption& daOption,
62  const DAModel& daModel,
63  const DAIndex& daIndex);
64 
65  //- Destructor
66  virtual ~DAJacCondFdW()
67  {
68  }
69 
70  // Member functions
71 
74  virtual void initializeJacCon(const dictionary& options);
75 
77  virtual void setupJacCon(const dictionary& options);
78 
80  virtual void setObjFuncVec(
81  scalarList objFuncFaceValues,
82  scalarList objFuncCellValues,
83  Vec objFuncVec) const;
84 
86  virtual void clear();
87 };
88 
89 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
90 
91 } // End namespace Foam
92 
93 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
94 
95 #endif
96 
97 // ************************************************************************* //
Foam::DAJacCon
Definition: DAJacCon.H:34
Foam::DAJacCondFdW::~DAJacCondFdW
virtual ~DAJacCondFdW()
Definition: DAJacCondFdW.H:66
Foam::DAJacCondFdW::initializeJacCon
virtual void initializeJacCon(const dictionary &options)
Definition: DAJacCondFdW.C:63
Foam::DAOption
Definition: DAOption.H:29
daOption
DAOption daOption(mesh, pyOptions_)
DAJacCon.H
Foam::DAJacCondFdW::TypeName
TypeName("dFdW")
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
Foam::DAIndex
Definition: DAIndex.H:32
Foam::DAJacCondFdW::globalObjFuncGeoNumbering_
globalIndex globalObjFuncGeoNumbering_
the global numbering for the discrete source of objective function
Definition: DAJacCondFdW.H:35
Foam::DAModel
Definition: DAModel.H:59
Foam
Definition: multiFreqScalarFvPatchField.C:144
Foam::DAJacCondFdW::objFuncCellSize_
label objFuncCellSize_
the size of objFunc cells
Definition: DAJacCondFdW.H:51
Foam::DAJacCondFdW::DAJacCondFdW
DAJacCondFdW(const word modelType, const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex)
Definition: DAJacCondFdW.C:19
Foam::DAJacCondFdW::getLocalObjFuncGeoIndex
label getLocalObjFuncGeoIndex(const word idxType, const label idxI) const
get the local index of geometry element for objective
Definition: DAJacCondFdW.C:320
Foam::DAJacCondFdW::setupJacCon
virtual void setupJacCon(const dictionary &options)
assign 1 to all non-zero elements for the Jacobian connecitivyt matrix
Definition: DAJacCondFdW.C:115
daModel
DAModel daModel(mesh, daOption)
daIndex
DAIndex daIndex(mesh, daOption, daModel)
Foam::DAJacCondFdW::clear
virtual void clear()
clear members in parent and child objects
Definition: DAJacCondFdW.C:35
Foam::DAJacCondFdW
Definition: DAJacCondFdW.H:26
Foam::DAJacCondFdW::setObjFuncVec
virtual void setObjFuncVec(scalarList objFuncFaceValues, scalarList objFuncCellValues, Vec objFuncVec) const
assign values for the objective function vector based on the face and cell value lists
Definition: DAJacCondFdW.C:411
Foam::DAJacCondFdW::getGlobalObjFuncGeoIndex
label getGlobalObjFuncGeoIndex(const word idxType, const label idxI) const
get the global index of geometry element for objective
Definition: DAJacCondFdW.C:372
Foam::DAJacCondFdW::objFuncFaceSize_
label objFuncFaceSize_
the size of objFunc faces
Definition: DAJacCondFdW.H:48
Foam::DAJacCondFdW::initializePetscVecs
void initializePetscVecs()
initialize petsc vectors
Definition: DAJacCondFdW.C:47