14 #if defined(HAVE_XPETRA_EPETRA) && !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES)
21 bool call_FillComplete_on_result,
22 bool doOptimizeStorage,
23 const std::string& label,
24 const Teuchos::RCP<Teuchos::ParameterList>& params) {
31 "XpetraExt::MatrixMatrix::Jacobi: row map of C is not same as row map of A")
33 "XpetraExt::MatrixMatrix::Jacobi: row map of C is not same as row map of B");
37 bool haveMultiplyDoFillComplete = call_FillComplete_on_result && doOptimizeStorage;
40 #ifndef HAVE_XPETRA_EPETRAEXT
50 if (haveMultiplyDoFillComplete) {
61 std::ostringstream buf;
63 std::string msg =
"EpetraExt::MatrixMatrix::Jacobi return value of " + buf.str();
68 #ifdef HAVE_XPETRA_TPETRA
69 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \
70 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))))
76 const RCP<Tpetra::Vector<SC, LO, GO, NO> >& tpD =
toTpetra(Dinv);
84 if (call_FillComplete_on_result && !haveMultiplyDoFillComplete) {
85 RCP<Teuchos::ParameterList> ppp = rcp(
new Teuchos::ParameterList());
86 ppp->set(
"Optimize Storage", doOptimizeStorage);
87 C.fillComplete(B.getDomainMap(), B.getRangeMap(), ppp);
93 C.
CreateView(
"stridedMaps", rcpA,
false, rcpB,
false);
97 #if defined(HAVE_XPETRA_EPETRA) && !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES)
104 bool call_FillComplete_on_result,
105 bool doOptimizeStorage,
106 const std::string& label,
107 const Teuchos::RCP<Teuchos::ParameterList>& params) {
110 typedef long long GO;
114 "XpetraExt::MatrixMatrix::Jacobi: row map of C is not same as row map of A")
116 "XpetraExt::MatrixMatrix::Jacobi: row map of C is not same as row map of B");
120 bool haveMultiplyDoFillComplete = call_FillComplete_on_result && doOptimizeStorage;
123 #ifndef HAVE_XPETRA_EPETRAEXT
133 if (haveMultiplyDoFillComplete) {
144 std::ostringstream buf;
146 std::string msg =
"EpetraExt::MatrixMatrix::Jacobi return value of " + buf.str();
151 #ifdef HAVE_XPETRA_TPETRA
152 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \
153 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))))
159 const RCP<Tpetra::Vector<SC, LO, GO, NO> >& tpD =
toTpetra(Dinv);
167 if (call_FillComplete_on_result && !haveMultiplyDoFillComplete) {
168 RCP<Teuchos::ParameterList> ppp = rcp(
new Teuchos::ParameterList());
169 ppp->set(
"Optimize Storage", doOptimizeStorage);
170 C.fillComplete(B.getDomainMap(), B.getRangeMap(), ppp);
176 C.
CreateView(
"stridedMaps", rcpA,
false, rcpB,
false);
void Jacobi(Scalar omega, const Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Dinv, const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &C, bool call_FillComplete_on_result=true, bool doOptimizeStorage=true, const std::string &label=std::string(), const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
void Jacobi< double, int, long long, EpetraNode >(double omega, const Xpetra::Vector< double, int, long long, EpetraNode > &Dinv, const Xpetra::Matrix< double, int, long long, EpetraNode > &A, const Xpetra::Matrix< double, int, long long, EpetraNode > &B, Xpetra::Matrix< double, int, long long, EpetraNode > &C, bool call_FillComplete_on_result, bool doOptimizeStorage, const std::string &label, const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
Exception throws to report errors in the internal logical of the program.
static RCP< const Tpetra::CrsMatrix< SC, LO, GO, NO > > Op2TpetraCrs(RCP< Matrix > Op)
void CreateView(viewLabel_t viewLabel, const RCP< const Map > &rowMap, const RCP< const Map > &colMap)
RCP< const Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > toTpetra(const RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph)
static RCP< Tpetra::CrsMatrix< SC, LO, GO, NO > > Op2NonConstTpetraCrs(RCP< Matrix > Op)
#define XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
void Jacobi< double, int, int, EpetraNode >(double omega, const Xpetra::Vector< double, int, int, EpetraNode > &Dinv, const Xpetra::Matrix< double, int, int, EpetraNode > &A, const Xpetra::Matrix< double, int, int, EpetraNode > &B, Xpetra::Matrix< double, int, int, EpetraNode > &C, bool call_FillComplete_on_result, bool doOptimizeStorage, const std::string &label, const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
Tpetra::KokkosCompat::KokkosSerialWrapperNode EpetraNode
static RCP< Epetra_CrsMatrix > Op2NonConstEpetraCrs(RCP< Matrix > Op)
Xpetra-specific matrix class.