Belos Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
Belos::GmresPolyOp< ScalarType, MV, OP > Class Template Reference

Belos's class for applying the GMRES polynomial operator that is used by the hybrid-GMRES linear solver. More...

#include <BelosGmresPolyOp.hpp>

Inheritance diagram for Belos::GmresPolyOp< ScalarType, MV, OP >:
Inheritance graph
[legend]

Constructor/Destructor

 GmresPolyOp (const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &problem_in, const Teuchos::RCP< Teuchos::ParameterList > &params_in)
 Basic contstructor. More...
 
 GmresPolyOp (const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &problem_in)
 Given no ParameterList, constructor creates no polynomial and only applies the given operator. More...
 
virtual ~GmresPolyOp ()
 Destructor. More...
 

Parameter processing method

void setParameters (const Teuchos::RCP< Teuchos::ParameterList > &params_in)
 Process the passed in parameters. More...
 

Polynomial creation method

void generateArnoldiPoly ()
 This routine takes the matrix, preconditioner, and vectors from the linear problem as well as the parameters to generate the Arnoldi polynomial. More...
 
void generateGmresPoly ()
 This routine takes the matrix, preconditioner, and vectors from the linear problem as well as the parameters to generate the Gmres polynomial. More...
 

Operator application method

typedef int OT
 
typedef MultiVecTraits
< ScalarType, MV > 
MVT
 
typedef Teuchos::ScalarTraits
< ScalarType > 
SCT
 
typedef Teuchos::ScalarTraits
< ScalarType >::magnitudeType 
MagnitudeType
 
typedef Teuchos::ScalarTraits
< MagnitudeType
MCT
 
std::string polyUpdateLabel_
 
Teuchos::RCP< LinearProblem
< ScalarType, MV, OP > > 
problem_
 
Teuchos::RCP
< Teuchos::ParameterList
params_
 
Teuchos::RCP< const OP > LP_
 
Teuchos::RCP< const OP > RP_
 
Teuchos::RCP< OutputManager
< ScalarType > > 
printer_
 
Teuchos::RCP< std::ostream > outputStream_ = Teuchos::rcpFromRef(std::cout)
 
Teuchos::RCP< MatOrthoManager
< ScalarType, MV, OP > > 
ortho_
 
MagnitudeType polyTol_ = DefaultSolverParameters::polyTol
 
int maxDegree_ = maxDegree_default_
 
int verbosity_ = verbosity_default_
 
bool randomRHS_ = randomRHS_default_
 
std::string label_ = label_default_
 
std::string polyType_ = polyType_default_
 
std::string orthoType_ = orthoType_default_
 
int dim_ = 0
 
bool damp_ = damp_default_
 
bool addRoots_ = addRoots_default_
 
Teuchos::RCP< MV > V_
 
Teuchos::RCP< MV > wL_
 
Teuchos::RCP< MV > wR_
 
Teuchos::SerialDenseMatrix< OT,
ScalarType > 
H_
 
Teuchos::SerialDenseMatrix< OT,
ScalarType > 
y_
 
Teuchos::SerialDenseVector< OT,
ScalarType > 
r0_
 
bool autoDeg = false
 
Teuchos::SerialDenseMatrix< OT,
ScalarType > 
pCoeff_
 
Teuchos::SerialDenseMatrix< OT,
MagnitudeType
theta_
 
static constexpr int maxDegree_default_ = 25
 
static constexpr int verbosity_default_ = Belos::Errors
 
static constexpr bool randomRHS_default_ = true
 
static constexpr const char * label_default_ = "Belos"
 
static constexpr const char * polyType_default_ = "Roots"
 
static constexpr const char * orthoType_default_ = "DGKS"
 
static constexpr bool damp_default_ = false
 
static constexpr bool addRoots_default_ = true
 
void ApplyPoly (const MV &x, MV &y) const
 This routine takes the MV x and applies the polynomial operator phi(OP) to it resulting in the MV y, which is returned. More...
 
void ApplyArnoldiPoly (const MV &x, MV &y) const
 
void ApplyGmresPoly (const MV &x, MV &y) const
 
void ApplyRootsPoly (const MV &x, MV &y) const
 
void Apply (const MultiVec< ScalarType > &x, MultiVec< ScalarType > &y, ETrans=NOTRANS) const
 This routine casts the MultiVec to GmresPolyMv to retrieve the MV. Then the above apply method is called. More...
 
int polyDegree () const
 
void SortModLeja (Teuchos::SerialDenseMatrix< OT, MagnitudeType > &thetaN, std::vector< int > &index) const
 
void ComputeAddedRoots ()
 

Detailed Description

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

Belos's class for applying the GMRES polynomial operator that is used by the hybrid-GMRES linear solver.

This operator is used as the interface to the matrix polynomial (phi(A)), solution (X), and right-hand side (B) of the linear system phi(A)X = B. Furthermore, it is also the interface to left/right preconditioning of the linear system.

