On Mon, Sep 15, 2014 at 9:01 AM, Dominik Szczerba <
[email protected]> wrote:
> I am indeed mixing ADD with INSERT. But when linking my code with
> release version of Petsc I do not get this error, only when I link
> with the debug version.
>
Yes, we only guarantee error checking in debug mode.
> I wanted to make sure it is indeed wrong to do so, and if so, why the
> error does not come up also in the release version.
>
Yes, it is wrong. You must call Assemble in between (although calling
it with ASSEMBLY_FLUSH is fine).
Thanks,
Matt
> Many thanks!
>
> [0]PETSC ERROR: Object is in wrong state!
> [0]PETSC ERROR: Cannot mix add values and insert values!
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener