10 #ifndef XPETRA_MAP_DECL_HPP
11 #define XPETRA_MAP_DECL_HPP
15 #include <Tpetra_KokkosCompat_DefaultNode.hpp>
16 #include <Teuchos_Describable.hpp>
18 #ifdef HAVE_XPETRA_EPETRA
19 #include "Epetra_config.h"
22 #ifdef HAVE_XPETRA_TPETRA
23 #include <Tpetra_Map.hpp>
31 #ifdef HAVE_XPETRA_EPETRA
32 #ifdef EPETRA_HAVE_OMP
33 typedef Tpetra::KokkosCompat::KokkosOpenMPWrapperNode
EpetraNode;
35 typedef Tpetra::KokkosCompat::KokkosSerialWrapperNode
EpetraNode;
45 template <
class LocalOrdinal,
47 class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
49 :
public Teuchos::Describable {
96 virtual LocalOrdinal
getLocalElement(GlobalOrdinal globalIndex)
const = 0;
103 const Teuchos::ArrayView<int> &nodeIDList,
104 const Teuchos::ArrayView<LocalOrdinal> &LIDList)
const = 0;
108 const Teuchos::ArrayView<int> &nodeIDList)
const = 0;
145 virtual Teuchos::RCP<const Teuchos::Comm<int> >
getComm()
const = 0;
156 virtual void describe(Teuchos::FancyOStream &out,
157 const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default)
const = 0;
168 virtual RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> >
184 virtual RCP<const Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node> >
getMap()
const;
186 #ifdef HAVE_XPETRA_TPETRA
187 typedef typename Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node>::local_map_type
local_map_type;
199 #define XPETRA_MAP_SHORT
200 #endif // XPETRA_MAP_DECL_HPP
virtual LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList, const Teuchos::ArrayView< LocalOrdinal > &LIDList) const =0
Return the process ranks and corresponding local indices for the given global indices.
virtual RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > removeEmptyProcesses() const =0
Return a new Map with processes with zero elements removed.
LocalOrdinal local_ordinal_type
virtual bool isDistributed() const =0
Whether this Map is globally distributed or locally replicated.
virtual LocalOrdinal getMinLocalIndex() const =0
The minimum local index.
GlobalOrdinal global_ordinal_type
virtual bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const =0
True if and only if map is compatible with this Map.
Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node >::local_map_type local_map_type
virtual global_indices_array_device_type getMyGlobalIndicesDevice() const =0
Return a view of the global indices owned by this process on the Map's device.
virtual Teuchos::RCP< const Teuchos::Comm< int > > getComm() const =0
Get this Map's Comm object.
virtual size_t getLocalNumElements() const =0
The number of elements belonging to the calling process.
virtual GlobalOrdinal getMinAllGlobalIndex() const =0
The minimum global index over all processes in the communicator.
virtual LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const =0
The local index corresponding to the given global index.
virtual GlobalOrdinal getMinGlobalIndex() const =0
The minimum global index owned by the calling process.
virtual GlobalOrdinal getIndexBase() const =0
The index base for this Map.
virtual Teuchos::ArrayView< const GlobalOrdinal > getLocalElementList() const =0
Return a view of the global indices owned by this process.
virtual RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
virtual bool isNodeGlobalElement(GlobalOrdinal globalIndex) const =0
Whether the given global index is valid for this Map on this process.
virtual GlobalOrdinal getMaxGlobalIndex() const =0
The maximum global index owned by the calling process.
virtual GlobalOrdinal getMaxAllGlobalIndex() const =0
The maximum global index over all processes in the communicator.
virtual local_map_type getLocalMap() const =0
Get the local Map for Kokkos kernels.
virtual GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const =0
The global index corresponding to the given local index.
virtual LocalOrdinal getMaxLocalIndex() const =0
The maximum local index on the calling process.
size_t global_size_t
Global size_t object.
Kokkos::View< const global_ordinal_type *, typename Node::device_type > global_indices_array_device_type
Tpetra::KokkosCompat::KokkosSerialWrapperNode EpetraNode
virtual bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const =0
True if and only if map is identical to this Map.
virtual bool isNodeLocalElement(LocalOrdinal localIndex) const =0
Whether the given local index is valid for this Map on this process.
virtual global_size_t getGlobalNumElements() const =0
The number of elements in this Map.
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const =0
Print this object with the given verbosity level to the given Teuchos::FancyOStream.
virtual bool isContiguous() const =0
True if this Map is distributed contiguously, else false.
virtual RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > replaceCommWithSubset(const Teuchos::RCP< const Teuchos::Comm< int > > &newComm) const =0
Replace this Map's communicator with a subset communicator.
virtual ~Map()
Destructor.
virtual UnderlyingLib lib() const =0
Get the library used by this object (Tpetra or Epetra?)
virtual std::string description() const =0
Return a simple one-line description of this object.