Teko  Version of the Day
 All Classes Files Functions Variables Pages
Teko_BasicMappingStrategy.hpp
1 // @HEADER
2 // *****************************************************************************
3 // Teko: A package for block and physics based preconditioning
4 //
5 // Copyright 2010 NTESS and the Teko contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef __Teko_BasicMappingStrategy_hpp__
11 #define __Teko_BasicMappingStrategy_hpp__
12 
13 // stl includes
14 #include <vector>
15 
16 // Teuchos includes
17 #include "Teuchos_RCP.hpp"
18 
19 // Thyra includes
20 #include "Thyra_MultiVectorBase.hpp"
21 
22 // Epetra includes
23 #include "Epetra_Comm.h"
24 #include "Epetra_Map.h"
25 #include "Epetra_MultiVector.h"
26 
27 // Teko includes
28 #include "Teko_EpetraOperatorWrapper.hpp"
29 
30 namespace Teko {
31 namespace Epetra {
32 
33 class BasicMappingStrategy : public MappingStrategy {
34  public:
36 
37 
47  BasicMappingStrategy(const Teuchos::RCP<const Epetra_Map>& rMap,
48  const Teuchos::RCP<const Epetra_Map>& dMap, const Epetra_Comm& comm);
50 
52 
53 
62  virtual void copyEpetraIntoThyra(
63  const Epetra_MultiVector& epetra_X,
64  const Teuchos::Ptr<Thyra::MultiVectorBase<double> >& thyra_X) const;
65  // const Teko::Epetra::EpetraOperatorWrapper & eow) const;
66 
75  virtual void copyThyraIntoEpetra(
76  const Teuchos::RCP<const Thyra::MultiVectorBase<double> >& thyra_Y,
77  Epetra_MultiVector& epetra_Y) const;
78  // const Teko::Epetra::EpetraOperatorWrapper & eow) const;
79 
87  virtual const Teuchos::RCP<const Epetra_Map> domainMap() const { return domainMap_; }
88 
96  virtual const Teuchos::RCP<const Epetra_Map> rangeMap() const { return rangeMap_; }
97 
102  virtual std::string toString() const { return std::string("BasicMappingStrategy"); }
103 
105 
106  protected:
107  // member variables
108 
110 
111  Teuchos::RCP<const Epetra_Map> domainMap_;
112  Teuchos::RCP<const Epetra_Map> rangeMap_;
114 };
115 
116 } // end namespace Epetra
117 } // end namespace Teko
118 
119 #endif
virtual void copyThyraIntoEpetra(const RCP< const Thyra::MultiVectorBase< double > > &thyraX, Epetra_MultiVector &epetraX) const =0
Copy an Thyra::MultiVectorBase into a Epetra_MultiVector.