47 #ifndef PACKAGES_XPETRA_SUP_BLOCKEDMAP_XPETRA_BLOCKEDMAP_DECL_HPP_
48 #define PACKAGES_XPETRA_SUP_BLOCKEDMAP_XPETRA_BLOCKEDMAP_DECL_HPP_
57 template <
class LocalOrdinal,
59 class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
68 #undef XPETRA_BLOCKEDMAP_SHORT
97 BlockedMap(
const RCP<const Map>& fullmap,
const std::vector<RCP<const Map>>& maps,
bool bThyraMode =
false);
100 BlockedMap(
const std::vector<RCP<const Map>>& maps,
const std::vector<RCP<const Map>>& thyramaps);
146 const Teuchos::ArrayView<int>& ,
147 const Teuchos::ArrayView<LocalOrdinal>& )
const;
151 const Teuchos::ArrayView<int>& )
const;
188 virtual Teuchos::RCP<const Teuchos::Comm<int>>
getComm()
const;
229 virtual RCP<const Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node>>
245 virtual RCP<const Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node>>
257 const RCP<const Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node>>
258 getMap(
size_t i,
bool bThyraMode =
false)
const;
261 const RCP<Xpetra::Import<LocalOrdinal, GlobalOrdinal, Node>>
265 const RCP<const Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node>>
271 #ifdef HAVE_XPETRA_TPETRA
277 #else // HAVE_XPETRA_TPETRA
279 #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."
281 #endif // #else !HAVE_XPETRA_TPETRA
292 virtual void describe(Teuchos::FancyOStream& out,
const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default)
const;
315 static Teuchos::RCP<const Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node>>
331 #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.