Go to the documentation of this file.
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,
68 "XpetraExt::MatrixMatrix::Jacobi: row map of C is not same as row map of A")
70 "XpetraExt::MatrixMatrix::Jacobi: row map of C is not same as row map of B");
74 bool haveMultiplyDoFillComplete = call_FillComplete_on_result && doOptimizeStorage;
77 #ifndef HAVE_XPETRA_EPETRAEXT
87 if (haveMultiplyDoFillComplete) {
98 std::ostringstream buf;
100 std::string msg =
"EpetraExt::MatrixMatrix::Jacobi return value of " + buf.str();
105 #ifdef HAVE_XPETRA_TPETRA
106 # if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \
107 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))))
121 if (call_FillComplete_on_result && !haveMultiplyDoFillComplete) {
123 ppp->
set(
"Optimize Storage", doOptimizeStorage);
130 C.
CreateView(
"stridedMaps", rcpA,
false, rcpB,
false);
134 #if defined(HAVE_XPETRA_EPETRA) && !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES)
141 bool call_FillComplete_on_result,
142 bool doOptimizeStorage,
143 const std::string & label,
147 typedef long long GO;
151 "XpetraExt::MatrixMatrix::Jacobi: row map of C is not same as row map of A")
153 "XpetraExt::MatrixMatrix::Jacobi: row map of C is not same as row map of B");
157 bool haveMultiplyDoFillComplete = call_FillComplete_on_result && doOptimizeStorage;
160 #ifndef HAVE_XPETRA_EPETRAEXT
170 if (haveMultiplyDoFillComplete) {
181 std::ostringstream buf;
183 std::string msg =
"EpetraExt::MatrixMatrix::Jacobi return value of " + buf.str();
188 #ifdef HAVE_XPETRA_TPETRA
189 # if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \
190 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))))
204 if (call_FillComplete_on_result && !haveMultiplyDoFillComplete) {
206 ppp->
set(
"Optimize Storage", doOptimizeStorage);
213 C.
CreateView(
"stridedMaps", rcpA,
false, rcpB,
false);
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)
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)
#define XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
virtual bool isFillComplete() const =0
Returns true if fillComplete() has been called and the matrix is in compute mode.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
virtual Teuchos::RCP< const Map > getRangeMap() const =0
The Map associated with the range of this operator, which must be compatible with Y....
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Xpetra-specific matrix class.
virtual Teuchos::RCP< const Map > getDomainMap() const =0
The Map associated with the domain of this operator, which must be compatible with X....
Exception throws to report errors in the internal logical of the program.
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)
virtual const RCP< const Map > & getRowMap() const
Returns the Map that describes the row distribution in this matrix.
static RCP< Tpetra::CrsMatrix< SC, LO, GO, NO > > Op2NonConstTpetraCrs(RCP< Matrix > Op)
static RCP< Epetra_CrsMatrix > Op2NonConstEpetraCrs(RCP< Matrix > Op)
static RCP< const Tpetra::CrsMatrix< SC, LO, GO, NO > > Op2TpetraCrs(RCP< Matrix > Op)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
virtual void fillComplete(const RCP< const Map > &domainMap, const RCP< const Map > &rangeMap, const RCP< ParameterList > ¶ms=null)=0
Signal that data entry is complete, specifying domain and range maps.