<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Nov 21, 2016 at 12:47 PM, Robert Annewandter <span dir="ltr"><<a href="mailto:robert.annewandter@opengosim.com" target="_blank">robert.annewandter@opengosim.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<font face="Trebuchet MS">Hi,<br>
<br>
Is there a way to access 'step' as used in the output log file :<br>
<br>
Step 35 Time= 1.00000E-03 Dt= 2.73903E-05 [d]
snes_conv_reason: 10,<br>
<br>
from within the subroutines '
TOilImsResidual(snes,xx,r,<wbr>realization,ierr)' and
'TOilImsJacobian(snes,xx,A,B,<wbr>realization,ierr)' in 'toil_ims.f90',
as well as from within
'PMTOilImsCheckUpdatePre(this,<wbr>line_search,X,dX,changed,ierr)<wbr>' in
'pm_toil_ims.f90'?<br></font></div></blockquote><div><br></div><div>I am not sure why we should know about your subroutines. You can get the step inside a TSMonitor() because its an argument. Use</div><div><br></div><div> <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/TS/TSMonitorSet.html">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/TS/TSMonitorSet.html</a></div><div><br></div><div>to add a custom monitor.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF"><font face="Trebuchet MS">
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.</font><font face="Trebuchet MS"><br>
<br>
Thank you for any pointers!<span class="gmail-HOEnZb"><font color="#888888"><br>
<br>
Robert<br>
<br>
<br>
</font></span></font>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>