Author
Heidi Thornquist and Jennifer Loe

Definition at line 163 of file BelosGmresPolyOp.hpp.

Member Typedef Documentation

template<class ScalarType , class MV , class OP >
typedef int Belos::GmresPolyOp< ScalarType, MV, OP >::OT
private

Definition at line 260 of file BelosGmresPolyOp.hpp.

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

Definition at line 261 of file BelosGmresPolyOp.hpp.

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

Definition at line 262 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
typedef Teuchos::ScalarTraits<ScalarType>::magnitudeType Belos::GmresPolyOp< ScalarType, MV, OP >::MagnitudeType
private

Definition at line 263 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
typedef Teuchos::ScalarTraits<MagnitudeType> Belos::GmresPolyOp< ScalarType, MV, OP >::MCT
private

Definition at line 264 of file BelosGmresPolyOp.hpp.

Constructor & Destructor Documentation

template<class ScalarType , class MV , class OP >
Belos::GmresPolyOp< ScalarType, MV, OP >::GmresPolyOp ( const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &  problem_in,
const Teuchos::RCP< Teuchos::ParameterList > &  params_in 
)
inline

Basic contstructor.

Definition at line 170 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
Belos::GmresPolyOp< ScalarType, MV, OP >::GmresPolyOp ( const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &  problem_in)
inline

Given no ParameterList, constructor creates no polynomial and only applies the given operator.

Definition at line 195 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
virtual Belos::GmresPolyOp< ScalarType, MV, OP >::~GmresPolyOp ( )
inlinevirtual

Destructor.

Definition at line 203 of file BelosGmresPolyOp.hpp.

Member Function Documentation

template<class ScalarType , class MV , class OP >
void Belos::GmresPolyOp< ScalarType, MV, OP >::setParameters ( const Teuchos::RCP< Teuchos::ParameterList > &  params_in)

Process the passed in parameters.

Definition at line 321 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
void Belos::GmresPolyOp< ScalarType, MV, OP >::generateArnoldiPoly ( )

This routine takes the matrix, preconditioner, and vectors from the linear problem as well as the parameters to generate the Arnoldi polynomial.

Definition at line 485 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
void Belos::GmresPolyOp< ScalarType, MV, OP >::generateGmresPoly ( )

This routine takes the matrix, preconditioner, and vectors from the linear problem as well as the parameters to generate the Gmres polynomial.

Definition at line 385 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
void Belos::GmresPolyOp< ScalarType, MV, OP >::ApplyPoly ( const MV &  x,
MV &  y 
) const

This routine takes the MV x and applies the polynomial operator phi(OP) to it resulting in the MV y, which is returned.

  \note It is expected that any problem with applying this operator to \c x will be

indicated by an std::exception being thrown.

Definition at line 859 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
void Belos::GmresPolyOp< ScalarType, MV, OP >::ApplyArnoldiPoly ( const MV &  x,
MV &  y 
) const

Definition at line 997 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
void Belos::GmresPolyOp< ScalarType, MV, OP >::ApplyGmresPoly ( const MV &  x,
MV &  y 
) const

Definition at line 876 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
void Belos::GmresPolyOp< ScalarType, MV, OP >::ApplyRootsPoly ( const MV &  x,
MV &  y 
) const

Definition at line 924 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
void Belos::GmresPolyOp< ScalarType, MV, OP >::Apply ( const MultiVec< ScalarType > &  x,
MultiVec< ScalarType > &  y,
ETrans  = NOTRANS 
) const
inlinevirtual

This routine casts the MultiVec to GmresPolyMv to retrieve the MV. Then the above apply method is called.

Implements Belos::Operator< ScalarType >.

Definition at line 244 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
int Belos::GmresPolyOp< ScalarType, MV, OP >::polyDegree ( ) const
inline

Definition at line 251 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
void Belos::GmresPolyOp< ScalarType, MV, OP >::SortModLeja ( Teuchos::SerialDenseMatrix< OT, MagnitudeType > &  thetaN,
std::vector< int > &  index 
) const
private

Definition at line 777 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
void Belos::GmresPolyOp< ScalarType, MV, OP >::ComputeAddedRoots ( )
private

Definition at line 698 of file BelosGmresPolyOp.hpp.

Member Data Documentation

template<class ScalarType , class MV , class OP >
std::string Belos::GmresPolyOp< ScalarType, MV, OP >::polyUpdateLabel_
private

Definition at line 258 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
constexpr int Belos::GmresPolyOp< ScalarType, MV, OP >::maxDegree_default_ = 25
staticprivate

Definition at line 267 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
constexpr int Belos::GmresPolyOp< ScalarType, MV, OP >::verbosity_default_ = Belos::Errors
staticprivate

Definition at line 268 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
constexpr bool Belos::GmresPolyOp< ScalarType, MV, OP >::randomRHS_default_ = true
staticprivate

