#include <belosSolver.hh>
Public Types | |
typedef Tpetra::MultiVector< T, int > | MV |
typedef Tpetra::Operator< T > | OP |
typedef Tpetra::CrsMatrix< T, int, int > | CRSmat |
typedef BelosLinProb< T, MV, OP > | LP |
typedef Belos::SolverManager< T, MV, OP > | solverManager |
typedef Realtype< T >::type | r_type |
Real type of data type. | |
typedef Cmplxtype< T >::type | c_type |
Real type of data type. | |
typedef F | type |
Type of data, e.g. matrix entries. | |
Public Member Functions | |
BelosSolver (concepts::SparseMatrix< T > &sparse, Teuchos::RCP< const Teuchos::Comm< int > > comm) | |
Constructor for the root thread. | |
BelosSolver (Teuchos::RCP< const Teuchos::Comm< int > > comm) | |
Constructor for other threads wich don't know the concets::SparseMatrix. | |
virtual void | operator() () |
Solving operator for other the non-root threads. | |
virtual void | operator() (const Vector< T > &fncY, Vector< T > &fncX) |
void | setSolverParam (Teuchos::RCP< Teuchos::ParameterList > param) |
void | setSolverParam (int maxIter, int maxRestarts, double tol=1e-10, int blockSize=1, int outFreq=1) |
Teuchos::RCP< Teuchos::ParameterList > | getSolverParam () |
Get solver parameter list. | |
void | setPrecParam (Teuchos::RCP< Teuchos::ParameterList > param) |
void | setPrecParam (double fill, double tol=1e-5, int absTresh=0, int relTresh=1, double relax=0) |
Teuchos::RCP< Teuchos::ParameterList > | getPrecParam () |
Gets the parameter list for the preconditioner. | |
void | setSolverManager (Teuchos::RCP< solverManager > manager) |
Teuchos::RCP< solverManager > | getSolverManager () |
Teuchos::RCP< LP > | getLinearProblem () |
void | setSolverType (std::string type) |
std::string | getSolverType () |
Getter for the solver type. | |
void | setPrecType (std::string type) |
std::string | getPrecType () |
void | prepare () |
Builds the Preconditioner and the solver (sets prepare to true) | |
virtual void | operator() (const Function< r_type > &fncY, Function< T > &fncX) |
virtual void | operator() (const Function< c_type > &fncY, Function< c_type > &fncX) |
virtual void | operator() (const Vector< r_type > &fncY, Vector< T > &fncX) |
virtual void | operator() (const Vector< c_type > &fncY, Vector< c_type > &fncX) |
void | operator() (const Matrix< r_type > &mX, Matrix< T > &mY) |
Application method to real matrices. Calls function apply() | |
void | operator() (const Matrix< c_type > &mX, Matrix< c_type > &mY) |
Application method to complex matrices. Calls apply_() | |
virtual void | operator() (const Function< r_type > &fncY, Function< F > &fncX) |
virtual const uint | dimX () const |
virtual const uint | dimY () const |
virtual void | show_messages () |
Protected Member Functions | |
virtual std::ostream & | info (std::ostream &os) const |
Returns information in an output stream. | |
Protected Attributes | |
uint | dimX_ |
Dimension of image space and the source space. | |
uint | dimY_ |
Concepts interface to Trilinos Belos solver with different ifpack2 preconditioners and different iterative solvers.
Definition at line 32 of file belosSolver.hh.
|
inherited |
Real type of data type.
Definition at line 120 of file compositions.hh.
typedef Tpetra::CrsMatrix<T, int, int> concepts::BelosSolver< T >::CRSmat |
Definition at line 38 of file belosSolver.hh.
typedef BelosLinProb<T, MV, OP> concepts::BelosSolver< T >::LP |
Definition at line 39 of file belosSolver.hh.
typedef Tpetra::MultiVector<T, int> concepts::BelosSolver< T >::MV |
Definition at line 36 of file belosSolver.hh.
typedef Tpetra::Operator<T> concepts::BelosSolver< T >::OP |
Definition at line 37 of file belosSolver.hh.
|
inherited |
Real type of data type.
Definition at line 118 of file compositions.hh.
typedef Belos::SolverManager<T, MV, OP> concepts::BelosSolver< T >::solverManager |
Definition at line 40 of file belosSolver.hh.
|
inherited |
Type of data, e.g. matrix entries.
Definition at line 45 of file compositions.hh.
concepts::BelosSolver< T >::BelosSolver | ( | concepts::SparseMatrix< T > & | sparse, |
Teuchos::RCP< const Teuchos::Comm< int > > | comm | ||
) |
Constructor for the root thread.
Definition at line 257 of file belosSolver.hh.
concepts::BelosSolver< T >::BelosSolver | ( | Teuchos::RCP< const Teuchos::Comm< int > > | comm | ) |
Constructor for other threads wich don't know the concets::SparseMatrix.
Definition at line 267 of file belosSolver.hh.
|
inlinevirtual |
Definition at line 48 of file belosSolver.hh.
|
inlinevirtualinherited |
Returns the size of the image space of the operator (number of rows of the corresponding matrix)
Definition at line 93 of file compositions.hh.
|
inlinevirtualinherited |
Returns the size of the source space of the operator (number of columns of the corresponding matrix)
Definition at line 98 of file compositions.hh.
|
inline |
Definition at line 153 of file belosSolver.hh.
|
inline |
Gets the parameter list for the preconditioner.
Definition at line 131 of file belosSolver.hh.
|
inline |
Definition at line 188 of file belosSolver.hh.
|
inline |
Gets the solver via solver manager
Definition at line 148 of file belosSolver.hh.
|
inline |
Get solver parameter list.
Definition at line 98 of file belosSolver.hh.
|
inline |
Getter for the solver type.
Definition at line 169 of file belosSolver.hh.
|
protectedvirtual |
Returns information in an output stream.
Reimplemented from concepts::VecOperator< T >.
|
inlinevirtual |
Solving operator for other the non-root threads.
Reimplemented from concepts::Operator< F >.
Definition at line 53 of file belosSolver.hh.
|
virtualinherited |
Application operator for complex function fncY
.
Computes fncX
= A(fncY
) where A is this operator. fncX
becomes complex.
In derived classes its enough to implement the operator() for complex Operator's. If a real counterpart is not implemented, the function fncY
is splitted into real and imaginary part and the application operator for real functions is called for each. Then the result is combined.
If in a derived class the operator() for complex Operator's is not implemented, a exception is thrown from here.
Reimplemented from concepts::Operator< F >.
|
virtualinherited |
Application operator for real function fncY
.
Computes fncX
= A(fncY
) where A is this operator.
fncX
becomes the type of the operator, for real data it becomes real, for complex data it becomes complex.
In derived classes its enough to implement the operator() for real Operator's. If a complex counterpart is not implemented, the function fncY
is transformed to a complex function and then the application operator for complex functions is called.
If in a derived class the operator() for real Operator's is not implemented, a exception is thrown from here.
Reimplemented in aglowav::C2W< F >, aglowav2::C2W< F >, aglowav::W2C< F >, aglowav2::W2C< F >, aglowav::C2_tl2< F >, aglowav::C2tl2< F >, aglowav::CGt2< F >, aglowav::ComposeN< F >, aglowav2::Operator00< F >, bem::D< F >, bem::D_1< F >, concepts::TrivExtendRestrict< F >, sparseqr::GivensRotations< F >, vectorial::BlockOperator< F >, concepts::TrivExtendRestrict< Real >, sparseqr::GivensRotations< Real >, concepts::AfterIteration< F >, concepts::Compose< F, H >, concepts::DDSolver< F, G >, concepts::Multiple< F >, concepts::LiCoI< F >, concepts::LiCo< F >, concepts::DenseMatrix< F >, concepts::DiagonalMatrix< F >, concepts::Permutation< F >, concepts::Matrix< F >, concepts::Matrix< F::type >, and concepts::DiagonalSolver< F >.
|
virtualinherited |
Application operator for complex function fncY
.
Computes fncX
= A(fncY
) where A is this operator. fncX
becomes complex.
In derived classes its enough to implement the operator() for complex Operator's. If a real counterpart is not implemented, the vector fncY
is splitted into real and imaginary part and the application operator for real vectors is called for each. Then the result is combined
If in a derived class the operator() for complex Operator's i not implemented, a exception is thrown from here.
|
virtualinherited |
Application operator for real vector fncY
.
Computes fncX
= A(fncY
) where A is this operator.
Type of fncX
becomes that of the operator, for real data it becomes real, for complex data it becomes complex.
In derived classes its enough to implement the operator() for real Operator's. If a complex counterpart is not implemented, the vector fncY
is transformed to a complex vector and then the application for complex vectors is called.
If in a derived class the operator() for real Operator's is not implemented, a exception is thrown from here.
|
inlinevirtual |
Solving operator for the root thread
fncY | the right hand side |
the | solution vector |
Definition at line 62 of file belosSolver.hh.
|
inline |
Builds the Preconditioner and the solver (sets prepare to true)
Definition at line 194 of file belosSolver.hh.
|
inline |
Set preconditoner parameter list via values
fill | width of the bandmatrix used for preconditioning |
tol | tolerance for the preconditioner |
Definition at line 116 of file belosSolver.hh.
|
inline |
Set preconditioner parameter list via Teuchos::parameter list
param | Parameterlist that contains the parameter for the preconditioner |
Definition at line 106 of file belosSolver.hh.
|
inline |
Sets the preconditioner Type to one of the followings
"DIAGONAL"
"RELAXATION"
"CHEBYSHEV"
"ILUT"
"RILUK"
Definition at line 182 of file belosSolver.hh.
|
inline |
Sets the solver via solver manager
Definition at line 139 of file belosSolver.hh.
|
inline |
Set Solver parameter list via values
maxIter | maximal number of iterations |
maxRestarts | maximal number of restarts |
tol | tolerence for the residuum |
Definition at line 80 of file belosSolver.hh.
|
inline |
Set Solver parameter list via Teuchos::parameter list
param | Parameterlist that contains the parameters for the solver |
Definition at line 70 of file belosSolver.hh.
|
inline |
Sets the solver type to one of the followings
"GMRES"
"BLOCKCG"
"PSEUDOCG"
Definition at line 163 of file belosSolver.hh.
|
inlinevirtualinherited |
Reimplemented in concepts::MumpsOverlap< F >.
Definition at line 100 of file compositions.hh.
|
protectedinherited |
Dimension of image space and the source space.
Definition at line 104 of file compositions.hh.
|
protectedinherited |
Definition at line 104 of file compositions.hh.