RVLUmin::PCGNEStep< Scalar > Class Template Reference

Preconditioned conjugate gradient iteration for the normal equations. More...

#include <cgnealg.hh>

Inheritance diagram for RVLUmin::PCGNEStep< Scalar >:

RVLAlg::Algorithm List of all members.

Public Member Functions

 PCGNEStep (LinearOp< Scalar > const &_A, LinearOp< Scalar > const &_M, Vector< Scalar > &_x, Vector< Scalar > const &_b, atype &_rnorm, atype &_nrnorm)
void run ()
 Run a single step of the conjugate gradients for the normal equations.
 ~PCGNEStep ()

Protected Attributes

LinearOp< Scalar > const & A
LinearOp< Scalar > const & M
Vector< Scalar > & x
Vector< Scalar > const & b
atype & rnorm
atype & nrnorm

Friends

class CGNEAlg< Scalar >

Detailed Description

template<typename Scalar>
class RVLUmin::PCGNEStep< Scalar >

Preconditioned conjugate gradient iteration for the normal equations.

On construction, internal workspace allocated and initialized. Each step updates internal state of CGNEStep object. Since solution vector, residual norm, and normal residual norm are stored as mutable references to external objects, these external objects are updated as well.

IMPORTANT NOTE: this version of the algorithm assumes that the solution vector reference (internal data member x) refers to a zero vector on initialization. To accommodate nontrivial initial guess, modify the right-hand-side vector (argument _b) externally.

Solution vector (x), iteration count, residual norm, and gradient norm are all references to external objects, which may be monitored by appropriate terminators to build a LoopAlg out of this Algorithm.

See CGNEAlg for description of a fully functional algorithm class, combining this step with a Terminator to make a LoopAlg.

Definition at line 205 of file cgnealg.hh.


Constructor & Destructor Documentation

template<typename Scalar>
RVLUmin::PCGNEStep< Scalar >::PCGNEStep ( LinearOp< Scalar > const &  _A,
LinearOp< Scalar > const &  _M,
Vector< Scalar > &  _x,
Vector< Scalar > const &  _b,
atype &  _rnorm,
atype &  _nrnorm 
)

Definition at line 213 of file cgnealg.hh.

References RVLUmin::PCGNEStep< Scalar >::A, RVLUmin::PCGNEStep< Scalar >::b, RVLUmin::PCGNEStep< Scalar >::M, RVLUmin::PCGNEStep< Scalar >::nrnorm, and RVLUmin::PCGNEStep< Scalar >::rnorm.

template<typename Scalar>
RVLUmin::PCGNEStep< Scalar >::~PCGNEStep (  ) 

Definition at line 290 of file cgnealg.hh.


Member Function Documentation

template<typename Scalar>
void RVLUmin::PCGNEStep< Scalar >::run (  )  [virtual]

Run a single step of the conjugate gradients for the normal equations.

Implements RVLAlg::Algorithm.

Definition at line 249 of file cgnealg.hh.

References RVLUmin::PCGNEStep< Scalar >::A, RVLUmin::PCGNEStep< Scalar >::M, RVLUmin::PCGNEStep< Scalar >::nrnorm, RVLUmin::PCGNEStep< Scalar >::rnorm, and RVLUmin::PCGNEStep< Scalar >::x.


Friends And Related Function Documentation

template<typename Scalar>
friend class CGNEAlg< Scalar > [friend]

Definition at line 207 of file cgnealg.hh.


Member Data Documentation

template<typename Scalar>
LinearOp<Scalar> const& RVLUmin::PCGNEStep< Scalar >::A [protected]

Definition at line 295 of file cgnealg.hh.

Referenced by RVLUmin::PCGNEStep< Scalar >::PCGNEStep(), and RVLUmin::PCGNEStep< Scalar >::run().

template<typename Scalar>
LinearOp<Scalar> const& RVLUmin::PCGNEStep< Scalar >::M [protected]

Definition at line 296 of file cgnealg.hh.

Referenced by RVLUmin::PCGNEStep< Scalar >::PCGNEStep(), and RVLUmin::PCGNEStep< Scalar >::run().

template<typename Scalar>
Vector<Scalar>& RVLUmin::PCGNEStep< Scalar >::x [protected]

Definition at line 297 of file cgnealg.hh.

Referenced by RVLUmin::PCGNEStep< Scalar >::run().

template<typename Scalar>
Vector<Scalar> const& RVLUmin::PCGNEStep< Scalar >::b [protected]

Definition at line 298 of file cgnealg.hh.

Referenced by RVLUmin::PCGNEStep< Scalar >::PCGNEStep().

template<typename Scalar>
atype& RVLUmin::PCGNEStep< Scalar >::rnorm [protected]

Definition at line 299 of file cgnealg.hh.

Referenced by RVLUmin::PCGNEStep< Scalar >::PCGNEStep(), and RVLUmin::PCGNEStep< Scalar >::run().

template<typename Scalar>
atype& RVLUmin::PCGNEStep< Scalar >::nrnorm [protected]

Definition at line 300 of file cgnealg.hh.

Referenced by RVLUmin::PCGNEStep< Scalar >::PCGNEStep(), and RVLUmin::PCGNEStep< Scalar >::run().


The documentation for this class was generated from the following file:
Generated on 5 Jan 2017 for RvlUmin by  doxygen 1.4.7