<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi,<br>
    <br>
    It seems that when I want to modify the time step before the call of
    TSSetInitialTimeStep, I run into an error. I compare a value read
    from an input file to a hard coded value and the code systematically
    use the value from the file. Any idea why?<br>
    <br>
    in order, I call<br>
    ierr =
PetscOptionsGetReal(PETSC_NULL,"-ts_dt",&user.dt,PETSC_NULL);CHKERRQ(ierr);<br>
    then define <br>
    user.dt = something smaller than what is put in the file<br>
    then print<br>
    user.dt (which returns the modified value)<br>
    then call<br>
    ierr = TSSetInitialTimeStep(ts,user.ti,user.dt);CHKERRQ(ierr);<br>
    <br>
    but the value read by PetscOptionsGetReal is used by
    TSSetInitialTimeStep<br>
    <br>
    Thanks for your help,<br>
    <br>
    --Jeremy<br>
    <br>
    On 04/18/2011 03:19 PM, Jed Brown wrote:
    <blockquote
      cite="mid:BANLkTin66EGbfaeLpN-c2AWGF87fgiBcyA@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">On Mon, Apr 18, 2011 at 21:17, Jeremy
        Riousset <span dir="ltr"><<a moz-do-not-send="true"
            href="mailto:riousset@gatech.edu">riousset@gatech.edu</a>></span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          I was thinking to call it in the Monitor function.</blockquote>
      </div>
      <div><br>
      </div>
      You can also do that, but then the output of other monitors is
      dependent on whether it comes before or after your "monitor"
      changes the step size. Using TSSetPostStep is better in that
      regard because it is consistent.<br>
      <div><br>
      </div>
    </blockquote>
  </body>
</html>