On Thursday, April 19, 2018 at 5:56:54 AM UTC-4, Maxi Miller wrote:
>
> Assumed I call that on a LinearAlgebraTrilinos::MPI::Vector, I get the 
> error message 
> The violated condition was: 
>     local_index >= 0
> Additional information: 
>     You tried to access element 0 of a distributed vector, but this 
> element is not stored on the current processor. Note: There are 120 
> elements stored on the current processor from within the range 150 through 
> 269 but Trilinos vectors need not store contiguous ranges on each 
> processor, and not every element in this range may in fact be stored 
> locally.
> when running on multiple cores. How could I access the whole vector 
> without running into ghost elements?
>
You can use 
http://dealii.org/developer/doxygen/deal.II/classTrilinosWrappers_1_1MPI_1_1Vector.html#a315e9e01462309adce85314a4208c0ff
 
to get the IndexSet of the locally owned elements. Then, you can either use 
http://dealii.org/developer/doxygen/deal.II/classIndexSet.html#a0db80ed325ca916e10ff7f62ec71e4f5
 
to get the indices or directly loop over the indices of the 
locally_owned_elements IndexSet with for (auto index : 
locally_owned_elements)

Best,

Bruno

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to