Replace Kokkos::StaticCrsGraph by a local implementation
Replacing Kokkos::StaticCrsGraph class by an appropriate
builtin one should be considered.
Actually the design of this class is quite crappy and does not help to protect data.
- It is not easy to build a
Kokkos::StaticCrsGraph<const index_type,...>since building tools and mirroring require this template parameter to be mutable (even for mirroring). Thus- up to now,
CRSMatrixinternal structures could be modified (which was not intended); - this is changed in 6b19154e (but relies on a dirty trick which could be furthermore invalidated by future changes in
Kokkos).
- up to now,
- The interface itself is not very clean and does not fit nicely to
pugsnomenclature - The build methods:
Kokkos::create_staticcrsgraphrequire the use ofstd::vectorwhich is also quite questionable. - Also, providing a better interface could simplify coupling with external linear algebra libraries (such as PETSc).
- Finally, not relying on
Kokkos::StaticCrsGraphwould reduce the direct dependency onKokkos
The class is used mainly into two places
-
CRSMatrix(in a direct way), and -
ConnectivityMatrix(which is embedded intoItemToItemMatrix, which provide a better interface)
Edited by Stéphane Del Pino