On Wed, Mar 11, 2020 at 7:26 PM Adolfo Rodriguez <[email protected]> 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/>