Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 #ifndef XPETRA_MAP_HPP
00047 #define XPETRA_MAP_HPP
00048
00049
00050
00051 #include <Kokkos_DefaultNode.hpp>
00052 #include <Teuchos_Describable.hpp>
00053 #include "Xpetra_ConfigDefs.hpp"
00054
00055 namespace Xpetra {
00056
00057 enum UnderlyingLib {
00058 UseEpetra,
00059 UseTpetra,
00060 NotSpecified
00061 };
00062
00063 template <class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
00064 class Map
00065 : public Teuchos::Describable
00066 {
00067
00068 public:
00069
00071
00072
00074 virtual ~Map() { }
00075
00077
00079
00080
00082 virtual global_size_t getGlobalNumElements() const = 0;
00083
00085 virtual size_t getNodeNumElements() const = 0;
00086
00088 virtual GlobalOrdinal getIndexBase() const = 0;
00089
00091 virtual LocalOrdinal getMinLocalIndex() const = 0;
00092
00094 virtual LocalOrdinal getMaxLocalIndex() const = 0;
00095
00097 virtual GlobalOrdinal getMinGlobalIndex() const = 0;
00098
00100 virtual GlobalOrdinal getMaxGlobalIndex() const = 0;
00101
00103 virtual GlobalOrdinal getMinAllGlobalIndex() const = 0;
00104
00106 virtual GlobalOrdinal getMaxAllGlobalIndex() const = 0;
00107
00109 virtual LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const = 0;
00110
00112 virtual GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const = 0;
00113
00115 virtual LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList, const Teuchos::ArrayView< LocalOrdinal > &LIDList) const = 0;
00116
00118 virtual LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const = 0;
00119
00121 virtual Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() const = 0;
00122
00124
00126
00127
00129 virtual bool isNodeLocalElement(LocalOrdinal localIndex) const = 0;
00130
00132 virtual bool isNodeGlobalElement(GlobalOrdinal globalIndex) const = 0;
00133
00135 virtual bool isContiguous() const = 0;
00136
00138 virtual bool isDistributed() const = 0;
00139
00141 virtual bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const = 0;
00142
00144 virtual bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const = 0;
00145
00147
00149
00150
00152 virtual const Teuchos::RCP< const Teuchos::Comm< int > > getComm() const = 0;
00153
00155 virtual const Teuchos::RCP< Node > getNode() const = 0;
00156
00158
00160
00161
00163 virtual std::string description() const = 0;
00164
00166 virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const = 0;
00167
00169
00171
00172
00174 virtual UnderlyingLib lib() const = 0;
00175
00177
00178 };
00179
00180 }
00181
00182 #define XPETRA_MAP_SHORT
00183 #endif // XPETRA_MAP_HPP