Wouldn't it be easier to just create a copy of the vector by

ghosted_vector.reinit(locally_owned_set, locally_relevant_set, comm);
ghosted_vector = solution;
ghosted_vector.update_ghost_values();
not in my case, because i have  a lot of vectors and if I can avoid, i would 
prefer not to create a ghost equivalent for each one of them.
But you are right, if there is only a single solution vector, your approach 
makes more sense and is also consistent with what we normally do
with Trilinos/Petsc, i.e. step-40.
That makes sense, as does your approach with changing the ghost set of the vectors in case you don't want to spent two solution vectors. As long as you don't reuse those vectors in a matrix free loop again you're fine.

Best,
Martin

--
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