Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
Map_Xpetra_decl.hpp
1#ifndef MAP_XPETRA_DECL_hpp
2#define MAP_XPETRA_DECL_hpp
3
4#include "feddlib/core/FEDDCore.hpp"
5#include "feddlib/core/General/DefaultTypeDefs.hpp"
6
7#include <Xpetra_MapFactory.hpp>
8#include <Xpetra_MultiVectorFactory.hpp>
9#include <Xpetra_VectorFactory.hpp>
10#include <Xpetra_ExportFactory.hpp>
11#include <Xpetra_ImportFactory.hpp>
12#include <Teuchos_VerboseObject.hpp>
13#include <Xpetra_ThyraUtils.hpp>
14#include <Thyra_VectorSpaceBase_decl.hpp>
15
24
25namespace FEDD {
26template < class LO = default_lo, class GO = default_go, class NO = default_no>
27class Map_Xpetra {
28
29public:
30
31 typedef Map_Xpetra<LO,GO,NO> Map_Type;
32 typedef Teuchos::RCP<Map_Type> MapPtr_Type;
33 typedef Teuchos::RCP<const Map_Type> MapConstPtr_Type;
34
35 typedef Xpetra::Map<LO,GO,NO> XpetraMap_Type;
36 typedef Teuchos::RCP<XpetraMap_Type> XpetraMapPtr_Type;
37 typedef Teuchos::RCP<const XpetraMap_Type> XpetraMapConstPtr_Type;
38 typedef const XpetraMapConstPtr_Type XpetraMapConstPtrConst_Type;
39
40 typedef Thyra::VectorSpaceBase<default_sc> ThyraVSB_Type;
41 typedef Teuchos::RCP<ThyraVSB_Type> ThyraVSBPtr_Type;
42 typedef Teuchos::RCP<const ThyraVSB_Type> ThyraVSBConstPtr_Type;
43
44 typedef Teuchos::Comm<int> Comm_Type;
45 typedef Teuchos::RCP<Comm_Type> CommPtr_Type;
46 typedef Teuchos::RCP<const Comm_Type> CommConstPtr_Type;
47
48 Map_Xpetra();
49
50 Map_Xpetra( const XpetraMapConstPtr_Type& xpetraMatPtrIn );
51
52 Map_Xpetra( const Map_Type& mapIn );
53
54 Map_Xpetra(std::string lib,
55 GO numGlobalElements,
56 const Teuchos::ArrayView<const GO> &elementList,
57 GO indexBase,
58 const CommConstPtr_Type &comm);
59
60 Map_Xpetra(std::string lib,
61 GO numGlobalElements,
62 LO numLocalElements,
63 GO indexBase,
64 const CommConstPtr_Type &comm);
65
66
67 ~Map_Xpetra();
68
69 std::string getUnderlyingLib( ) const;
70
71 MapPtr_Type buildVecFieldMap(UN numDofs, std::string ordering="NodeWise") const;
72
73 XpetraMapConstPtr_Type getXpetraMap() const;
74
75 ThyraVSBConstPtr_Type getThyraVectorSpaceBase() const;
76
77 LO getNodeNumElements() const;
78
79 GO getGlobalNumElements() const;
80
81 GO getGlobalElement(LO id) const;
82
83 LO getLocalElement(GO id) const;
84
85 Teuchos::ArrayView<const GO> getNodeElementList() const;
86
87 GO getMaxAllGlobalIndex() const;
88
89 LO getMaxLocalIndex() const;
90
91 void print(Teuchos::EVerbosityLevel verbLevel=Teuchos::VERB_EXTREME) const;
92
93 CommConstPtr_Type getComm() const;
94
95 CommPtr_Type getCommNonConst();
99 Teuchos::RCP<Map_Xpetra<LO,GO,NO> > buildUniqueMap( int numFreeProcs=0 ) const;
100
101 Teuchos::RCP<Map_Xpetra<LO,GO,NO> > buildUniqueMap( tuple_intint_Type rankRange ) const;
102
103 GO getIndexBase() const;
104
105private:
106
107 XpetraMapConstPtr_Type map_;
108};
109}
110
111#endif
Teuchos::RCP< Map_Xpetra< LO, GO, NO > > buildUniqueMap(int numFreeProcs=0) const
Definition Map_Xpetra_def.hpp:183
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5