10 #ifndef XPETRA_HELPERS_DECL_HPP
11 #define XPETRA_HELPERS_DECL_HPP
15 #include "Xpetra_BlockedCrsMatrix.hpp"
16 #include "Xpetra_CrsMatrixWrap.hpp"
17 #include "Xpetra_MapExtractor.hpp"
18 #include "Xpetra_Map.hpp"
19 #include "Xpetra_Matrix.hpp"
21 #ifdef HAVE_XPETRA_EPETRA
25 #ifdef HAVE_XPETRA_EPETRAEXT
26 #include <EpetraExt_MatrixMatrix.h>
27 #include <EpetraExt_RowMatrixOut.h>
28 #include <Epetra_RowMatrixTransposer.h>
29 #endif // HAVE_XPETRA_EPETRAEXT
31 #ifdef HAVE_XPETRA_TPETRA
32 #include <Tpetra_CrsMatrix.hpp>
33 #include <Tpetra_BlockCrsMatrix.hpp>
34 #include <TpetraExt_MatrixMatrix.hpp>
35 #include <Tpetra_RowMatrixTransposer.hpp>
36 #include <MatrixMarket_Tpetra.hpp>
37 #include <Xpetra_TpetraCrsMatrix.hpp>
38 #include <Xpetra_TpetraBlockCrsMatrix.hpp>
39 #include <Tpetra_BlockCrsMatrix_Helpers.hpp>
40 #include <Xpetra_TpetraMultiVector.hpp>
41 #include <Xpetra_TpetraVector.hpp>
42 #endif // HAVE_XPETRA_TPETRA
52 template <
class Scalar,
53 class LocalOrdinal = int,
54 class GlobalOrdinal = LocalOrdinal,
55 class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
60 #ifdef HAVE_XPETRA_EPETRA
61 static RCP<const Epetra_CrsMatrix>
Op2EpetraCrs(RCP<Matrix> Op);
68 #endif // HAVE_XPETRA_EPETRA
70 #ifdef HAVE_XPETRA_TPETRA
71 static RCP<const Tpetra::CrsMatrix<SC, LO, GO, NO> >
Op2TpetraCrs(RCP<Matrix> Op);
83 static RCP<const Tpetra::BlockCrsMatrix<SC, LO, GO, NO> >
Op2TpetraBlockCrs(RCP<Matrix> Op);
94 #else // HAVE_XPETRA_TPETRA
99 #endif // HAVE_XPETRA_TPETRA
101 #ifdef HAVE_XPETRA_TPETRA
104 const tcrs_matrix_type& A,
bool transposeA,
const typename tcrs_matrix_type::scalar_type alpha,
105 const tcrs_matrix_type& B,
bool transposeB,
const typename tcrs_matrix_type::scalar_type beta);
108 #ifdef HAVE_XPETRA_EPETRAEXT
Xpetra utility class containing transformation routines between Xpetra::Matrix and Epetra/Tpetra obje...
static bool isTpetraBlockCrs(RCP< Matrix > Op)
static RCP< const Tpetra::CrsMatrix< SC, LO, GO, NO > > Op2TpetraCrs(RCP< Matrix > Op)
static bool isTpetraCrs(RCP< Matrix > Op)
static RCP< Tpetra::CrsMatrix< SC, LO, GO, NO > > Op2NonConstTpetraCrs(RCP< Matrix > Op)
Tpetra::CrsMatrix< SC, LO, GO, NO > tcrs_matrix_type
static RCP< Tpetra::BlockCrsMatrix< SC, LO, GO, NO > > Op2NonConstTpetraBlockCrs(RCP< Matrix > Op)
static Teuchos::RCP< Matrix > tpetraAdd(const tcrs_matrix_type &A, bool transposeA, const typename tcrs_matrix_type::scalar_type alpha, const tcrs_matrix_type &B, bool transposeB, const typename tcrs_matrix_type::scalar_type beta)
static RCP< const Epetra_CrsMatrix > Op2EpetraCrs(RCP< Matrix > Op)
static void epetraExtMult(const Matrix &A, bool transposeA, const Matrix &B, bool transposeB, Matrix &C, bool fillCompleteResult)
static RCP< const Tpetra::BlockCrsMatrix< SC, LO, GO, NO > > Op2TpetraBlockCrs(RCP< Matrix > Op)
static RCP< Epetra_CrsMatrix > Op2NonConstEpetraCrs(RCP< Matrix > Op)
Xpetra-specific matrix class.