19 #ifndef __DOLFIN_AMESOS2_LU_SOLVER_H 20 #define __DOLFIN_AMESOS2_LU_SOLVER_H 24 #include "GenericLinearSolver.h" 25 #include <Amesos2_Factory.hpp> 30 class GenericLinearOperator;
48 std::string method=
"default");
54 void set_operator(std::shared_ptr<const GenericLinearOperator> A);
57 void set_operator(std::shared_ptr<const TpetraMatrix> A);
76 std::string
str(
bool verbose)
const;
79 static std::map<std::string, std::string>
methods();
86 {
return "lu_solver"; }
90 void init_solver(std::string& method);
97 std::shared_ptr<const TpetraMatrix> _matA;
100 std::string _method_name;
Definition: GenericLinearOperator.h:42
Definition: TpetraMatrix.h:58
static Parameters default_parameters()
Default parameter values.
Definition: Amesos2LUSolver.cpp:60
Tpetra::MultiVector< double, int, dolfin::la_index, node_type > vector_type
TpetraVector vector type (scalar, local index, global index, node)
Definition: TpetraVector.h:63
const GenericLinearOperator & get_operator() const
Get operator (matrix)
Definition: Amesos2LUSolver.cpp:129
Definition: Amesos2LUSolver.h:39
std::string parameter_type() const
Return parameter type: "krylov_solver" or "lu_solver".
Definition: Amesos2LUSolver.h:85
Definition: Parameters.h:94
Definition: TpetraVector.h:53
static std::map< std::string, std::string > methods()
Return a list of available solver methods.
Definition: Amesos2LUSolver.cpp:35
Amesos2LUSolver(std::string method="default")
Constructor.
Definition: Amesos2LUSolver.cpp:68
This class provides a general solver for linear systems Ax = b.
Definition: GenericLinearSolver.h:37
~Amesos2LUSolver()
Destructor.
Definition: Amesos2LUSolver.cpp:95
Tpetra::CrsMatrix< double, int, dolfin::la_index > matrix_type
Matrix type (scalar, local index, global index)
Definition: TpetraMatrix.h:64
void set_operator(std::shared_ptr< const GenericLinearOperator > A)
Set operator (matrix)
Definition: Amesos2LUSolver.cpp:101
std::string str(bool verbose) const
Return informal string representation (pretty-print)
Definition: Amesos2LUSolver.cpp:204
This class defines a common interface for vectors.
Definition: GenericVector.h:47
std::size_t solve(GenericVector &x, const GenericVector &b)
Solve linear system Ax = b.
Definition: Amesos2LUSolver.cpp:140