[petsc-users] error destroying solver context

Adolfo Rodriguez adantra at gmail.com
Wed Mar 11 18:25:09 CDT 2020


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?

Adolfo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200311/7cd1df20/attachment.html>


More information about the petsc-users mailing list