53 #ifndef AMESOS2_BASKER_DECL_HPP
54 #define AMESOS2_BASKER_DECL_HPP
57 #include "Amesos2_SolverCore.hpp"
58 #include "Amesos2_Basker_FunctionMap.hpp"
72 template <
class Matrix,
class Vector>
89 typedef typename super_type::scalar_type scalar_type;
90 typedef typename super_type::local_ordinal_type local_ordinal_type;
91 typedef typename super_type::global_ordinal_type global_ordinal_type;
92 typedef typename super_type::global_size_type global_size_type;
93 typedef typename super_type::node_type node_type;
97 typedef typename type_map::type basker_type;
102 typedef decltype(type_map::dtype) basker_dtype;
106 typedef Matrix matrix_type;
110 Basker( Teuchos::RCP<const Matrix> A,
111 Teuchos::RCP<Vector> X,
112 Teuchos::RCP<const Vector> B);
132 int symbolicFactorization_impl();
154 int
solve_impl(const Teuchos::Ptr<MultiVecAdapter<Vector> > X,
155 const Teuchos::Ptr<const MultiVecAdapter<Vector> > B) const;
164 void setParameters_impl(
165 const Teuchos::RCP<Teuchos::ParameterList> & parameterList );
191 typedef Kokkos::DefaultHostExecutionSpace HostSpaceType;
192 typedef Kokkos::View<local_ordinal_type*, HostSpaceType> host_ordinal_type_array;
194 typedef Kokkos::View<basker_type*, HostSpaceType> host_value_type_array;
206 typedef typename Kokkos::View<basker_type**, Kokkos::LayoutLeft, HostSpaceType>
218 mutable ::BaskerClassicNS::BaskerClassic<local_ordinal_type,basker_dtype> basker;
227 #ifdef HAVE_TEUCHOS_COMPLEX
228 typedef Meta::make_list6<float,
230 Kokkos::complex<float>,
231 Kokkos::complex<double>,
233 std::complex<double> > supported_scalars;
235 typedef Meta::make_list2<float, double> supported_scalars;
239 template <
typename Scalar,
typename LocalOrdinal,
typename ExecutionSpace>
240 struct solver_supports_matrix<
Basker,
241 KokkosSparse::CrsMatrix<Scalar, LocalOrdinal, ExecutionSpace>> {
242 static const bool value =
true;
247 #endif // AMESOS2_BASKER_DECL_HPP
Amesos2::SolverCore: A templated interface for interaction with third-party direct sparse solvers...
Definition: Amesos2_SolverCore_decl.hpp:105
host_ordinal_type_array host_col_ptr_view_
Stores the row indices of the nonzero entries.
Definition: Amesos2_Basker_decl.hpp:202
Map types to solver-specific data-types and enums.
Definition: Amesos2_TypeMap.hpp:82
bool loadA_impl(EPhase current_phase)
Reads matrix data into internal structures.
Definition: Amesos2_Basker_def.hpp:304
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters_impl() const
Definition: Amesos2_Basker_def.hpp:284
std::string name() const
Return the name of this solver.
Definition: Amesos2_SolverCore_def.hpp:509
Provides traits about solvers.
Definition: Amesos2_SolverTraits.hpp:71
host_solve_array_t bValues_
Persisting 1D store for B.
Definition: Amesos2_Basker_decl.hpp:214
Amesos2 interface to the Baker package.
Definition: Amesos2_Basker_decl.hpp:73
bool single_proc_optimization() const
can we optimize size_type and ordinal_type for straight pass through,
Definition: Amesos2_Basker_def.hpp:85
A Matrix adapter interface for Amesos2.
Definition: Amesos2_MatrixAdapter_decl.hpp:76
bool matrixShapeOK_impl() const
Determines whether the shape of the matrix is OK for this solver.
Definition: Amesos2_Basker_def.hpp:258
host_solve_array_t xValues_
Persisting 1D store for X.
Definition: Amesos2_Basker_decl.hpp:210
Passes functions to TPL functions based on type.
Definition: Amesos2_FunctionMap.hpp:76
int preOrdering_impl()
Performs pre-ordering on the matrix to increase efficiency.
Definition: Amesos2_Basker_def.hpp:91
Provides access to interesting solver traits.
host_ordinal_type_array host_rows_view_
Stores the location in Ai_ and Aval_ that starts row j.
Definition: Amesos2_Basker_decl.hpp:200
int numericFactorization_impl()
Basker specific numeric factorization.
Definition: Amesos2_Basker_def.hpp:114
host_value_type_array host_nzvals_view_
Stores the values of the nonzero entries for CHOLMOD.
Definition: Amesos2_Basker_decl.hpp:198
int solve_impl(const Teuchos::Ptr< MultiVecAdapter< Vector > > X, const Teuchos::Ptr< const MultiVecAdapter< Vector > > B) const
Basker specific solve.
Definition: Amesos2_Basker_def.hpp:166