10 #ifndef __Teko_StridedMappingStrategy_hpp__
11 #define __Teko_StridedMappingStrategy_hpp__
17 #include "Teuchos_RCP.hpp"
20 #include "Thyra_MultiVectorBase.hpp"
21 #include "Thyra_LinearOpBase.hpp"
22 #include "Thyra_BlockedLinearOpBase.hpp"
25 #include "Epetra_Comm.h"
26 #include "Epetra_Map.h"
27 #include "Epetra_MultiVector.h"
28 #include "Epetra_Import.h"
29 #include "Epetra_Export.h"
30 #include "Epetra_CrsMatrix.h"
33 #include "Teko_EpetraOperatorWrapper.hpp"
38 class StridedMappingStrategy :
public MappingStrategy {
52 StridedMappingStrategy(
const std::vector<int>& vars,
const Teuchos::RCP<const Epetra_Map>& map,
53 const Epetra_Comm& comm);
66 virtual void copyEpetraIntoThyra(
67 const Epetra_MultiVector& epetra_X,
68 const Teuchos::Ptr<Thyra::MultiVectorBase<double> >& thyra_X)
const;
78 const Teuchos::RCP<
const Thyra::MultiVectorBase<double> >& thyra_Y,
79 Epetra_MultiVector& epetra_Y)
const;
88 virtual const Teuchos::RCP<const Epetra_Map> domainMap()
const {
return domainMap_; }
97 virtual const Teuchos::RCP<const Epetra_Map> rangeMap()
const {
return rangeMap_; }
103 virtual std::string toString()
const {
return std::string(
"StridedMappingStrategy"); }
124 void buildBlockTransferData(
const std::vector<int>& vars,
125 const Teuchos::RCP<const Epetra_Map>& baseMap,
126 const Epetra_Comm& comm);
139 const std::vector<std::pair<int, Teuchos::RCP<Epetra_Map> > >& getMaps()
const {
154 const Teuchos::RCP<Thyra::BlockedLinearOpBase<double> > buildBlockedThyraOp(
155 const Teuchos::RCP<const Epetra_CrsMatrix>& mat,
const std::string& label =
"<ANYM>")
const;
166 void rebuildBlockedThyraOp(
const RCP<const Epetra_CrsMatrix>& mat,
167 const RCP<Thyra::BlockedLinearOpBase<double> >& A)
const;
176 Teuchos::RCP<const Epetra_Map> domainMap_;
177 Teuchos::RCP<const Epetra_Map> rangeMap_;
182 std::vector<std::pair<int, Teuchos::RCP<Epetra_Map> > > blockMaps_;
183 std::vector<Teuchos::RCP<Epetra_Export> > blockExport_;
184 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.