42 #ifndef AMESOS2_BASKER_MP_VECTOR_HPP
43 #define AMESOS2_BASKER_MP_VECTOR_HPP
45 #include "Amesos2_config.h"
46 #ifdef HAVE_AMESOS2_BASKER
48 #include "Amesos2_Basker.hpp"
53 template <
class T>
struct BASKER_ScalarTraits;
55 struct BASKER_ScalarTraits< Sacado::MP::Vector<S> > {
57 typedef Kokkos::Details::ArithTraits<val_type> KAT;
58 typedef typename KAT::mag_type magnitudeType;
59 static inline val_type reciprocal(val_type c){
return 1.0/c; }
60 static inline val_type divide(val_type a, val_type b){
return a/b; }
61 static inline magnitudeType approxABS(val_type a) {
return KAT::abs(a); }
62 static inline magnitudeType
abs(val_type a) {
return KAT::abs(a); }
63 static inline bool gt (val_type a, val_type b){
return (a>b); }
70 struct TypeMap< Basker,Sacado::MP::Vector<ST> > {
73 typedef typename Kokkos::Details::ArithTraits< Sacado::MP::Vector<ST> >::mag_type magnitude_type;
78 template <
class ST,
class LO,
class GO,
class NO >
79 struct create_mp_vector_solver_impl < Basker, ST, LO, GO,
NO > {
81 typedef Tpetra::CrsMatrix<SC,LO,GO,NO>
Matrix;
82 typedef Tpetra::MultiVector<SC,LO,GO,NO>
Vector;
90 typename MatrixTraits<Matrix>::scalar_t,
91 typename MultiVecAdapter<Vector>::scalar_t
93 > same_scalar_assertion;
94 (void)same_scalar_assertion;
97 typedef Tpetra::CrsMatrix<Sacado::MP::Vector<ST>,LO,GO,
NO>
Matrix;
98 typedef Tpetra::MultiVector<Sacado::MP::Vector<ST>,LO,GO,
NO>
Vector;
99 return Teuchos::rcp(
new Basker<Matrix,Vector>(A, X, B) );
103 #endif // HAVE_AMESOS2_BASKER
105 #endif // AMESOS2_BASKER_MP_VECTOR_HPP
static Teuchos::RCP< Solver< Matrix, Vector > > apply(Teuchos::RCP< const Matrix > A, Teuchos::RCP< Vector > X, Teuchos::RCP< const Vector > B)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
KOKKOS_INLINE_FUNCTION PCE< Storage > abs(const PCE< Storage > &a)
Sacado::MP::Vector< ST > SC
Tpetra::MultiVector< SC, LO, GO, NO > Vector
Tpetra::CrsMatrix< SC, LO, GO, NO > Matrix