Belos::CG< ScalarType, MV, OP > Class Template Reference

This class implements the preconditioned Conjugate Gradient algorithm for solving real symmetric positive definite linear systems of equations Ax = b, where b is the right-hand side vector and x is the corresponding solution. More...

#include <BelosCG.hpp>

Inheritance diagram for Belos::CG< ScalarType, MV, OP >:

Inheritance graph
[legend]
List of all members.

Public Types

typedef MultiVecTraits< ScalarType,
MV > 
MVT
typedef OperatorTraits< ScalarType,
MV, OP > 
OPT
typedef Teuchos::ScalarTraits<
ScalarType > 
SCT
typedef SCT::magnitudeType MagnitudeType

Public Member Functions

Constructor/Destructor.
 CG (const RefCountPtr< LinearProblem< ScalarType, MV, OP > > &lp, const RefCountPtr< StatusTest< ScalarType, MV, OP > > &stest, const RefCountPtr< OutputManager< ScalarType > > &om, const RefCountPtr< ParameterList > &pl=Teuchos::null)
 Belos::CG constructor.
virtual ~CG ()
 Belos::CG destructor.
Accessor methods
int GetNumIters () const
 Get the iteration count for the current linear system.
int GetNumRestarts () const
 Get the restart count of the iteration method for the current linear system [not valid for CG].
RefCountPtr< const MV > GetNativeResiduals (std::vector< MagnitudeType > *normvec) const
 Get the solvers native residual for the current linear system.
RefCountPtr< MV > GetCurrentSoln ()
 Get the actual residual vector for the current linear system.
RefCountPtr< LinearProblem<
ScalarType, MV, OP > > 
GetLinearProblem () const
 Get a constant reference to the current linear problem.
RefCountPtr< StatusTest< ScalarType,
MV, OP > > 
GetStatusTest () const
Solver application method.
void Solve ()
 This method uses the iterative method to compute approximate solutions to the original problem. This method can return unconverged if the maximum number of iterations is reached, or numerical breakdown is observed.
Overridden from Teuchos::Describable
std::string description () const
 Method to return description of the block GMRES solver.

Detailed Description

template<class ScalarType, class MV, class OP>
class Belos::CG< ScalarType, MV, OP >

This class implements the preconditioned Conjugate Gradient algorithm for solving real symmetric positive definite linear systems of equations Ax = b, where b is the right-hand side vector and x is the corresponding solution.

Author:
Heidi Thornquist

Definition at line 70 of file BelosCG.hpp.


Member Typedef Documentation

template<class ScalarType, class MV, class OP>
typedef MultiVecTraits<ScalarType,MV> Belos::CG< ScalarType, MV, OP >::MVT
 

Definition at line 75 of file BelosCG.hpp.

template<class ScalarType, class MV, class OP>
typedef OperatorTraits<ScalarType,MV,OP> Belos::CG< ScalarType, MV, OP >::OPT
 

Definition at line 76 of file BelosCG.hpp.

template<class ScalarType, class MV, class OP>
typedef Teuchos::ScalarTraits<ScalarType> Belos::CG< ScalarType, MV, OP >::SCT
 

Reimplemented from Belos::IterativeSolver< ScalarType, MV, OP >.

Definition at line 77 of file BelosCG.hpp.

template<class ScalarType, class MV, class OP>
typedef SCT::magnitudeType Belos::CG< ScalarType, MV, OP >::MagnitudeType
 

Reimplemented from Belos::IterativeSolver< ScalarType, MV, OP >.

Definition at line 78 of file BelosCG.hpp.


Constructor & Destructor Documentation

template<class ScalarType, class MV, class OP>
Belos::CG< ScalarType, MV, OP >::CG const RefCountPtr< LinearProblem< ScalarType, MV, OP > > &  lp,
const RefCountPtr< StatusTest< ScalarType, MV, OP > > &  stest,
const RefCountPtr< OutputManager< ScalarType > > &  om,
const RefCountPtr< ParameterList > &  pl = Teuchos::null
 

Belos::CG constructor.

Definition at line 184 of file BelosCG.hpp.

template<class ScalarType, class MV, class OP>
virtual Belos::CG< ScalarType, MV, OP >::~CG  )  [inline, virtual]
 

Belos::CG destructor.

Definition at line 91 of file BelosCG.hpp.


Member Function Documentation

template<class ScalarType, class MV, class OP>
int Belos::CG< ScalarType, MV, OP >::GetNumIters  )  const [inline, virtual]
 

Get the iteration count for the current linear system.

Implements Belos::IterativeSolver< ScalarType, MV, OP >.

Definition at line 98 of file BelosCG.hpp.

template<class ScalarType, class MV, class OP>
int Belos::CG< ScalarType, MV, OP >::GetNumRestarts  )  const [inline, virtual]
 

Get the restart count of the iteration method for the current linear system [not valid for CG].

Implements Belos::IterativeSolver< ScalarType, MV, OP >.

Definition at line 101 of file BelosCG.hpp.

template<class ScalarType, class MV, class OP>
RefCountPtr< const MV > Belos::CG< ScalarType, MV, OP >::GetNativeResiduals std::vector< MagnitudeType > *  normvec  )  const [virtual]
 

Get the solvers native residual for the current linear system.

Note:
The memory for the residual MultiVec must be handled by the calling routine.

Implements Belos::IterativeSolver< ScalarType, MV, OP >.

Definition at line 204 of file BelosCG.hpp.

template<class ScalarType, class MV, class OP>
RefCountPtr<MV> Belos::CG< ScalarType, MV, OP >::GetCurrentSoln  )  [inline, virtual]
 

Get the actual residual vector for the current linear system.

This may force the solver to compute a current residual for its linear system. For CG, this method is not useful since the linear problem manager always has the current solution.

Implements Belos::IterativeSolver< ScalarType, MV, OP >.

Definition at line 114 of file BelosCG.hpp.

template<class ScalarType, class MV, class OP>
RefCountPtr<LinearProblem<ScalarType,MV,OP> > Belos::CG< ScalarType, MV, OP >::GetLinearProblem  )  const [inline, virtual]
 

Get a constant reference to the current linear problem.

This may include a current solution, if the solver has recently restarted or completed.

Implements Belos::IterativeSolver< ScalarType, MV, OP >.

Definition at line 119 of file BelosCG.hpp.

template<class ScalarType, class MV, class OP>
RefCountPtr<StatusTest<ScalarType,MV,OP> > Belos::CG< ScalarType, MV, OP >::GetStatusTest  )  const [inline, virtual]
 

Implements Belos::IterativeSolver< ScalarType, MV, OP >.

Definition at line 121 of file BelosCG.hpp.

template<class ScalarType, class MV, class OP>
void Belos::CG< ScalarType, MV, OP >::Solve  )  [virtual]
 

This method uses the iterative method to compute approximate solutions to the original problem. This method can return unconverged if the maximum number of iterations is reached, or numerical breakdown is observed.

Implements Belos::IterativeSolver< ScalarType, MV, OP >.

Definition at line 214 of file BelosCG.hpp.

template<class ScalarType, class MV, class OP>
std::string Belos::CG< ScalarType, MV, OP >::description  )  const [virtual]
 

Method to return description of the block GMRES solver.

Reimplemented from Teuchos::Describable.

Definition at line 399 of file BelosCG.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Sep 18 12:30:12 2008 for Belos by doxygen 1.3.9.1