DAJacCondRdW.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 dRdW
8 
9 \*---------------------------------------------------------------------------*/
10 
11 #ifndef DAJacCondRdW_H
12 #define DAJacCondRdW_H
13 
14 #include "DAJacCon.H"
15 #include "addToRunTimeSelectionTable.H"
16 
17 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
18 
19 namespace Foam
20 {
21 
22 /*---------------------------------------------------------------------------*\
23  Class DAJacCondRdW Declaration
24 \*---------------------------------------------------------------------------*/
25 
27  : public DAJacCon
28 {
29 
30 protected:
32 
38 
40  void initializePetscVecs();
41 
44  Vec preallocOnProc,
45  Vec preallocOffProc,
46  Vec preallocOnProcT,
47  Vec preallocOffProcT,
48  Mat connections,
49  const label row);
50 
53  Mat dRMat,
54  const Vec preallocOnProc,
55  const Vec preallocOffProc) const;
56 
57  void setupdRdWCon(
58  const HashTable<List<List<word>>>& stateResConInfo,
59  const label isPrealloc);
60 
61 public:
62  TypeName("dRdW");
63  // Constructors
64 
65  //- Construct from components
67  const word modelType,
68  const fvMesh& mesh,
69  const DAOption& daOption,
70  const DAModel& daModel,
71  const DAIndex& daIndex);
72 
73  //- Destructor
74  virtual ~DAJacCondRdW()
75  {
76  }
77 
78  // Member functions
79 
81  virtual void setupJacConPreallocation(const dictionary& options);
82 
84  virtual void initializeJacCon(const dictionary& options);
85 
87  virtual void setupJacCon(const dictionary& options);
88 
90  virtual void preallocatedRdW(
91  Mat dRMat,
92  const label transposed) const;
93 
95  virtual void clear();
96 };
97 
98 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
99 
100 } // End namespace Foam
101 
102 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
103 
104 #endif
105 
106 // ************************************************************************* //
Foam::DAJacCon
Definition: DAJacCon.H:34
Foam::DAJacCondRdW::preallocatedRdW
virtual void preallocatedRdW(Mat dRMat, const label transposed) const
preallocate memory for dRdW using the computed preallocation vectors
Definition: DAJacCondRdW.C:858
Foam::DAJacCondRdW::setupdRdWCon
void setupdRdWCon(const HashTable< List< List< word >>> &stateResConInfo, const label isPrealloc)
Definition: DAJacCondRdW.C:151
Foam::DAOption
Definition: DAOption.H:29
Foam::DAJacCondRdW::clear
virtual void clear()
clear members in parent and child objects
Definition: DAJacCondRdW.C:34
Foam::DAJacCondRdW::dRdWTPreallocOff_
Vec dRdWTPreallocOff_
Definition: DAJacCondRdW.H:34
daOption
DAOption daOption(mesh, pyOptions_)
Foam::DAJacCondRdW::setupJacConPreallocation
virtual void setupJacConPreallocation(const dictionary &options)
calculate the
Definition: DAJacCondRdW.C:78
Foam::DAJacCondRdW::~DAJacCondRdW
virtual ~DAJacCondRdW()
Definition: DAJacCondRdW.H:74
Foam::DAJacCondRdW::initializePetscVecs
void initializePetscVecs()
initialize petsc vectors
Definition: DAJacCondRdW.C:50
DAJacCon.H
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
Foam::DAJacCondRdW::dRdWPreallocOn_
Vec dRdWPreallocOn_
Definition: DAJacCondRdW.H:35
Foam::DAIndex
Definition: DAIndex.H:32
Foam::DAModel
Definition: DAModel.H:59
Foam
Definition: multiFreqScalarFvPatchField.C:144
Foam::DAJacCondRdW::dRdWTPreallocOn_
Vec dRdWTPreallocOn_
Definition: DAJacCondRdW.H:33
Foam::DAJacCondRdW::initializeJacCon
virtual void initializeJacCon(const dictionary &options)
initialize the state Jacobian connectivity matrix
Definition: DAJacCondRdW.C:119
Foam::DAJacCondRdW::DAJacCondRdW
DAJacCondRdW(const word modelType, const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex)
Definition: DAJacCondRdW.C:19
Foam::DAJacCondRdW::TypeName
TypeName("dRdW")
daModel
DAModel daModel(mesh, daOption)
Foam::DAJacCondRdW::allocateJacobianConnections
void allocateJacobianConnections(Vec preallocOnProc, Vec preallocOffProc, Vec preallocOnProcT, Vec preallocOffProcT, Mat connections, const label row)
compute preallocation vectors
Definition: DAJacCondRdW.C:714
daIndex
DAIndex daIndex(mesh, daOption, daModel)
Foam::DAJacCondRdW::setupJacCon
virtual void setupJacCon(const dictionary &options)
assign 1 to all non-zero elements for the Jacobian connecitivyt matrix
Definition: DAJacCondRdW.C:101
Foam::DAJacCondRdW
Definition: DAJacCondRdW.H:26
Foam::DAJacCondRdW::dRdWPreallocOff_
Vec dRdWPreallocOff_
Definition: DAJacCondRdW.H:36
Foam::DAJacCondRdW::preallocateJacobianMatrix
void preallocateJacobianMatrix(Mat dRMat, const Vec preallocOnProc, const Vec preallocOffProc) const
compute preallocation vectors
Definition: DAJacCondRdW.C:803