20 #ifndef AMESOS2_SHYLUBASKER_DECL_HPP
21 #define AMESOS2_SHYLUBASKER_DECL_HPP
24 #include "Amesos2_SolverCore.hpp"
25 #include "Amesos2_ShyLUBasker_FunctionMap.hpp"
27 #include "shylubasker_decl.hpp"
28 #include "shylubasker_def.hpp"
29 #include "shylubasker_trilinos_decl.hpp"
41 template <
class Matrix,
class Vector>
58 typedef typename super_type::scalar_type scalar_type;
59 typedef typename super_type::local_ordinal_type local_ordinal_type;
60 typedef typename super_type::global_ordinal_type global_ordinal_type;
61 typedef typename super_type::global_size_type global_size_type;
62 typedef typename super_type::node_type node_type;
65 typedef typename type_map::type shylubasker_type;
66 typedef typename type_map::dtype shylubasker_dtype;
68 typedef typename type_map::type slu_type;
72 typedef Matrix matrix_type;
75 typedef Kokkos::DefaultHostExecutionSpace HostExecSpaceType;
77 typedef Kokkos::View<local_ordinal_type*, HostExecSpaceType> host_ordinal_type_array;
78 typedef Kokkos::View<shylubasker_type*, HostExecSpaceType> host_value_type_array;
82 Teuchos::RCP<Vector> X,
83 Teuchos::RCP<const Vector> B);
104 int symbolicFactorization_impl();
126 int
solve_impl(const Teuchos::Ptr<MultiVecAdapter<Vector> > X,
127 const Teuchos::Ptr<const MultiVecAdapter<Vector> > B) const;
136 void setParameters_impl(
137 const Teuchos::RCP<Teuchos::ParameterList> & parameterList );
174 typedef typename Kokkos::View<shylubasker_type**, Kokkos::LayoutLeft,
175 typename HostExecSpaceType::memory_space> host_solve_array_t;
187 #if defined( HAVE_AMESOS2_KOKKOS ) && defined( KOKKOS_ENABLE_OPENMP )
194 typedef Kokkos::OpenMP Exe_Space;
195 ::BaskerNS::BaskerTrilinosInterface<local_ordinal_type, shylubasker_dtype, Exe_Space> *ShyLUbasker;
197 #pragma message("Amesos_ShyLUBasker_decl Error: ENABLED SHYLU_NODEBASKER BUT NOT KOKKOS or NOT OPENMP!")
208 #ifdef HAVE_TEUCHOS_COMPLEX
215 typedef Meta::make_list6<float,
217 Kokkos::complex<float>,
218 Kokkos::complex<double>,
220 std::complex<double> > supported_scalars;
222 typedef Meta::make_list2<float, double> supported_scalars;
226 template <
typename Scalar,
typename LocalOrdinal,
typename ExecutionSpace>
228 KokkosSparse::CrsMatrix<Scalar, LocalOrdinal, ExecutionSpace>> {
229 static const bool value =
true;
234 #endif // AMESOS2_SHYLUBASKER_DECL_HPP
Amesos2::SolverCore: A templated interface for interaction with third-party direct sparse solvers...
Definition: Amesos2_SolverCore_decl.hpp:71
int solve_impl(const Teuchos::Ptr< MultiVecAdapter< Vector > > X, const Teuchos::Ptr< const MultiVecAdapter< Vector > > B) const
ShyLUBasker specific solve.
Definition: Amesos2_ShyLUBasker_def.hpp:291
host_ordinal_type_array rowind_view_
Stores the location in Ai_ and Aval_ that starts row j.
Definition: Amesos2_ShyLUBasker_decl.hpp:167
host_value_type_array nzvals_view_
Stores the values of the nonzero entries for Umfpack.
Definition: Amesos2_ShyLUBasker_decl.hpp:165
Map types to solver-specific data-types and enums.
Definition: Amesos2_TypeMap.hpp:48
host_solve_array_t bValues_
Persisting 1D store for B.
Definition: Amesos2_ShyLUBasker_decl.hpp:182
Amesos2 interface to the Baker package.
Definition: Amesos2_ShyLUBasker_decl.hpp:42
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters_impl() const
Definition: Amesos2_ShyLUBasker_def.hpp:492
int preOrdering_impl()
Performs pre-ordering on the matrix to increase efficiency.
Definition: Amesos2_ShyLUBasker_def.hpp:107
Provides traits about solvers.
Definition: Amesos2_SolverTraits.hpp:37
host_ordinal_type_array colptr_view_
Stores the row indices of the nonzero entries.
Definition: Amesos2_ShyLUBasker_decl.hpp:169
bool matrixShapeOK_impl() const
Determines whether the shape of the matrix is OK for this solver.
Definition: Amesos2_ShyLUBasker_def.hpp:366
bool loadA_impl(EPhase current_phase)
Reads matrix data into internal structures.
Definition: Amesos2_ShyLUBasker_def.hpp:557
A Matrix adapter interface for Amesos2.
Definition: Amesos2_MatrixAdapter_decl.hpp:42
std::string name() const override
Return the name of this solver.
Definition: Amesos2_SolverCore_def.hpp:725
int numericFactorization_impl()
ShyLUBasker specific numeric factorization.
Definition: Amesos2_ShyLUBasker_def.hpp:191
Passes functions to TPL functions based on type.
Definition: Amesos2_FunctionMap.hpp:42
host_solve_array_t xValues_
Persisting 1D store for X.
Definition: Amesos2_ShyLUBasker_decl.hpp:178
Provides access to interesting solver traits.
bool single_proc_optimization() const
can we optimize size_type and ordinal_type for straight pass through, also check that is_contiguous_ ...
Definition: Amesos2_ShyLUBasker_def.hpp:101