Teko  Version of the Day
 All Classes Files Functions Variables Pages
Teko_ReorderedMappingStrategy.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_ReorderedMappingStrategy_hpp__
11 #define __Teko_ReorderedMappingStrategy_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 #include "Thyra_LinearOpBase.hpp"
22 
23 // Epetra includes
24 #include "Epetra_Comm.h"
25 #include "Epetra_Map.h"
26 #include "Epetra_MultiVector.h"
27 #include "Epetra_Import.h"
28 #include "Epetra_Export.h"
29 #include "Epetra_CrsMatrix.h"
30 
31 // Teko includes
32 #include "Teko_BlockedReordering.hpp"
33 #include "Teko_EpetraOperatorWrapper.hpp"
34 
35 namespace Teko {
36 namespace Epetra {
37 
38 class ReorderedMappingStrategy : public MappingStrategy {
39  public:
41 
42 
50  ReorderedMappingStrategy(const BlockReorderManager& brm,
51  const Teuchos::RCP<const MappingStrategy>& map);
53 
55 
56 
64  virtual void copyEpetraIntoThyra(
65  const Epetra_MultiVector& epetra_X,
66  const Teuchos::Ptr<Thyra::MultiVectorBase<double> >& thyra_X) const;
67 
75  virtual void copyThyraIntoEpetra(
76  const Teuchos::RCP<const Thyra::MultiVectorBase<double> >& thyra_Y,
77  Epetra_MultiVector& epetra_Y) const;
78 
86  virtual const Teuchos::RCP<const Epetra_Map> domainMap() const { return domainMap_; }
87 
95  virtual const Teuchos::RCP<const Epetra_Map> rangeMap() const { return rangeMap_; }
96 
101  virtual std::string toString() const { return std::string("ReorderedMappingStrategy"); }
102 
104 
106  virtual RCP<const MappingStrategy> GetPrimaryMapStrategy() const { return mapStrategy_; }
107 
108  protected:
109  // member variables
110 
112 
113  Teuchos::RCP<const Epetra_Map> domainMap_;
114  Teuchos::RCP<const Epetra_Map> rangeMap_;
116 
118 
119  const BlockReorderManager reorderManager_;
120  RCP<const MappingStrategy> mapStrategy_;
122 };
123 
124 } // end namespace Epetra
125 } // end namespace Teko
126 
127 #endif
virtual void copyThyraIntoEpetra(const RCP< const Thyra::MultiVectorBase< double > > &thyraX, Epetra_MultiVector &epetraX) const =0
Copy an Thyra::MultiVectorBase into a Epetra_MultiVector.