72 RCP<const Matrix> A = rcpFromRef(Aref);
75 Teuchos::FancyOStream& mmfancy = this->GetOStream(
Statistics2);
79 RCP<CrsMatrix> Ptmp_ = CrsMatrixFactory::Build(C.
GetPattern());
80 Ptmp_->fillComplete(P0.getDomainMap(), P0.getRangeMap());
81 RCP<Matrix> Ptmp = rcp(
new CrsMatrixWrap(Ptmp_));
84 P = rcp_const_cast<Matrix>(rcpFromRef(P0));
86 for (
size_t k = 0; k < nIts_; k++) {
87 AP = Xpetra::MatrixMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>::Multiply(*A,
false, *P,
false, mmfancy,
true,
true);
90 SC stepLength = 2*stepLength_;
91 G = Xpetra::MatrixMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>::Multiply(*A,
true, *AP,
false,
true,
true);
95 SC stepLength = stepLength_;
101 Xpetra::MatrixMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>::TwoMatrixAdd(*Ptmp,
false, -stepLength, *P,
false, Teuchos::ScalarTraits<Scalar>::one(), newP, mmfancy);
102 newP->fillComplete(P->getDomainMap(), P->getRangeMap() );
static void MyOldScaleMatrix(Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Op, const Teuchos::ArrayRCP< const Scalar > &scalingVector, bool doInverse=true, bool doFillComplete=true, bool doOptimizeStorage=true)