10 #ifndef PACKAGES_XPETRA_SUP_BLOCKEDMAP_XPETRA_BLOCKEDMAP_DECL_HPP_
11 #define PACKAGES_XPETRA_SUP_BLOCKEDMAP_XPETRA_BLOCKEDMAP_DECL_HPP_
20 template <
class LocalOrdinal,
22 class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
31 #undef XPETRA_BLOCKEDMAP_SHORT
60 BlockedMap(
const RCP<const Map>& fullmap,
const std::vector<RCP<const Map>>& maps,
bool bThyraMode =
false);
63 BlockedMap(
const std::vector<RCP<const Map>>& maps,
const std::vector<RCP<const Map>>& thyramaps);
109 const Teuchos::ArrayView<int>& ,
110 const Teuchos::ArrayView<LocalOrdinal>& )
const;
114 const Teuchos::ArrayView<int>& )
const;
151 virtual Teuchos::RCP<const Teuchos::Comm<int>>
getComm()
const;
192 virtual RCP<const Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node>>
208 virtual RCP<const Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node>>
220 const RCP<const Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node>>
221 getMap(
size_t i,
bool bThyraMode =
false)
const;
224 const RCP<Xpetra::Import<LocalOrdinal, GlobalOrdinal, Node>>
228 const RCP<const Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node>>
234 #ifdef HAVE_XPETRA_TPETRA
240 #else // HAVE_XPETRA_TPETRA
242 #warning "Xpetra Kokkos interface for CrsMatrix is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too."
244 #endif // #else !HAVE_XPETRA_TPETRA
255 virtual void describe(Teuchos::FancyOStream& out,
const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default)
const;
278 static Teuchos::RCP<const Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node>>
294 #define XPETRA_BLOCKEDMAP_SHORT
virtual GlobalOrdinal getIndexBase() const
The index base for this Map.
virtual std::string description() const
A simple one-line description of this object.
Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node >::local_map_type local_map_type
Map< LocalOrdinal, GlobalOrdinal, Node >::global_indices_array_device_type global_indices_array_device_type
bool CheckConsistency() const
virtual RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
virtual Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map's Comm object.
virtual ~BlockedMap()
Destructor.
std::vector< RCP< const Map > > maps_
virtual bool isCompatible(const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is compatible with this Map.
const RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getFullMap() const
the full map
virtual RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > removeEmptyProcesses() const
Return a new Map with processes with zero elements removed.
RCP< const Map > fullmap_
virtual global_size_t getGlobalNumElements() const
The number of elements in this Map.
virtual GlobalOrdinal getMinGlobalIndex() const
The minimum global index owned by the calling process.
virtual bool isNodeGlobalElement(GlobalOrdinal globalIndex) const
Whether the given global index is valid for this Map on this process.
const RCP< Xpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > getImporter(size_t i) const
get the importer between full map and partial map
virtual RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > replaceCommWithSubset(const Teuchos::RCP< const Teuchos::Comm< int >> &) const
Replace this Map's communicator with a subset communicator.
virtual void assign(const BlockedMap &input)
Implementation of the assignment operator (operator=); does a deep copy.
local_map_type getLocalMap() const
Get the local Map for Kokkos kernels.
virtual global_indices_array_device_type getMyGlobalIndicesDevice() const
Return a view of the global indices owned by this process.
virtual LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &, const Teuchos::ArrayView< int > &, const Teuchos::ArrayView< LocalOrdinal > &) const
Return the process ranks and corresponding local indices for the given global indices.
virtual bool isSameAs(const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is identical to this Map.
virtual LocalOrdinal getMinLocalIndex() const
The minimum local index.
size_t getNumMaps() const
number of partial maps
virtual GlobalOrdinal getMinAllGlobalIndex() const
The minimum global index over all processes in the communicator.
GlobalOrdinal global_ordinal_type
virtual LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const
The local index corresponding to the given global index.
virtual bool isNodeLocalElement(LocalOrdinal localIndex) const
Whether the given local index is valid for this Map on this process.
BlockedMap< LocalOrdinal, GlobalOrdinal, Node > & operator=(const BlockedMap &rhs)
Assignment operator: Does a deep copy.
size_t global_size_t
Global size_t object.
Kokkos::View< const global_ordinal_type *, typename Node::device_type > global_indices_array_device_type
static Teuchos::RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > concatenateMaps(const std::vector< Teuchos::RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >>> &subMaps)
Helper function to concatenate several maps.
virtual UnderlyingLib lib() const
Get the library used by this object (Tpetra or Epetra?)
LocalOrdinal local_ordinal_type
virtual GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
std::vector< RCP< Import > > importers_
typename Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >::local_map_type local_map_type
virtual GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const
The global index corresponding to the given local index.
virtual LocalOrdinal getMaxLocalIndex() const
The maximum local index on the calling process.
virtual bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
virtual bool isContiguous() const
True if this Map is distributed contiguously, else false.
virtual size_t getLocalNumElements() const
The number of elements belonging to the calling process.
virtual GlobalOrdinal getMaxAllGlobalIndex() const
The maximum global index over all processes in the communicator.
size_t getMapIndexForGID(GlobalOrdinal gid) const
returns map index in map extractor which contains GID
std::vector< RCP< const Map > > thyraMaps_
virtual bool getThyraMode() const
Local number of rows on the calling process.
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print the object with the given verbosity level to a FancyOStream.
virtual Teuchos::ArrayView< const GlobalOrdinal > getLocalElementList() const
Return a view of the global indices owned by this process.