DOLFIN
DOLFIN C++ interface
|
#include <BelosKrylovSolver.h>
Public Types | |
typedef Tpetra::Operator< double, int, dolfin::la_index, TpetraVector::node_type > | op_type |
Tpetra operator type. | |
typedef Belos::LinearProblem< double, TpetraVector::vector_type, op_type > | problem_type |
Belos problem type. | |
Public Member Functions | |
BelosKrylovSolver (std::string method="default", std::string preconditioner="default") | |
BelosKrylovSolver (std::string method, std::shared_ptr< TrilinosPreconditioner > preconditioner) | |
Create Krylov solver for a particular method and TrilinosPreconditioner. | |
~BelosKrylovSolver () | |
Destructor. | |
void | set_operator (std::shared_ptr< const GenericLinearOperator > A) |
Set operator (matrix) | |
void | set_operators (std::shared_ptr< const GenericLinearOperator > A, std::shared_ptr< const GenericLinearOperator > P) |
Set operator (matrix) and preconditioner matrix. | |
const TpetraMatrix & | get_operator () const |
Get operator (matrix) | |
std::size_t | solve (GenericVector &x, const GenericVector &b) |
Solve linear system Ax = b and return number of iterations. | |
std::size_t | solve (const GenericLinearOperator &A, GenericVector &x, const GenericVector &b) |
Solve linear system Ax = b and return number of iterations. | |
std::string | str (bool verbose) const |
Return informal string representation (pretty-print) | |
std::string | parameter_type () const |
Return parameter type: "krylov_solver" or "lu_solver". | |
Public Member Functions inherited from dolfin::GenericLinearSolver | |
virtual void | update_parameters (const Parameters ¶meters) |
Update solver parameters (useful for LinearSolver wrapper) | |
Public Member Functions inherited from dolfin::Variable | |
Variable () | |
Create unnamed variable. | |
Variable (const std::string name, const std::string label) | |
Create variable with given name and label. | |
Variable (const Variable &variable) | |
Copy constructor. | |
virtual | ~Variable () |
Destructor. | |
const Variable & | operator= (const Variable &variable) |
Assignment operator. | |
void | rename (const std::string name, const std::string label) |
Rename variable. | |
std::string | name () const |
Return name. | |
std::string | label () const |
Return label (description) | |
std::size_t | id () const |
Static Public Member Functions | |
static std::map< std::string, std::string > | methods () |
Return a list of available solver methods. | |
static std::map< std::string, std::string > | preconditioners () |
Return a list of available preconditioners. | |
static Parameters | default_parameters () |
Default parameter values. | |
Friends | |
class | Ifpack2Preconditioner |
class | MueluPreconditioner |
Additional Inherited Members | |
Public Attributes inherited from dolfin::Variable | |
Parameters | parameters |
Parameters. | |
Static Protected Member Functions inherited from dolfin::GenericLinearSolver | |
static const GenericMatrix & | require_matrix (const GenericLinearOperator &A) |
static std::shared_ptr< const GenericMatrix > | require_matrix (std::shared_ptr< const GenericLinearOperator > A) |
This class implements Krylov methods for linear systems of the form Ax = b. It is a wrapper for the Belos iterative solver from Trilinos
BelosKrylovSolver::BelosKrylovSolver | ( | std::string | method = "default" , |
std::string | preconditioner = "default" |
||
) |
Create Krylov solver for a particular method and names preconditioner