[Trilinos-Users] Tpetra vector and multivector coefficient access

Bart Janssens bart at bartjanssens.org
Tue Feb 28 16:59:39 EST 2017


Hi all,

I'm a bit confused about what the best way forward is to access elements of
Tpetra (multi-)vectors. From the Tpetra documentation, it seems getting a
Kokkos view is the recommended method, but I am also using the vectors in
Thyra to pass them to the Belos solver, and Thyra seems to provide its own
View classes (but docs seem to recommend against using them). Finally,
there is also ArrayRCP, which seems to be also not recommended. So I am
leaning towards using the Kokkos views? The goal is to provide a high-level
interface in the Julia wrappers, so users can access local coefficients
using the [] operator. The way I understand it, it's a bad idea to expose
the [] operator directly on a Tpetra or Thyra vector, but it's better to
extract a view and implement the [] operator on that?

To get a more concrete context, see this example:
https://github.com/barche/Trilinos.jl/blob/master/test/thyra.jl

I would like something like
x2[i]
or
v = getLocalView(x2)
v[i]
to access element i of Tpetra vector x2.

Kind regards,

Bart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20170228/a1f9fa57/attachment.html>


More information about the Trilinos-Users mailing list