Xpetra: add getLocalGraph() method to CrsGraph
Created by: lucbv
@trilinos/xpetra
Expectations
The Xpetra::CrsGraph should expose an interface to getLocalGraph()
when Tpetra
is the underlying algebra package, this will avoid awkward transformation of Kokkos:View
into Teaches::ArrayRCP
when trying to set all local graph values at once.
Current Behavior
Currently getLocalGraph()
is not implemented so the only way to set all the values in a Xpetra::CrstGraph
is to use insertLocalIndices()
multiple times, using a Teaches::ArrayView
to store the indices which is awkward for on device kernels that attempt to fill the local CrsGraph
...
Motivation and Context
This prevents good refactor of code in MueLu
when the graph structure is computed at once using direct access to pointers stored by the graph.
Definition of Done
The interface to getLocalGraph()
is exposed to users.
Possible Solution
Creating a new stub in Xpetra_CrsGraph.hpp
guarded by HAVE_XPETRA_KOKKOS_REFACTOR
and HAVE_XPETRA_TPETRA
.