[petsc-users] error destroying solver context

Matthew Knepley knepley at gmail.com
Wed Mar 11 20:07:00 CDT 2020


On Wed, Mar 11, 2020 at 7:26 PM Adolfo Rodriguez <adantra at gmail.com> wrote:

> I have a situation with a c++ code where I get an error when destroying
> the solver context after destroying the matrix. I have the following lines
> at the end of my function
>
> KSPDestroy(&ksp);
> MatDestroy(&A);
> PetscObjectDestroy((PetscObject*)&x);
> PetscObjectDestroy((PetscObject*)&b);
>
> It is a very simple program, very similar to the /ksp/ksp/ex1.c example.
>
> I can destroy the solver context (ksp) or the matrix (A) but not both.
> Does anybody have a clue?
>

Please send the whole program.

  Thanks,

     Matt


> Adolfo
>
>
>


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

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200311/f3e84659/attachment.html>


More information about the petsc-users mailing list