[petsc-users] Access to 'step' in 'toil_ims.f90' and 'pm_toil_ims.f90'

Matthew Knepley knepley at gmail.com
Mon Nov 21 13:47:54 CST 2016


On Mon, Nov 21, 2016 at 12:47 PM, Robert Annewandter <
robert.annewandter at opengosim.com> wrote:

> Hi,
>
> Is there a way to access 'step' as used in the output log file :
>
>  Step     35 Time=  1.00000E-03 Dt=  2.73903E-05 [d] snes_conv_reason:
> 10,
>
> from within the subroutines ' TOilImsResidual(snes,xx,r,realization,ierr)'
> and 'TOilImsJacobian(snes,xx,A,B,realization,ierr)' in 'toil_ims.f90', as
> well as from within 'PMTOilImsCheckUpdatePre(this,
> line_search,X,dX,changed,ierr)' in 'pm_toil_ims.f90'?
>

I am not sure why we should know about your subroutines. You can get the
step inside a TSMonitor() because its an argument. Use


http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/TS/TSMonitorSet.html

to add a custom monitor.

  Thanks,

     Matt


> I like to make sure that J, b and dx are taken from the same step. I can
> do that if the filenames of the exports reflect step and NR iteration. The
> problem is that, e.g. 'TOilImsResidual()' is called more often than is
> 'TOilImsJacobian()', so using a simple counter which gets increased every
> time when the subroutines are called doesn't help unfortunately.
>
> Thank you for any pointers!
>
> Robert
>
>
>


-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20161121/5ee682d3/attachment.html>


More information about the petsc-users mailing list