Bruce,

2016-08-24 12:41 GMT-04:00  <bjpalme...@gmail.com>:
> If I try adding ghosts to the delta_rhs vector, I get the error
>
> An error occurred in line <909> of file
> </people/d3g293/software/dealii-8.4.0/source/lac/pe
> tsc_vector_base.cc> in function
>     void dealii::PETScWrappers::VectorBase::sadd(PetscScalar, const
> dealii::PETScWrappers::
> VectorBase&)
> The violated condition was:
>     !has_ghost_elements()
> The name and call sequence of the exception was:
>     ExcGhostsPresent()
> Additional Information:
> You are trying an operation on a vector that is only allowed if the vector
> has no ghost ele
> ments, 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 vec
> tors.
> See the glossary entry on 'Ghosted vectors' for more information.
>
> The code seems to be crashing on the delta_rhs.sadd(-1.0,p_rhs) operation.
Sure, the sadd operation cannot be done on a ghosted vector but your
function should take a ghosted vector. You need to copy delta_rhs to a
ghosted vector and then, send the ghosted vector to your function.

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