<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Dr. Adams, thank you for your reply.</p>
<p>I have solved the problem with suggestions of Dr.Zhang, who
answered right after you.<br>
</p>
<br>
<div class="moz-cite-prefix">On 11-10-2017 20:18, Mark Adams wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CADOhEh7WRkx=s=DzWPSA-U8vSXdxFEgp3XXy-Pw4tyr+AP0yhw@mail.gmail.com">
<div dir="ltr">Try running with -ts_view and -options_left and
send all of the output.</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Oct 11, 2017 at 1:12 PM, Ali
Berk Kahraman <span dir="ltr"><<a
href="mailto:aliberkkahraman@yahoo.com" target="_blank"
moz-do-not-send="true">aliberkkahraman@yahoo.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hello All,<br>
<br>
<br>
I am trying to use timesteppers, however I have a problem.
Whenever I want to set a dt for the timstepping integration,
I cannot succeed. Neither the function TSSetTimeStep nor the
command line option seems to work. Using either of them(but
not at the same time) and setting it to 1, when I call
TSGetTimeStep to learn the value of dt, it gives me the
answer 0.002871. Perhaps this is the default value, however
I cannot work with this, since the equation I have is slowly
evolving.<br>
<br>
<br>
Any ideas what might be causing this?<br>
<br>
<br>
The part of the code I use,<br>
<br>
<br>
PetscReal time=0, timestep=1;<br>
int maxsteps=30;<br>
float maxtime=300;<br>
<br>
<br>
TS ts;<br>
ierr= TSCreate(PETSC_COMM_WORLD,&ts)<wbr>;<br>
CHKERRQ(ierr);<br>
ierr= TSSetProblemType(ts,TS_LINEAR)<wbr>;<br>
CHKERRQ(ierr);<br>
ierr= TSSetSolution(ts, dummyvec);<br>
CHKERRQ(ierr);<br>
ierr= TSSetType(ts,TSRK);<br>
CHKERRQ(ierr);<br>
ierr= TSSetTime(ts,time);<br>
CHKERRQ(ierr);<br>
ierr= TSSetTimeStep(ts,timestep);<br>
CHKERRQ(ierr);<br>
ierr=TSSetExactFinalTime(ts,TS<wbr>_EXACTFINALTIME_STEPOVER);<br>
CHKERRQ(ierr);<br>
TSSetMaxSteps(ts,maxsteps);<br>
TSSetMaxTime(ts,maxtime);<br>
<br>
ierr=TSSetFromOptions(ts);CHKE<wbr>RRQ(ierr);<br>
TSSetRHSFunction(ts,residual,<br>
FormRHSFunction,&mycontext);<br>
ierr= TSSolve(ts,uJi);<br>
CHKERRQ(ierr);<br>
TSView(ts,PETSC_VIEWER_STDOUT_<wbr>SELF);<br>
<br>
TSConvergedReason reason;<br>
ierr=TSGetConvergedReason(ts,&<wbr>reason);CHKERRQ(ierr);<br>
printf("Why Converged: %d\n",reason);<br>
PetscReal usedtimestep;<br>
TSGetTimeStep(ts,&usedtimestep<wbr>);<br>
printf("Used timestep: %f\n",usedtimestep);<br>
<br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>