10 #ifndef TPETRA_SOLVERMAP_LINEARPROBLEM_DEF_HPP
11 #define TPETRA_SOLVERMAP_LINEARPROBLEM_DEF_HPP
27 template <
class Scalar,
32 : StructuralSameTypeTransform<
LinearProblem<Scalar, LocalOrdinal, GlobalOrdinal, Node> >()
33 , solverMapCrsMatrixTrans_() {
37 template <
class Scalar,
45 template <
class Scalar,
49 typename SolverMap_LinearProblem<Scalar, LocalOrdinal, GlobalOrdinal, Node>::NewType
56 this->origObj_ = origProblem;
58 cm_t *oldMatrix =
dynamic_cast<cm_t *
>(origProblem->getMatrix().get());
59 Teuchos::RCP<mv_t> oldRHS = origProblem->
getRHS();
60 Teuchos::RCP<mv_t> oldLHS = origProblem->getLHS();
61 Teuchos::RCP<cm_t> newMatrix = solverMapCrsMatrixTrans_(Teuchos::rcp<cm_t>(oldMatrix,
false));
63 if (newMatrix.get() == oldMatrix) {
65 this->newObj_ = this->origObj_;
67 this->newObj_ = Teuchos::rcp<lp_t>(
new lp_t(newMatrix, oldLHS, oldRHS));
79 #define TPETRA_SOLVERMAPLINEARPROBLEM_INSTANT(SCALAR, LO, GO, NODE) \
80 template class SolverMap_LinearProblem<SCALAR, LO, GO, NODE>;
84 #endif // TPETRA_SOLVERMAP_LINEARPROBLEM_DEF_HPP
Class that encapulates linear problem (Ax = b).
Sparse matrix that presents a row-oriented interface that lets users read or modify entries...
~SolverMap_LinearProblem()
Declaration of the Tpetra::SolverMap_LinearProblem class.
NewType operator()(OriginalType const &origProblem)
SolverMap_LinearProblem()
Teuchos::RCP< multivector_type > getRHS() const
Get an RCP to the right-hand-side B.