Belos Version of the Day
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
Belos::SolutionProjection< ScalarType, MV, OP, DM > Class Template Reference

Fischer Method 1 style projection utility. More...

#include <BelosSolutionProjection.hpp>

Public Types

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

Public Member Functions

 SolutionProjection (const Teuchos::RCP< const OP > &A, const int maxBasisSize)
 Constructor with explicit maximum basis size.
 
 SolutionProjection (const Teuchos::RCP< const OP > &A, const Teuchos::RCP< Teuchos::ParameterList > &params)
 Constructor with parameter list.
 
void setOperator (const Teuchos::RCP< const OP > &A)
 Set or replace the operator.
 
void reset ()
 Clear the stored projection basis.
 
int getBasisSize () const
 Current number of stored basis vectors.
 
int getMaxBasisSize () const
 Maximum number of stored basis vectors.
 
void setReplacementStrategy (const std::string &strategy)
 Set replacement strategy.
 
std::string getReplacementStrategy () const
 Get replacement strategy.
 
void setProjectionTolerance (const MagnitudeType tol)
 Set relative projection tolerance.
 
MagnitudeType getProjectionTolerance () const
 Get relative projection tolerance.
 
void setReorthogonalizationSteps (const int steps)
 Set number of reorthogonalization passes.
 
int getReorthogonalizationSteps () const
 Get number of reorthogonalization passes.
 
Teuchos::RCP< const MV > getCorrectionBasis () const
 Get correction basis U.
 
Teuchos::RCP< const MV > getImageBasis () const
 Get image basis C.
 
int addSolution (const MV &u)
 Add solution vector(s) u. The class computes c = A u.
 
int addPair (const MV &u, const MV &c)
 Add pair(s) u and c, where c should equal A u.
 
void project (MV &x, MV &r) const
 Apply projection to x and r, where r is assumed to be b - A x.
 
void project (MV &x, const MV &b, Teuchos::RCP< MV > projectedResidual=Teuchos::null) const
 Compute r = b - A x, then apply projection to x and r.
 
void project (LinearProblem< ScalarType, MV, OP, DM > &problem, Teuchos::RCP< MV > projectedResidual=Teuchos::null) const
 Project the current solution in a LinearProblem.
 

Detailed Description

template<class ScalarType, class MV, class OP, class DM = DefaultDenseMatrix<int, ScalarType>>
class Belos::SolutionProjection< ScalarType, MV, OP, DM >

Fischer Method 1 style projection utility.

The class stores a correction basis U and an orthonormal image basis C satisfying A U = C. The projection is minimum-residual over range(U).

This utility is intended to be used as a black-box initial-guess generator for sequences of related linear systems.

Definition at line 76 of file BelosSolutionProjection.hpp.

Member Typedef Documentation

◆ MVT

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
typedef MultiVecTraits<ScalarType,MV,DM> Belos::SolutionProjection< ScalarType, MV, OP, DM >::MVT

Definition at line 78 of file BelosSolutionProjection.hpp.

◆ OPT

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
typedef OperatorTraits<ScalarType,MV,OP> Belos::SolutionProjection< ScalarType, MV, OP, DM >::OPT

Definition at line 79 of file BelosSolutionProjection.hpp.

◆ DMT

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
typedef DenseMatTraits<ScalarType,DM> Belos::SolutionProjection< ScalarType, MV, OP, DM >::DMT

Definition at line 80 of file BelosSolutionProjection.hpp.

◆ SCT

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
typedef Teuchos::ScalarTraits<ScalarType> Belos::SolutionProjection< ScalarType, MV, OP, DM >::SCT

Definition at line 81 of file BelosSolutionProjection.hpp.

◆ MagnitudeType

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
typedef SCT::magnitudeType Belos::SolutionProjection< ScalarType, MV, OP, DM >::MagnitudeType

Definition at line 82 of file BelosSolutionProjection.hpp.

◆ MT

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
typedef Teuchos::ScalarTraits<MagnitudeType> Belos::SolutionProjection< ScalarType, MV, OP, DM >::MT

Definition at line 83 of file BelosSolutionProjection.hpp.

Constructor & Destructor Documentation

◆ SolutionProjection() [1/2]

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
Belos::SolutionProjection< ScalarType, MV, OP, DM >::SolutionProjection ( const Teuchos::RCP< const OP > &  A,
const int  maxBasisSize 
)
inline

Constructor with explicit maximum basis size.

Definition at line 86 of file BelosSolutionProjection.hpp.

◆ SolutionProjection() [2/2]

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
Belos::SolutionProjection< ScalarType, MV, OP, DM >::SolutionProjection ( const Teuchos::RCP< const OP > &  A,
const Teuchos::RCP< Teuchos::ParameterList > &  params 
)
inline

Constructor with parameter list.

Definition at line 101 of file BelosSolutionProjection.hpp.

Member Function Documentation

