10 #ifndef AMESOS2_BASKER_MP_VECTOR_HPP
11 #define AMESOS2_BASKER_MP_VECTOR_HPP
13 #include "Amesos2_config.h"
14 #ifdef HAVE_AMESOS2_BASKER
16 #include "Amesos2_Basker.hpp"
21 template <
class T>
struct BASKER_ScalarTraits;
23 struct BASKER_ScalarTraits< Sacado::MP::Vector<S> > {
25 typedef Kokkos::ArithTraits<val_type> KAT;
26 typedef typename KAT::mag_type magnitudeType;
27 static inline val_type reciprocal(val_type c){
return 1.0/c; }
28 static inline val_type divide(val_type a, val_type b){
return a/b; }
29 static inline magnitudeType approxABS(val_type a) {
return KAT::abs(a); }
30 static inline magnitudeType
abs(val_type a) {
return KAT::abs(a); }
31 static inline bool gt (val_type a, val_type b){
return (a>b); }
38 struct TypeMap< Basker,Sacado::MP::Vector<ST> > {
41 typedef typename Kokkos::ArithTraits< Sacado::MP::Vector<ST> >::mag_type magnitude_type;
46 template <
class ST,
class LO,
class GO,
class NO >
47 struct create_mp_vector_solver_impl < Basker, ST, LO, GO,
NO > {
49 typedef Tpetra::CrsMatrix<SC,LO,GO,NO>
Matrix;
50 typedef Tpetra::MultiVector<SC,LO,GO,NO>
Vector;
58 typename MatrixTraits<Matrix>::scalar_t,
59 typename MultiVecAdapter<Vector>::scalar_t
61 > same_scalar_assertion;
62 (void)same_scalar_assertion;
65 typedef Tpetra::CrsMatrix<Sacado::MP::Vector<ST>,LO,GO,
NO>
Matrix;
66 typedef Tpetra::MultiVector<Sacado::MP::Vector<ST>,LO,GO,
NO>
Vector;
67 return Teuchos::rcp(
new Basker<Matrix,Vector>(A, X, B) );
71 #endif // HAVE_AMESOS2_BASKER
73 #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