Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
Map_decl.hpp
1#ifndef MAP_DECL_hpp
2#define MAP_DECL_hpp
3
4#include <Teuchos_VerboseObject.hpp>
5#include <Tpetra_Map.hpp>
6#include <Tpetra_MultiVector.hpp>
7#include <Tpetra_Vector.hpp>
8#include <Tpetra_Export.hpp>
9#include <Tpetra_Import.hpp>
10#include <Thyra_TpetraThyraWrappers.hpp>
11#include <Thyra_TpetraVector.hpp>
12#include <Thyra_TpetraMultiVector.hpp>
13#include <Thyra_TpetraVectorSpace.hpp>
14#include <Thyra_VectorSpaceBase_decl.hpp>
15
16#include "feddlib/core/FEDDCore.hpp"
17
18
27
28namespace FEDD {
29template < class LO = default_lo, class GO = default_go, class NO = default_no>
30class Map {
31
32public:
33
34 typedef Map<LO,GO,NO> Map_Type;
35 typedef Teuchos::RCP<Map_Type> MapPtr_Type;
36 typedef Teuchos::RCP<const Map_Type> MapConstPtr_Type;
37
38 typedef Tpetra::Map<LO,GO,NO> TpetraMap_Type;
39 typedef Teuchos::RCP<TpetraMap_Type> TpetraMapPtr_Type;
40 typedef Teuchos::RCP<const TpetraMap_Type> TpetraMapConstPtr_Type;
41 typedef const TpetraMapConstPtr_Type TpetraMapConstPtrConst_Type;
42
43 typedef Thyra::VectorSpaceBase<default_sc> ThyraVSB_Type;
44 typedef Teuchos::RCP<ThyraVSB_Type> ThyraVSBPtr_Type;
45 typedef Teuchos::RCP<const ThyraVSB_Type> ThyraVSBConstPtr_Type;
46
47 typedef Teuchos::Comm<int> Comm_Type;
48 typedef Teuchos::RCP<Comm_Type> CommPtr_Type;
49 typedef Teuchos::RCP<const Comm_Type> CommConstPtr_Type;
50
51 Map();
52
53 Map( const TpetraMapConstPtr_Type& tpetraMatPtrIn );
54
55 Map( const Map_Type& mapIn );
56
57 Map(GO numGlobalElements,
58 const Teuchos::ArrayView<const GO> &elementList,
59 GO indexBase,
60 const CommConstPtr_Type &comm);
61
62 Map(GO numGlobalElements,
63 LO numLocalElements,
64 GO indexBase,
65 const CommConstPtr_Type &comm);
66
67
68 ~Map();
69
70 LO getNodeNumElements() const;
71
72 GO getGlobalNumElements() const;
73
74 GO getGlobalElement(LO id) const;
75
76 LO getLocalElement(GO id) const;
77
78 CommConstPtr_Type getComm() const;
79
80 Teuchos::ArrayView<const GO> getNodeElementList() const;
81
82 GO getIndexBase() const;
83
84 MapPtr_Type buildVecFieldMap(UN numDofs, std::string ordering="NodeWise") const;
85
86 TpetraMapConstPtr_Type getTpetraMap() const;
87
88 GO getMaxAllGlobalIndex() const;
89
90 LO getMaxLocalIndex() const;
91
92 void print(Teuchos::EVerbosityLevel verbLevel=Teuchos::VERB_EXTREME) const;
93
94 ThyraVSBConstPtr_Type getThyraVectorSpaceBase() const;
95
96 CommPtr_Type getCommNonConst();
97
101 Teuchos::RCP<Map<LO,GO,NO> > buildUniqueMap( int numFreeProcs=0 ) const;
102
103 Teuchos::RCP<Map<LO,GO,NO> > buildUniqueMap( tuple_intint_Type rankRange ) const;
104
105
106private:
107
108 TpetraMapConstPtr_Type map_;
109
110};
111}
112
113#endif
Teuchos::RCP< Map< LO, GO, NO > > buildUniqueMap(int numFreeProcs=0) const
Definition Map_def.hpp:160
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement_decl.hpp:36