FV3 Bundle
oops::DRPCGMinimizer< MODEL > Class Template Reference

DRPCG Minimizer. More...

#include <DRPCGMinimizer.h>

Inheritance diagram for oops::DRPCGMinimizer< MODEL >:
[legend]
Collaboration diagram for oops::DRPCGMinimizer< MODEL >:
[legend]

Public Member Functions

const std::string classname () const override
 
 DRPCGMinimizer (const eckit::Configuration &, const CostFct_ &)
 
 ~DRPCGMinimizer ()
 
- Public Member Functions inherited from oops::DRMinimizer< MODEL >
 DRMinimizer (const CostFct_ &J)
 
 ~DRMinimizer ()
 
- Public Member Functions inherited from oops::Minimizer< MODEL >
 Minimizer (const CostFct_ &J)
 
virtual ~Minimizer ()
 
ControlIncrement< MODEL > * minimize (const eckit::Configuration &)
 

Private Types

typedef BMatrix< MODEL > Bmat_
 
typedef CostFunction< MODEL > CostFct_
 
typedef ControlIncrement< MODEL > CtrlInc_
 
typedef HtRinvHMatrix< MODEL > HtRinvH_
 

Private Member Functions

double solve (CtrlInc_ &, CtrlInc_ &, CtrlInc_ &, const Bmat_ &, const HtRinvH_ &, const double, const double, const int, const double) override
 

Private Attributes

QNewtonLMP< CtrlInc_, Bmat_lmp_
 

Detailed Description

template<typename MODEL>
class oops::DRPCGMinimizer< MODEL >

DRPCG Minimizer.

Derber-Rosati Preconditioned Conjugate Gradients solver.

This solver is based on the standard Preconditioned Conjugate Gradients solver for Ax=b (G. H. Golub and C. F. Van Loan, Matrix Computations), and on the Derber and Rosati double PCG algorithm (J. Derber and A. Rosati, 1989, J. Phys. Oceanog. 1333-1347). For details see S. Gurol, PhD Manuscript, 2013. It solves \( Ax=b\) for the particular case \( A=B^{-1}+C\), without requiring the application of \( B^{-1}\). This algorithm is similar to DRIPCG except it includes standard PCG instead IPCG and stopping criteria is based on the preconditioner norm.

A must be square, symmetric, positive definite.

A preconditioner must be supplied that, given a vector q, returns an approximation to \( (AB)^{-1} q\). Possible preconditioning is detailed in S. Gurol, PhD Manuscript, 2013. Note that the traditional \( B\)-preconditioning corresponds to precond= \(I\).

On entry:

  • dx = starting point, \( dx_{0} \).
  • dxh = \( B^{-1} dx_{0} \).
  • rr = \( (sum B^-1 dx^{b}_{i} + ) H^T R^{-1} d \)
  • B = \( B \).
  • C = \( C \).
  • precond = preconditioner \( F_k \approx (AB)^{-1} \).

On exit, dx will contain the solution \( dx \) and dxh will contain \( B^{-1} dx\). The return value is the achieved reduction in preconditioned residual norm.

Iteration will stop if the maximum iteration limit "maxiter" is reached or if the residual norm reduces by a factor of "tolerance".

Each matrix must implement a method:

  • void multiply(const VECTOR&, VECTOR&) const

which applies the matrix to the first argument, and returns the matrix-vector product in the second. (Note: the const is optional, but recommended.)

Definition at line 78 of file DRPCGMinimizer.h.

Member Typedef Documentation

◆ Bmat_

template<typename MODEL >
typedef BMatrix<MODEL> oops::DRPCGMinimizer< MODEL >::Bmat_
private

Definition at line 79 of file DRPCGMinimizer.h.

◆ CostFct_

template<typename MODEL >
typedef CostFunction<MODEL> oops::DRPCGMinimizer< MODEL >::CostFct_
private

Definition at line 80 of file DRPCGMinimizer.h.

◆ CtrlInc_

template<typename MODEL >
typedef ControlIncrement<MODEL> oops::DRPCGMinimizer< MODEL >::CtrlInc_
private

Definition at line 81 of file DRPCGMinimizer.h.

◆ HtRinvH_

template<typename MODEL >
typedef HtRinvHMatrix<MODEL> oops::DRPCGMinimizer< MODEL >::HtRinvH_
private

Definition at line 82 of file DRPCGMinimizer.h.

Constructor & Destructor Documentation

◆ DRPCGMinimizer()

template<typename MODEL >
oops::DRPCGMinimizer< MODEL >::DRPCGMinimizer ( const eckit::Configuration &  conf,
const CostFct_ J 
)

Definition at line 99 of file DRPCGMinimizer.h.

◆ ~DRPCGMinimizer()

template<typename MODEL >
oops::DRPCGMinimizer< MODEL >::~DRPCGMinimizer ( )
inline

Definition at line 87 of file DRPCGMinimizer.h.

Member Function Documentation

◆ classname()

template<typename MODEL >
const std::string oops::DRPCGMinimizer< MODEL >::classname ( ) const
inlineoverridevirtual

Implements oops::DRMinimizer< MODEL >.

Definition at line 85 of file DRPCGMinimizer.h.

◆ solve()

template<typename MODEL >
double oops::DRPCGMinimizer< MODEL >::solve ( CtrlInc_ dx,
CtrlInc_ dxh,
CtrlInc_ rr,
const Bmat_ B,
const HtRinvH_ HtRinvH,
const double  costJ0Jb,
const double  costJ0JoJc,
const int  maxiter,
const double  tolerance 
)
overrideprivatevirtual

Implements oops::DRMinimizer< MODEL >.

Definition at line 106 of file DRPCGMinimizer.h.

Here is the call graph for this function:

Member Data Documentation

◆ lmp_

template<typename MODEL >
QNewtonLMP<CtrlInc_, Bmat_> oops::DRPCGMinimizer< MODEL >::lmp_
private

Definition at line 93 of file DRPCGMinimizer.h.


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