47 #ifndef __Teko_BlockedMappingStrategy_hpp__
48 #define __Teko_BlockedMappingStrategy_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"
71 #include "Teko_BlockingEpetra.hpp"
76 class BlockedMappingStrategy :
public MappingStrategy {
90 BlockedMappingStrategy(
const std::vector<std::vector<int> > & vars,
91 const Teuchos::RCP<const Epetra_Map> & baseMap,
const Epetra_Comm & comm);
104 virtual void copyEpetraIntoThyra(
const Epetra_MultiVector& epetra_X,
105 const Teuchos::Ptr<Thyra::MultiVectorBase<double> > & thyra_X)
const;
114 virtual void copyThyraIntoEpetra(
const Teuchos::RCP<
const Thyra::MultiVectorBase<double> > & thyra_Y,
115 Epetra_MultiVector& epetra_Y)
const;
124 virtual const Teuchos::RCP<const Epetra_Map> domainMap()
const
125 {
return domainMap_; }
134 virtual const Teuchos::RCP<const Epetra_Map> rangeMap()
const
135 {
return rangeMap_; }
141 virtual std::string toString()
const
142 {
return std::string(
"BlockedMappingStrategy"); }
163 void buildBlockTransferData(
const std::vector<std::vector<int> > & vars,
164 const Teuchos::RCP<const Epetra_Map> & baseMap,
const Epetra_Comm & comm);
177 const std::vector<Blocking::MapPair> & getMaps()
const
178 {
return blockMaps_; }
191 const Teuchos::RCP<Thyra::BlockedLinearOpBase<double> >
192 buildBlockedThyraOp(
const Teuchos::RCP<const Epetra_CrsMatrix> & mat,
const std::string & label=
"<ANYM>")
const;
203 void rebuildBlockedThyraOp(
const RCP<const Epetra_CrsMatrix> & mat,
204 const RCP<Thyra::BlockedLinearOpBase<double> > & A)
const;
213 Teuchos::RCP<const Epetra_Map> domainMap_;
214 Teuchos::RCP<const Epetra_Map> rangeMap_;
219 std::vector<Blocking::MapPair> blockMaps_;
220 std::vector<Teuchos::RCP<Epetra_Import> > blockImport_;
221 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.