[petsc-dev] Error checking on input only vectors
Barry Smith
bsmith at mcs.anl.gov
Tue Jul 16 08:44:56 CDT 2013
As an extra error checking on user code we could save the Vec state of read only input Vecs and check it on exit of the routine to insure the user has not changed the Vec. This could be done in PCApply_Shell(), functions provided to SNES and TS etc.
Barry
On Jul 16, 2013, at 8:08 AM, Rémi Lacroix <remi.lacroix at inria.fr> wrote:
> Hello,
>
> I'm currently developing a preconditioner using PETSc. I have a small question about the PCApply function.
>
> Is it safe to destroy the content of the input vector x while applying the preconditioner or should I make a copy of it and work on that?
>
> Best regards,
>
> --
> Rémi Lacroix
> Équipe ALPINES
> Inria Paris-Rocquencourt / Laboratoire Jacques Louis Lions, UPMC
>
More information about the petsc-dev
mailing list