Definition at line 269 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
constexpr const char* Belos::GmresPolyOp< ScalarType, MV, OP >::label_default_ = "Belos"
staticprivate

Definition at line 270 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
constexpr const char* Belos::GmresPolyOp< ScalarType, MV, OP >::polyType_default_ = "Roots"
staticprivate

Definition at line 271 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
constexpr const char* Belos::GmresPolyOp< ScalarType, MV, OP >::orthoType_default_ = "DGKS"
staticprivate

Definition at line 272 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
constexpr bool Belos::GmresPolyOp< ScalarType, MV, OP >::damp_default_ = false
staticprivate

Definition at line 273 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
constexpr bool Belos::GmresPolyOp< ScalarType, MV, OP >::addRoots_default_ = true
staticprivate

Definition at line 274 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
Teuchos::RCP<LinearProblem<ScalarType,MV,OP> > Belos::GmresPolyOp< ScalarType, MV, OP >::problem_
private

Definition at line 277 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
Teuchos::RCP<Teuchos::ParameterList> Belos::GmresPolyOp< ScalarType, MV, OP >::params_
private

Definition at line 278 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
Teuchos::RCP<const OP> Belos::GmresPolyOp< ScalarType, MV, OP >::LP_
private

Definition at line 279 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
Teuchos::RCP<const OP> Belos::GmresPolyOp< ScalarType, MV, OP >::RP_
private

Definition at line 279 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
Teuchos::RCP<OutputManager<ScalarType> > Belos::GmresPolyOp< ScalarType, MV, OP >::printer_
private

Definition at line 282 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
Teuchos::RCP<std::ostream> Belos::GmresPolyOp< ScalarType, MV, OP >::outputStream_ = Teuchos::rcpFromRef(std::cout)
private

Definition at line 283 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
Teuchos::RCP<MatOrthoManager<ScalarType,MV,OP> > Belos::GmresPolyOp< ScalarType, MV, OP >::ortho_
private

Definition at line 286 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
MagnitudeType Belos::GmresPolyOp< ScalarType, MV, OP >::polyTol_ = DefaultSolverParameters::polyTol
private

Definition at line 289 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
int Belos::GmresPolyOp< ScalarType, MV, OP >::maxDegree_ = maxDegree_default_
private

Definition at line 290 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
int Belos::GmresPolyOp< ScalarType, MV, OP >::verbosity_ = verbosity_default_
private

Definition at line 291 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
bool Belos::GmresPolyOp< ScalarType, MV, OP >::randomRHS_ = randomRHS_default_
private

Definition at line 292 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
std::string Belos::GmresPolyOp< ScalarType, MV, OP >::label_ = label_default_
private

Definition at line 293 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
std::string Belos::GmresPolyOp< ScalarType, MV, OP >::polyType_ = polyType_default_
private

Definition at line 294 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
std::string Belos::GmresPolyOp< ScalarType, MV, OP >::orthoType_ = orthoType_default_
private

Definition at line 295 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
int Belos::GmresPolyOp< ScalarType, MV, OP >::dim_ = 0
private

Definition at line 296 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
bool Belos::GmresPolyOp< ScalarType, MV, OP >::damp_ = damp_default_
private

Definition at line 297 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
bool Belos::GmresPolyOp< ScalarType, MV, OP >::addRoots_ = addRoots_default_
private

Definition at line 298 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
Teuchos::RCP<MV> Belos::GmresPolyOp< ScalarType, MV, OP >::V_
mutableprivate

Definition at line 301 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
Teuchos::RCP<MV> Belos::GmresPolyOp< ScalarType, MV, OP >::wL_
mutableprivate

Definition at line 301 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
Teuchos::RCP<MV> Belos::GmresPolyOp< ScalarType, MV, OP >::wR_
mutableprivate

Definition at line 301 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
Teuchos::SerialDenseMatrix<OT,ScalarType> Belos::GmresPolyOp< ScalarType, MV, OP >::H_
private

Definition at line 302 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
Teuchos::SerialDenseMatrix<OT,ScalarType> Belos::GmresPolyOp< ScalarType, MV, OP >::y_
private

Definition at line 302 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
Teuchos::SerialDenseVector<OT,ScalarType> Belos::GmresPolyOp< ScalarType, MV, OP >::r0_
private

Definition at line 303 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
bool Belos::GmresPolyOp< ScalarType, MV, OP >::autoDeg = false
private

Definition at line 306 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
Teuchos::SerialDenseMatrix< OT, ScalarType > Belos::GmresPolyOp< ScalarType, MV, OP >::pCoeff_
private

Definition at line 307 of file BelosGmresPolyOp.hpp.

template<class ScalarType , class MV , class OP >
Teuchos::SerialDenseMatrix< OT, MagnitudeType > Belos::GmresPolyOp< ScalarType, MV, OP >::theta_
private

Definition at line 310 of file BelosGmresPolyOp.hpp.


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