47 #include "Teko_TpetraBasicMappingStrategy.hpp"
48 #include "Teko_TpetraHelpers.hpp"
50 #include "Thyra_TpetraThyraWrappers.hpp"
51 #include "Thyra_DefaultSpmdMultiVector.hpp"
55 using Teuchos::rcp_dynamic_cast;
58 namespace TpetraHelpers {
70 BasicMappingStrategy::BasicMappingStrategy(
const Teuchos::RCP<
const Tpetra::Map<LO,GO,NT> > & rMap,
71 const Teuchos::RCP<
const Tpetra::Map<LO,GO,NT> > & dMap,
const Teuchos::Comm<Thyra::Ordinal> & )
85 void BasicMappingStrategy::copyTpetraIntoThyra(
const Tpetra::MultiVector<ST,LO,GO,NT>& X,
86 const Teuchos::Ptr<Thyra::MultiVectorBase<ST> > & thyra_X)
const
91 RCP<Thyra::TpetraMultiVector<ST,LO,GO,NT> > vec = rcp_dynamic_cast<Thyra::TpetraMultiVector<ST,LO,GO,NT> >(Teuchos::rcpFromRef(*thyra_X));
92 Teuchos::RCP<Tpetra::MultiVector<ST,LO,GO,NT> > ptrX = Teuchos::rcp_const_cast<Tpetra::MultiVector<ST,LO,GO,NT> >(Teuchos::rcpFromRef(X));
93 fillDefaultSpmdMultiVector(vec,ptrX);
104 void BasicMappingStrategy::copyThyraIntoTpetra(
const RCP<
const Thyra::MultiVectorBase<ST> > & thyra_Y,
105 Tpetra::MultiVector<ST,LO,GO,NT>& Y)
const
108 RCP<const Tpetra::MultiVector<ST,LO,GO,NT> > tSrc = Thyra::TpetraOperatorVectorExtraction<ST,LO,GO,NT>::getConstTpetraMultiVector(thyra_Y);