[petsc-users] Spatial distribution of the residual after an implicit TS timestep

Mani Chandra mc0710 at gmail.com
Tue Mar 18 19:45:58 CDT 2014


Hi,

Is there anyway I can get the residual at the beginning of the time step? I
tried TSSetPreStage and TSSetPreStep but they didn't work. Setting
TSSetPreStage would crash the program even if there is nothing in the
routine that I set and TSSetPreStep would give me the residual at the end
of the previous time step. I want to take a look at the residual at the
beginning of the new time step before the nonlinear solver starts.

Thanks,
Mani


On Sat, Mar 15, 2014 at 9:03 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
>   Yes but it is slightly complicated. You need to configure PETSc with
> —with-afterimage   and run the program with -draw_save   then it will save
> each image.
>
>   It will open an X window to display each image. You can run with
> -x_virtual to skip the opening of X windows but then you need Xvfb to be
> installed
>
>    Barry
>
>
> On Mar 15, 2014, at 6:29 PM, Mani Chandra <mc0710 at gmail.com> wrote:
>
> > -snes_montior_residual is really cool. Anyway I could get it to spit out
> png images instead of on screen visualization?
> >
> >
> > On Sat, Mar 15, 2014 at 6:24 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> >
> >
> >    You can write a custom monitor and set it with TSMonitorSet()
> >
> >     This routine would call TSGetSNES() then SNESGetSolution() then call
> SNESComputeFunction() then call VecView() on the result.
> >
> >     But note that just because the residual is big somewhere doesn’t
> mean the error need be.
> >
> >     You could also run with -snes_monitor_residual to see how the
> residual is being reduced inside the nonlinear solve (that is, what parts
> of the residual are most stubborn).
> >
> >
> >     Barry
> >
> >
> > On Mar 15, 2014, at 5:47 PM, Mani Chandra <mc0710 at gmail.com> wrote:
> >
> > > Hi,
> > >
> > > Is there anyway I can VecView the residual after TS has completed an
> implicit time step? I'd like to see where in my domain most of the errors
> are coming from. I looked at TSMonitor but that doesn't seem to give me
> access to the residual at the end of the current time step.
> > >
> > > Thanks,
> > > Mani
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140318/10fdf5aa/attachment.html>


More information about the petsc-users mailing list