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 slu_type;
98 typedef typename type_map::magnitude_type magnitude_type;
102 typedef Matrix matrix_type;
105 Basker( Teuchos::RCP<const Matrix> A,
106 Teuchos::RCP<Vector> X,
107 Teuchos::RCP<const Vector> B);
121 int symbolicFactorization_impl();
143 int
solve_impl(const Teuchos::Ptr<MultiVecAdapter<Vector> > X,
144 const Teuchos::Ptr<const MultiVecAdapter<Vector> > B) const;
153 void setParameters_impl(
154 const Teuchos::RCP<Teuchos::ParameterList> & parameterList );
192 mutable Teuchos::Array<slu_type>
xvals_; local_ordinal_type ldx_;
194 mutable Teuchos::Array<slu_type>
bvals_; local_ordinal_type ldb_;
199 #ifdef HAVE_AMESOS2_KOKKOS 200 #ifdef KOKKOS_HAVE_OPENMP 207 typedef Kokkos::OpenMP Exe_Space;
208 #elif defined(KOKKOS_HAVE_SERIAL) 209 typedef Kokkos::Serial Exe_Space;
211 #pragma message("Kokkos Node type not supported by Basker") 212 #endif // OpenMP vs Serial 213 ::BaskerNS::BaskerTrilinosInterface<local_ordinal_type, slu_type, Exe_Space>
216 #pragma message("HAVE SHYLUBASKER AND NOT KOKKOS! ERROR") 219 mutable ::Basker::Basker<local_ordinal_type,slu_type> basker;
230 #ifdef HAVE_TEUCHOS_COMPLEX 231 typedef Meta::make_list4<float,
234 std::complex<double> > supported_scalars;
236 typedef Meta::make_list2<float, double> supported_scalars;
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
Definition: basker.cpp:35
Map types to solver-specific data-types and enums.
Definition: Amesos2_TypeMap.hpp:82
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters_impl() const
Definition: Amesos2_Basker_def.hpp:547
Teuchos::Array< slu_type > bvals_
Persisting 1D store for B.
Definition: Amesos2_Basker_decl.hpp:194
bool loadA_impl(EPhase current_phase)
Reads matrix data into internal structures.
Definition: Amesos2_Basker_def.hpp:605
Provides traits about solvers.
Definition: Amesos2_SolverTraits.hpp:70
Teuchos::Array< local_ordinal_type > colptr_
Stores the row indices of the nonzero entries.
Definition: Amesos2_Basker_decl.hpp:186
Definition: Amesos2_AbstractConcreteMatrixAdapter.hpp:48
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:329
Amesos2 interface to the Baker package.
Definition: Amesos2_Basker_decl.hpp:73
Teuchos::Array< local_ordinal_type > rowind_
Stores the location in Ai_ and Aval_ that starts row j.
Definition: Amesos2_Basker_decl.hpp:184
Teuchos::Array< slu_type > xvals_
Persisting 1D store for X.
Definition: Amesos2_Basker_decl.hpp:192
Teuchos::Array< slu_type > nzvals_
Stores the values of the nonzero entries for Basker.
Definition: Amesos2_Basker_decl.hpp:182
std::string name() const
Return the name of this solver.
Definition: Amesos2_SolverCore_def.hpp:505
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:132
Provides access to interesting solver traits.
int numericFactorization_impl()
Basker specific numeric factorization.
Definition: Amesos2_Basker_def.hpp:219
bool matrixShapeOK_impl() const
Determines whether the shape of the matrix is OK for this solver.
Definition: Amesos2_Basker_def.hpp:465