Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
DALinearEqn Class Reference
Collaboration diagram for DALinearEqn:
Collaboration graph
[legend]

Public Member Functions

 DALinearEqn (const fvMesh &mesh, const DAOption &daOption)
 Constructors. More...
 
virtual ~DALinearEqn ()
 Destructor. More...
 
void createMLRKSP (const Mat jacMat, const Mat jacPCMat, KSP ksp)
 create a multi-level, Richardson KSP object More...
 
label solveLinearEqn (const KSP ksp, const Vec rhsVec, Vec solVec)
 solve the linear equation given a ksp and right-hand-side vector More...
 
label getRunTime ()
 return the runtime for the adjoint solver More...
 
label getPrintInterval ()
 return printInterval from DAOption More...
 

Static Public Member Functions

static PetscErrorCode myKSPMonitor (KSP, PetscInt, PetscReal, void *)
 ksp monitor function More...
 

Protected Attributes

const fvMesh & mesh_
 Foam::fvMesh object. More...
 
const DAOptiondaOption_
 Foam::DAOption object. More...
 

Detailed Description

Definition at line 31 of file DALinearEqn.H.

Constructor & Destructor Documentation

◆ DALinearEqn()

DALinearEqn ( const fvMesh &  mesh,
const DAOption daOption 
)

Constructors.

Definition at line 17 of file DALinearEqn.C.

◆ ~DALinearEqn()

virtual ~DALinearEqn ( )
inlinevirtual

Destructor.

Definition at line 55 of file DALinearEqn.H.

Member Function Documentation

◆ createMLRKSP()

void createMLRKSP ( const Mat  jacMat,
const Mat  jacPCMat,
KSP  ksp 
)

create a multi-level, Richardson KSP object

Definition at line 27 of file DALinearEqn.C.

References assignValueCheckAD, DALinearEqn::daOption_, DAOption::getSubDictOption(), and DALinearEqn::myKSPMonitor().

Here is the call graph for this function:

◆ solveLinearEqn()

label solveLinearEqn ( const KSP  ksp,
const Vec  rhsVec,
Vec  solVec 
)

solve the linear equation given a ksp and right-hand-side vector

Definition at line 335 of file DALinearEqn.C.

References DALinearEqn::daOption_, DALinearEqn::getRunTime(), and DAOption::getSubDictOption().

Here is the call graph for this function:

◆ myKSPMonitor()

PetscErrorCode myKSPMonitor ( KSP  ksp,
PetscInt  n,
PetscReal  rnorm,
void *  ctx 
)
static

ksp monitor function

Definition at line 408 of file DALinearEqn.C.

References DALinearEqn::getPrintInterval(), and DALinearEqn::getRunTime().

Referenced by DALinearEqn::createMLRKSP().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRunTime()

label getRunTime ( )

return the runtime for the adjoint solver

Definition at line 441 of file DALinearEqn.C.

References DALinearEqn::mesh_.

Referenced by DALinearEqn::myKSPMonitor(), and DALinearEqn::solveLinearEqn().

Here is the caller graph for this function:

◆ getPrintInterval()

label getPrintInterval ( )

return printInterval from DAOption

Definition at line 450 of file DALinearEqn.C.

References DALinearEqn::daOption_, and DAOption::getOption().

Referenced by DALinearEqn::myKSPMonitor().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ mesh_

const fvMesh& mesh_
protected

Foam::fvMesh object.

Definition at line 43 of file DALinearEqn.H.

Referenced by DALinearEqn::getRunTime().

◆ daOption_

const DAOption& daOption_
protected

The documentation for this class was generated from the following files: