#include <cgnealg.hh>
Inheritance diagram for RVLUmin::PCGNEStep< Scalar >:
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 > |
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.
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.
RVLUmin::PCGNEStep< Scalar >::~PCGNEStep | ( | ) |
Definition at line 290 of file cgnealg.hh.
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.
friend class CGNEAlg< Scalar > [friend] |
Definition at line 207 of file cgnealg.hh.
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().
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().
Vector<Scalar>& RVLUmin::PCGNEStep< Scalar >::x [protected] |
Vector<Scalar> const& RVLUmin::PCGNEStep< Scalar >::b [protected] |
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().
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().