Chenchen,

2016-05-27 15:27 GMT-04:00 Chenchen Liu <[email protected]>:
> However, I do not quite understand the so-called sequential Vector. For the
> system_rhs Vector I want, as long as I assemble it with "if
> (cell->subdomain_id() == this_mpi_process)", and use "cell->get_dof_indices
> (local_dof_indices)" to put the component into the corresponding global
> position, I will have as many Vectors as the number of processors I use, and
> each of them only stores the local components without assembly.
>
> I have tried the following two ways to define the vector, and neither of
> them gave me what I want.
> (i)  PETScWrappers::MPI::Vector  system_rhs;
> (ii)  Vector<double>  system_rhs;
>
> Is sequential Vector different from the above two? And how should I define
> it correctly? Thank you very much!
Let's call your distributed vector, which is a
PETScWrappers::MPI::Vector, system_rhs_distributed. What you need to
do to convert the distributed vector to a non distributed vector is:
Vector<double> system_rhs(system_rhs_distributed);

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

Reply via email to