47 #ifndef __Teko_StridedMappingStrategy_hpp__
48 #define __Teko_StridedMappingStrategy_hpp__
54 #include "Teuchos_RCP.hpp"
57 #include "Thyra_MultiVectorBase.hpp"
58 #include "Thyra_LinearOpBase.hpp"
59 #include "Thyra_BlockedLinearOpBase.hpp"
62 #include "Epetra_Comm.h"
63 #include "Epetra_Map.h"
64 #include "Epetra_MultiVector.h"
65 #include "Epetra_Import.h"
66 #include "Epetra_Export.h"
67 #include "Epetra_CrsMatrix.h"
70 #include "Teko_EpetraOperatorWrapper.hpp"
75 class StridedMappingStrategy :
public MappingStrategy {
89 StridedMappingStrategy(
const std::vector<int> & vars,
const Teuchos::RCP<const Epetra_Map> & map,
const Epetra_Comm & comm);
102 virtual void copyEpetraIntoThyra(
const Epetra_MultiVector& epetra_X,
103 const Teuchos::Ptr<Thyra::MultiVectorBase<double> > & thyra_X)
const;
112 virtual void copyThyraIntoEpetra(
const Teuchos::RCP<
const Thyra::MultiVectorBase<double> > & thyra_Y,
113 Epetra_MultiVector& epetra_Y)
const;
122 virtual const Teuchos::RCP<const Epetra_Map> domainMap()
const
123 {
return domainMap_; }
132 virtual const Teuchos::RCP<const Epetra_Map> rangeMap()
const
133 {
return rangeMap_; }
139 virtual std::string toString()
const
140 {
return std::string(
"StridedMappingStrategy"); }
161 void buildBlockTransferData(
const std::vector<int> & vars,
const Teuchos::RCP<const Epetra_Map> & baseMap,
162 const Epetra_Comm & comm);
175 const std::vector<std::pair<int,Teuchos::RCP<Epetra_Map> > > & getMaps()
const
176 {
return blockMaps_; }
189 const Teuchos::RCP<Thyra::BlockedLinearOpBase<double> >
190 buildBlockedThyraOp(
const Teuchos::RCP<const Epetra_CrsMatrix> & mat,
const std::string & label=
"<ANYM>")
const;
201 void rebuildBlockedThyraOp(
const RCP<const Epetra_CrsMatrix> & mat,
202 const RCP<Thyra::BlockedLinearOpBase<double> > & A)
const;
211 Teuchos::RCP<const Epetra_Map> domainMap_;
212 Teuchos::RCP<const Epetra_Map> rangeMap_;
217 std::vector<std::pair<int,Teuchos::RCP<Epetra_Map> > > blockMaps_;
218 std::vector<Teuchos::RCP<Epetra_Export> > blockExport_;
219 std::vector<Teuchos::RCP<Epetra_Import> > blockImport_;
virtual void copyThyraIntoEpetra(const RCP< const Thyra::MultiVectorBase< double > > &thyraX, Epetra_MultiVector &epetraX) const =0
Copy an Thyra::MultiVectorBase into a Epetra_MultiVector.