15#ifndef dealii_trilinos_tpetra_solver_direct_h
16#define dealii_trilinos_tpetra_solver_direct_h
24#ifdef DEAL_II_TRILINOS_WITH_TPETRA
25# ifdef DEAL_II_TRILINOS_WITH_AMESOS2
33# include <Amesos2.hpp>
34# include <Teuchos_ConfigDefs.hpp>
35# include <Teuchos_ParameterList.hpp>
36# include <Teuchos_RCPDecl.hpp>
43 namespace TpetraWrappers
47 template <
typename Number,
typename MemorySpace>
55 <<
"You tried to select the solver type <" << arg1 <<
">\n"
56 <<
"but this solver is not supported by Trilinos/Amesos2\n"
57 <<
"due to one of the following reasons:\n"
58 <<
"* This solver does not exist\n"
59 <<
"* This solver is not (yet) supported by Trilinos/Amesos2\n"
60 <<
"* Trilinos/Amesos2 was not configured for its use.");
69 template <
typename Number,
typename MemorySpace = ::MemorySpace::Host>
81# if DEAL_II_TRILINOS_VERSION_GTE(14, 2, 0)
82 using NodeType = Tpetra::KokkosCompat::KokkosDeviceWrapperNode<
83 typename MemorySpace::kokkos_space::execution_space,
84 typename MemorySpace::kokkos_space>;
86 using NodeType = Kokkos::Compat::KokkosDeviceWrapperNode<
87 typename MemorySpace::kokkos_space::execution_space,
88 typename MemorySpace::kokkos_space>;
99 using MultiVector = Tpetra::MultiVector<Number, int, size_type, NodeType>;
147 <<
"An error with error number " << arg1
148 <<
" occurred while calling a Trilinos function");
175 Amesos2::Solver<typename SparseMatrix<Number, MemorySpace>::MatrixType,
207 template <
typename Number,
typename MemorySpace = ::MemorySpace::Host>
274 template <
typename Number,
typename MemorySpace = ::MemorySpace::Host>
void solve(const SparseMatrix< Number, MemorySpace > &A, Vector< Number, MemorySpace > &x, const Vector< Number, MemorySpace > &b)
Teuchos::RCP< Amesos2::Solver< typename SparseMatrix< Number, MemorySpace >::MatrixType, MultiVector > > solver
void initialize(const SparseMatrix< Number, MemorySpace > &A)
Tpetra::KokkosCompat::KokkosDeviceWrapperNode< typename MemorySpace::kokkos_space::execution_space, typename MemorySpace::kokkos_space > NodeType
SolverDirectBase(SolverControl &cn, const std::string &solver_type)
SolverControl & solver_control
virtual ~SolverDirectBase()=default
Teuchos::ParameterList parameter_list
Tpetra::MultiVector< Number, int, size_type, NodeType > MultiVector
SolverControl & control() const
void solve(Vector< Number, MemorySpace > &x, const Vector< Number, MemorySpace > &b)
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)
int signed_global_dof_index
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)