◆ setOperator()

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
void Belos::SolutionProjection< ScalarType, MV, OP, DM >::setOperator ( const Teuchos::RCP< const OP > &  A)
inline

Set or replace the operator.

Changing the operator invalidates the stored relation A U = C, so the basis is reset.

Definition at line 131 of file BelosSolutionProjection.hpp.

◆ reset()

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
void Belos::SolutionProjection< ScalarType, MV, OP, DM >::reset ( )
inline

Clear the stored projection basis.

Definition at line 137 of file BelosSolutionProjection.hpp.

◆ getBasisSize()

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
int Belos::SolutionProjection< ScalarType, MV, OP, DM >::getBasisSize ( ) const
inline

Current number of stored basis vectors.

Definition at line 142 of file BelosSolutionProjection.hpp.

◆ getMaxBasisSize()

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
int Belos::SolutionProjection< ScalarType, MV, OP, DM >::getMaxBasisSize ( ) const
inline

Maximum number of stored basis vectors.

Definition at line 147 of file BelosSolutionProjection.hpp.

◆ setReplacementStrategy()

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
void Belos::SolutionProjection< ScalarType, MV, OP, DM >::setReplacementStrategy ( const std::string &  strategy)
inline

Set replacement strategy.

Definition at line 152 of file BelosSolutionProjection.hpp.

◆ getReplacementStrategy()

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
std::string Belos::SolutionProjection< ScalarType, MV, OP, DM >::getReplacementStrategy ( ) const
inline

Get replacement strategy.

Definition at line 158 of file BelosSolutionProjection.hpp.

◆ setProjectionTolerance()

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
void Belos::SolutionProjection< ScalarType, MV, OP, DM >::setProjectionTolerance ( const MagnitudeType  tol)
inline

Set relative projection tolerance.

Definition at line 163 of file BelosSolutionProjection.hpp.

◆ getProjectionTolerance()

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
MagnitudeType Belos::SolutionProjection< ScalarType, MV, OP, DM >::getProjectionTolerance ( ) const
inline

Get relative projection tolerance.

Definition at line 169 of file BelosSolutionProjection.hpp.

◆ setReorthogonalizationSteps()

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
void Belos::SolutionProjection< ScalarType, MV, OP, DM >::setReorthogonalizationSteps ( const int  steps)
inline

Set number of reorthogonalization passes.

Definition at line 174 of file BelosSolutionProjection.hpp.

◆ getReorthogonalizationSteps()

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
int Belos::SolutionProjection< ScalarType, MV, OP, DM >::getReorthogonalizationSteps ( ) const
inline

Get number of reorthogonalization passes.

Definition at line 180 of file BelosSolutionProjection.hpp.

◆ getCorrectionBasis()

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
Teuchos::RCP< const MV > Belos::SolutionProjection< ScalarType, MV, OP, DM >::getCorrectionBasis ( ) const
inline

Get correction basis U.

Definition at line 185 of file BelosSolutionProjection.hpp.

◆ getImageBasis()

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
Teuchos::RCP< const MV > Belos::SolutionProjection< ScalarType, MV, OP, DM >::getImageBasis ( ) const
inline

Get image basis C.

Definition at line 199 of file BelosSolutionProjection.hpp.

◆ addSolution()

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
int Belos::SolutionProjection< ScalarType, MV, OP, DM >::addSolution ( const MV &  u)
inline

Add solution vector(s) u. The class computes c = A u.

Definition at line 213 of file BelosSolutionProjection.hpp.

◆ addPair()

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
int Belos::SolutionProjection< ScalarType, MV, OP, DM >::addPair ( const MV &  u,
const MV &  c 
)
inline

Add pair(s) u and c, where c should equal A u.

Definition at line 234 of file BelosSolutionProjection.hpp.

◆ project() [1/3]

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
void Belos::SolutionProjection< ScalarType, MV, OP, DM >::project ( MV &  x,
MV &  r 
) const
inline

Apply projection to x and r, where r is assumed to be b - A x.

Definition at line 280 of file BelosSolutionProjection.hpp.

◆ project() [2/3]

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
void Belos::SolutionProjection< ScalarType, MV, OP, DM >::project ( MV &  x,
const MV &  b,
Teuchos::RCP< MV >  projectedResidual = Teuchos::null 
) const
inline

Compute r = b - A x, then apply projection to x and r.

Definition at line 312 of file BelosSolutionProjection.hpp.

◆ project() [3/3]

template<class ScalarType , class MV , class OP , class DM = DefaultDenseMatrix<int, ScalarType>>
void Belos::SolutionProjection< ScalarType, MV, OP, DM >::project ( LinearProblem< ScalarType, MV, OP, DM > &  problem,
Teuchos::RCP< MV >  projectedResidual = Teuchos::null 
) const
inline

Project the current solution in a LinearProblem.

Definition at line 347 of file BelosSolutionProjection.hpp.


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

Generated for Belos by doxygen 1.9.8