10 #ifndef __Teko_BlockedMappingStrategy_hpp__
11 #define __Teko_BlockedMappingStrategy_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"
34 #include "Teko_BlockingEpetra.hpp"
39 class BlockedMappingStrategy :
public MappingStrategy {
53 BlockedMappingStrategy(
const std::vector<std::vector<int> >& vars,
54 const Teuchos::RCP<const Epetra_Map>& baseMap,
const Epetra_Comm& comm);
67 virtual void copyEpetraIntoThyra(
68 const Epetra_MultiVector& epetra_X,
69 const Teuchos::Ptr<Thyra::MultiVectorBase<double> >& thyra_X)
const;
79 const Teuchos::RCP<
const Thyra::MultiVectorBase<double> >& thyra_Y,
80 Epetra_MultiVector& epetra_Y)
const;
89 virtual const Teuchos::RCP<const Epetra_Map> domainMap()
const {
return domainMap_; }
98 virtual const Teuchos::RCP<const Epetra_Map> rangeMap()
const {
return rangeMap_; }
104 virtual std::string toString()
const {
return std::string(
"BlockedMappingStrategy"); }
125 void buildBlockTransferData(
const std::vector<std::vector<int> >& vars,
126 const Teuchos::RCP<const Epetra_Map>& baseMap,
127 const Epetra_Comm& comm);
140 const std::vector<Blocking::MapPair>& getMaps()
const {
return blockMaps_; }
153 const Teuchos::RCP<Thyra::BlockedLinearOpBase<double> > buildBlockedThyraOp(
154 const Teuchos::RCP<const Epetra_CrsMatrix>& mat,
const std::string& label =
"<ANYM>")
const;
165 void rebuildBlockedThyraOp(
const RCP<const Epetra_CrsMatrix>& mat,
166 const RCP<Thyra::BlockedLinearOpBase<double> >& A)
const;
175 Teuchos::RCP<const Epetra_Map> domainMap_;
176 Teuchos::RCP<const Epetra_Map> rangeMap_;
181 std::vector<Blocking::MapPair> blockMaps_;
182 std::vector<Teuchos::RCP<Epetra_Import> > blockImport_;
183 std::vector<Teuchos::RCP<Epetra_Export> > blockExport_;
virtual void copyThyraIntoEpetra(const RCP< const Thyra::MultiVectorBase< double > > &thyraX, Epetra_MultiVector &epetraX) const =0
Copy an Thyra::MultiVectorBase into a Epetra_MultiVector.