Marek, 

> InitialValuePhase<dim> ()solution_phase_n
>
> solution_phase_n.reinit (locally_owned_dofs_phase,
>                      locally_relevant_dofs_phase,
>                      MPI_COMM_WORLD);
>
> TrilinosWrappers::Vector<double> vec_old_solution (dof_handler_phase.n_dofs 
> ());
>
> VectorTools::interpolate (dof_handler_phase, InitialValuePhase<dim> (),
>                     vec_old_solution );
>
> solution_phase_n =vec_old_solution;
>
>
> First of all, it looks a bit strange that you initialize a 
TrilinosWrappers::Vector just passing the size. This way you create a 
vector that stores all entries on all processes. Is this intended. If you 
only wanted to have a distributed vector, you should use

TrilinosWrappers::MPI::Vector<double> vec_old_solution 
(locally_owned_dofs_phase, MPI_COMM_WORLD);

or (accordingly)

PETScWrappers::MPI::Vector<double> vec_old_solution 
(locally_owned_dofs_phase, MPI_COMM_WORLD);

instead.

Is there any particular reason that you were using TrilinosWrappers::Vector 
instead of TrilinosWrappers::MPI::Vector? In the recent release the fomer 
class is deprecated and will be removed for the next release.

Does this already solve your problem? If not could you provide us with a 
minimal example that shows the problem? 
In general, what you are doing looks correct:
VectorTools::interpolate can only write to a distributed vector and for 
updating the ghosted vector you are simply assigning it.

Best,
Daniel

>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to