15#ifndef dealii_trilinos_tpetra_solver_direct_h
16#define dealii_trilinos_tpetra_solver_direct_h
26#ifdef DEAL_II_TRILINOS_WITH_TPETRA
27# ifdef DEAL_II_TRILINOS_WITH_AMESOS2
35# include <Amesos2.hpp>
36# include <Teuchos_ConfigDefs.hpp>
37# include <Teuchos_ParameterList.hpp>
38# include <Teuchos_RCPDecl.hpp>
45 namespace TpetraWrappers
49 template <
typename Number,
typename MemorySpace>
57 <<
"You tried to select the solver type <" << arg1 <<
">\n"
58 <<
"but this solver is not supported by Trilinos/Amesos2\n"
59 <<
"due to one of the following reasons:\n"
60 <<
"* This solver does not exist\n"
61 <<
"* This solver is not (yet) supported by Trilinos/Amesos2\n"
62 <<
"* Trilinos/Amesos2 was not configured for its use.");
71 template <
typename Number,
typename MemorySpace = ::MemorySpace::Host>
121 <<
"An error with error number " << arg1
122 <<
" occurred while calling a Trilinos function");
149 Amesos2::Solver<TpetraTypes::MatrixType<Number, MemorySpace>,
181 template <
typename Number,
typename MemorySpace = ::MemorySpace::Host>
248 template <
typename Number,
typename MemorySpace = ::MemorySpace::Host>
void solve(const SparseMatrix< Number, MemorySpace > &A, Vector< Number, MemorySpace > &x, const Vector< Number, MemorySpace > &b)
void initialize(const SparseMatrix< Number, MemorySpace > &A)
SolverDirectBase(SolverControl &cn, const std::string &solver_type)
SolverControl & solver_control
virtual ~SolverDirectBase()=default
Teuchos::ParameterList parameter_list
SolverControl & control() const
void solve(Vector< Number, MemorySpace > &x, const Vector< Number, MemorySpace > &b)
Teuchos::RCP< Amesos2::Solver< TpetraTypes::MatrixType< Number, MemorySpace >, TpetraTypes::MultiVectorType< Number, MemorySpace > > > solver
SolverDirectKLU2(SolverControl &cn, const AdditionalData &additional_data=AdditionalData())
void set_pararameter_list(Teuchos::ParameterList ¶meter_list)
SolverDirect(SolverControl &cn, const AdditionalData &additional_data=AdditionalData())
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcTrilinosError(int arg1)
static ::ExceptionBase & ExcTrilinosAmesos2SolverUnsupported(std::string arg1)
The chosen Solver is not supported or configured with Amesos2.
#define DeclException1(Exception1, type1, outsequence)
Tpetra::MultiVector< Number, LO, GO, NodeType< MemorySpace > > MultiVectorType
std::string iterative_refinement
AdditionalData(const std::string &transpose_mode="NOTRANS", const bool symmetric_mode=false, const bool equilibrate_matrix=true, const std::string &column_permutation="COLAMD", const std::string &iterative_refinement="NO")
std::string column_permutation
std::string transpose_mode
AdditionalData(const std::string &solver_name)