46#ifndef MUELU_LOCALLWGRAPH_KOKKOS_DECL_HPP
47#define MUELU_LOCALLWGRAPH_KOKKOS_DECL_HPP
51#include <Kokkos_StaticCrsGraph.hpp>
52#include <KokkosCompat_ClassicNodeAPI_Wrapper.hpp>
54#include <Xpetra_ConfigDefs.hpp>
55#include <Xpetra_Map.hpp>
71 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
75 template<
class LocalOrdinal,
class GlobalOrdinal,
class DeviceType>
82 using device_type = Kokkos::Device<execution_space, memory_space>;
83 using range_type = Kokkos::RangePolicy<local_ordinal_type, execution_space>;
84 using node_type = Kokkos::Compat::KokkosDeviceWrapperNode<DeviceType>;
91 using row_type = Kokkos::View<const LocalOrdinal*, memory_space>;
92 using map_type = Xpetra::Map<LocalOrdinal, GlobalOrdinal, node_type>;
97#undef MUELU_LOCALLWGRAPH_KOKKOS_SHORT
109 const RCP<const map_type>& domainMap);
129 KOKKOS_INLINE_FUNCTION
typename local_graph_type::row_map_type
getRowPtrs()
const {
134 KOKKOS_INLINE_FUNCTION
typename local_graph_type::entries_type
getEntries()
const {
142 KOKKOS_INLINE_FUNCTION
144 auto rowView =
graph_.rowConst(i);
184#define MUELU_LOCALLWGRAPH_KOKKOS_SHORT
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultGlobalOrdinal GlobalOrdinal
LO minLocalIndex_
Local index boundaries (cached from domain map)
typename DeviceType::memory_space memory_space
KOKKOS_INLINE_FUNCTION size_type getLocalMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on this node.
KOKKOS_INLINE_FUNCTION void SetBoundaryNodeMap(const boundary_nodes_type bndry)
Set boolean array indicating which rows correspond to Dirichlet boundaries.
Kokkos::Device< execution_space, memory_space > device_type
size_type maxNumRowEntries_
boundary_nodes_type dirichletBoundaries_
Boolean array marking Dirichlet rows.
KOKKOS_INLINE_FUNCTION bool isLocalNeighborVertex(LO i) const
Return true if vertex with local id 'v' is on current process.
Kokkos::RangePolicy< local_ordinal_type, execution_space > range_type
Xpetra::Map< LocalOrdinal, GlobalOrdinal, node_type > map_type
KOKKOS_INLINE_FUNCTION local_graph_type::row_map_type getRowPtrs() const
Return the row pointers of the local graph.
const local_graph_type graph_
Underlying graph (with label)
Kokkos::StaticCrsGraph< LocalOrdinal, Kokkos::LayoutLeft, device_type, void, size_t > local_graph_type
~LocalLWGraph_kokkos()=default
LocalLWGraph_kokkos(const local_graph_type &graph, const RCP< const map_type > &domainMap)
LocalLWGraph constructor.
KOKKOS_INLINE_FUNCTION Kokkos::GraphRowViewConst< local_graph_type > getNeighborVertices(LO i) const
Return the list of vertices adjacent to the vertex 'v'.
KOKKOS_INLINE_FUNCTION size_type GetNodeNumEdges() const
Return number of graph edges.
KOKKOS_INLINE_FUNCTION local_graph_type::entries_type getEntries() const
Return the list entries in the local graph.
GlobalOrdinal global_ordinal_type
LocalOrdinal local_ordinal_type
typename DeviceType::execution_space execution_space
KOKKOS_INLINE_FUNCTION size_type GetNodeNumVertices() const
Return number of graph vertices.
Kokkos::View< const bool *, memory_space > boundary_nodes_type
KOKKOS_INLINE_FUNCTION const boundary_nodes_type GetBoundaryNodeMap() const
Returns map with global ids of boundary nodes.
const local_graph_type & getGraph() const
Kokkos::Compat::KokkosDeviceWrapperNode< DeviceType > node_type
Kokkos::View< const LocalOrdinal *, memory_space > row_type
Lightweight MueLu representation of a compressed row storage graph.
Namespace for MueLu classes and methods.