Hamed,

Have a look at how temporary non-ghosted vectors are used in step-40.
Similar to VectorTools::interpolate
the solution vector in SolverCG::solve must not be ghosted.

Best,
Daniel

Am 07/01/2016 um 01:15 AM schrieb Hamed Babaei:
> Hi Daniel,
>
> I hope you are doing well.
> I got an error in my parallelized code at the run part where I want to
> fill my solution vector with its initial values:
>
>  VectorTools::interpolate (dof_handler,
>                                            InitialValues<dim>(),
>                                            solution);
> The error says: "You are trying an operation on a vector that is only
> allowed if the vector has no ghost elements, but the vector you are
> operating on does have ghost elements. Specifically, vectors with
> ghost elements are read-only and cannot appear in operations that
> write into these vectors."
>
> In fact, the solution vector is a ghosted vector and I red one of your
> suggestions in forum about using temporary non-ghosted vectors but I
> don't know how to do so.
> It would be appreciated if you could give me an example or point me to
> the Dealii documentation where I can find the remedy.
>
> Thank you for your help and kindness.
>
> Best Regards, 

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