10 #include "Epetra/Teko_BasicMappingStrategy.hpp"
11 #include "Epetra/Teko_EpetraHelpers.hpp"
13 #include "Thyra_EpetraThyraWrappers.hpp"
14 #include "Thyra_DefaultSpmdMultiVector.hpp"
18 using Teuchos::rcp_dynamic_cast;
33 BasicMappingStrategy::BasicMappingStrategy(
const Teuchos::RCP<const Epetra_Map>& rMap,
34 const Teuchos::RCP<const Epetra_Map>& dMap,
35 const Epetra_Comm& ) {
48 void BasicMappingStrategy::copyEpetraIntoThyra(
49 const Epetra_MultiVector& X,
50 const Teuchos::Ptr<Thyra::MultiVectorBase<double> >& thyra_X)
const {
52 RCP<Thyra::DefaultSpmdMultiVector<double> > vec =
53 rcp_dynamic_cast<Thyra::DefaultSpmdMultiVector<double> >(Teuchos::rcpFromRef(*thyra_X));
54 Teuchos::RCP<Epetra_MultiVector> ptrX =
55 Teuchos::rcp_const_cast<Epetra_MultiVector>(Teuchos::rcpFromRef(X));
56 fillDefaultSpmdMultiVector(vec, ptrX);
67 void BasicMappingStrategy::copyThyraIntoEpetra(
68 const RCP<
const Thyra::MultiVectorBase<double> >& thyra_Y, Epetra_MultiVector& Y)
const {
69 RCP<const Epetra_MultiVector> eSrc = Thyra::get_Epetra_MultiVector(*rangeMap(), thyra_Y);