[petsc-users] ERROR: Cannot mix add values and insert values!
Matthew Knepley
knepley at gmail.com
Mon Sep 15 09:05:18 CDT 2014
On Mon, Sep 15, 2014 at 9:01 AM, Dominik Szczerba <
szczerba.dominik at gmail.com> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140915/d17896ec/attachment.html>
More information about the petsc-users
mailing list