51 #if defined(HAVE_XPETRA_EPETRA) && !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES) 58 bool call_FillComplete_on_result,
59 bool doOptimizeStorage,
60 const std::string & label) {
67 "XpetraExt::MatrixMatrix::Jacobi: row map of C is not same as row map of A")
69 "XpetraExt::MatrixMatrix::Jacobi: row map of C is not same as row map of B");
73 bool haveMultiplyDoFillComplete = call_FillComplete_on_result && doOptimizeStorage;
76 #ifndef HAVE_XPETRA_EPETRAEXT 87 std::ostringstream buf;
89 std::string msg =
"EpetraExt::MatrixMatrix::Jacobi return value of " + buf.str();
94 #ifdef HAVE_XPETRA_TPETRA 95 # if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ 96 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) 110 if(call_FillComplete_on_result && !haveMultiplyDoFillComplete) {
112 params->
set(
"Optimize Storage", doOptimizeStorage);
113 C.fillComplete(B.getDomainMap(), B.getRangeMap(), params);
119 C.
CreateView(
"stridedMaps", rcpA,
false, rcpB,
false);
123 #if defined(HAVE_XPETRA_EPETRA) && !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES) 130 bool call_FillComplete_on_result,
131 bool doOptimizeStorage,
132 const std::string & label) {
135 typedef long long GO;
139 "XpetraExt::MatrixMatrix::Jacobi: row map of C is not same as row map of A")
141 "XpetraExt::MatrixMatrix::Jacobi: row map of C is not same as row map of B");
145 bool haveMultiplyDoFillComplete = call_FillComplete_on_result && doOptimizeStorage;
148 #ifndef HAVE_XPETRA_EPETRAEXT 159 std::ostringstream buf;
161 std::string msg =
"EpetraExt::MatrixMatrix::Jacobi return value of " + buf.str();
166 #ifdef HAVE_XPETRA_TPETRA 167 # if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ 168 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) 182 if(call_FillComplete_on_result && !haveMultiplyDoFillComplete) {
184 params->
set(
"Optimize Storage", doOptimizeStorage);
185 C.fillComplete(B.getDomainMap(), B.getRangeMap(), params);
191 C.
CreateView(
"stridedMaps", rcpA,
false, rcpB,
false);
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)
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Exception throws to report errors in the internal logical of the program.
static RCP< Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Op2NonConstTpetraCrs(RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Op)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
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())
void CreateView(viewLabel_t viewLabel, const RCP< const Map > &rowMap, const RCP< const Map > &colMap)
#define XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
RCP< const Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > toTpetra(const RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph)
static RCP< Epetra_CrsMatrix > Op2NonConstEpetraCrs(RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Op)
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)
static RCP< const Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Op2TpetraCrs(RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Op)
Xpetra-specific matrix class.