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;
99 typedef typename type_map::dtype basker_dtype;
103 typedef Matrix matrix_type;
107 Basker( Teuchos::RCP<const Matrix> A,
108 Teuchos::RCP<Vector> X,
109 Teuchos::RCP<const Vector> B);
129 int symbolicFactorization_impl();
151 int
solve_impl(const Teuchos::Ptr<MultiVecAdapter<Vector> > X,
152 const Teuchos::Ptr<const MultiVecAdapter<Vector> > B) const;
161 void setParameters_impl(
162 const Teuchos::RCP<Teuchos::ParameterList> & parameterList );
188 typedef Kokkos::DefaultHostExecutionSpace HostSpaceType;
189 typedef Kokkos::View<local_ordinal_type*, HostSpaceType> host_ordinal_type_array;
191 typedef Kokkos::View<basker_type*, HostSpaceType> host_value_type_array;
203 typedef typename Kokkos::View<basker_type**, Kokkos::LayoutLeft, HostSpaceType>
213 mutable ::BaskerClassicNS::BaskerClassic<local_ordinal_type,basker_dtype> basker;
222 #ifdef HAVE_TEUCHOS_COMPLEX
223 typedef Meta::make_list6<float,
225 Kokkos::complex<float>,
226 Kokkos::complex<double>,
228 std::complex<double> > supported_scalars;
230 typedef Meta::make_list2<float, double> supported_scalars;
234 template <
typename Scalar,
typename LocalOrdinal,
typename ExecutionSpace>
235 struct solver_supports_matrix<
Basker,
236 KokkosSparse::CrsMatrix<Scalar, LocalOrdinal, ExecutionSpace>> {
237 static const bool value =
true;
242 #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:199
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:295
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters_impl() const
Definition: Amesos2_Basker_def.hpp:275
Provides traits about solvers.
Definition: Amesos2_SolverTraits.hpp:71
host_solve_array_t bValues_
Persisting 1D store for B.
Definition: Amesos2_Basker_decl.hpp:210
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
std::string name() const override
Return the name of this solver.
Definition: Amesos2_SolverCore_def.hpp:759
bool matrixShapeOK_impl() const
Determines whether the shape of the matrix is OK for this solver.
Definition: Amesos2_Basker_def.hpp:249
host_solve_array_t xValues_
Persisting 1D store for X.
Definition: Amesos2_Basker_decl.hpp:207
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:197
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:195
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