Teko  Version of the Day
 All Classes Files Functions Variables Pages
Teko_TpetraBasicMappingStrategy.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_TpetraBasicMappingStrategy_hpp__
11 #define __Teko_TpetraBasicMappingStrategy_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 "Tpetra_Map.hpp"
24 #include "Tpetra_MultiVector.hpp"
25 
26 // Teko includes
27 #include "Teko_TpetraOperatorWrapper.hpp"
28 #include "Teko_ConfigDefs.hpp"
29 
30 namespace Teko {
31 namespace TpetraHelpers {
32 
33 class BasicMappingStrategy : public MappingStrategy {
34  public:
36 
37 
47  BasicMappingStrategy(const Teuchos::RCP<const Tpetra::Map<LO, GO, NT> >& rMap,
48  const Teuchos::RCP<const Tpetra::Map<LO, GO, NT> >& dMap,
49  const Teuchos::Comm<Thyra::Ordinal>& comm);
51 
53 
54 
63  virtual void copyTpetraIntoThyra(const Tpetra::MultiVector<ST, LO, GO, NT>& tpetra_X,
64  const Teuchos::Ptr<Thyra::MultiVectorBase<ST> >& thyra_X) const;
65  // const Teko::Epetra::EpetraOperatorWrapper & eow) const;
66 
75  virtual void copyThyraIntoTpetra(const Teuchos::RCP<const Thyra::MultiVectorBase<ST> >& thyra_Y,
76  Tpetra::MultiVector<ST, LO, GO, NT>& tpetra_Y) const;
77  // const Teko::Epetra::EpetraOperatorWrapper & eow) const;
78 
86  virtual const Teuchos::RCP<const Tpetra::Map<LO, GO, NT> > domainMap() const {
87  return domainMap_;
88  }
89 
97  virtual const Teuchos::RCP<const Tpetra::Map<LO, GO, NT> > rangeMap() const { return rangeMap_; }
98 
103  virtual std::string toString() const { return std::string("BasicMappingStrategy"); }
104 
106 
107  protected:
108  // member variables
109 
111 
112  Teuchos::RCP<const Tpetra::Map<LO, GO, NT> > domainMap_;
113  Teuchos::RCP<const Tpetra::Map<LO, GO, NT> > rangeMap_;
115 };
116 
117 } // namespace TpetraHelpers
118 } // end namespace Teko
119 
120 #endif
virtual void copyThyraIntoTpetra(const RCP< const Thyra::MultiVectorBase< ST > > &thyraX, Tpetra::MultiVector< ST, LO, GO, NT > &tpetraX) const =0
Copy an Thyra::MultiVectorBase into a Epetra_MultiVector.