[petsc-dev] SNESVISetVariableBounds

Barry Smith bsmith at mcs.anl.gov
Sun May 15 14:36:14 CDT 2016


> On May 14, 2016, at 10:46 PM, Matthew Knepley <knepley at gmail.com> wrote:
> 
> If I call this on a regular SNES, like newtonls, I get a memory leak
> because it defaults to the VI version, but SNESReset() only uses
> the newtonls version. We should decide whether these are members
> of SNES itself or SNESVI.

   Hmm, normally if you set the bounds and then call, for example, SNESSolve_NewtonLS() it generates an error if (snes->xl || snes->xu || snes->ops->computevariablebounds) SETERRQ1(PetscOb

   Anyways, I think having a VecDestroy(&snes->xl); and VecDestroy(&snes->xu); after the snes->ops->reset call will resolve your problem. Do it in maint.

   Barry



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




More information about the petsc-dev mailing list