<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 15, 2013 at 4:36 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>Christophe Ortiz <<a href="mailto:christophe.ortiz@ciemat.es" target="_blank">christophe.ortiz@ciemat.es</a>> writes:<br>


> Before I go on implementing all the coupling between all the dof, I am<br>
> doing some tests with the system described above and I see some strange<br>
> behavior...<br>
> To do some tests, as initial conditions I set two gaussian distributions<br>
> for u and v. When the peak value of the gaussians is in the order of unity,<br>
> no problem, ARKIMEX as well as ROSW work fine. However, when I use peak<br>
> values in the order of 1e15-1e20 (which is of interest for me), then<br>
> troubles arise. I see it takes much more time to do one timestep for<br>
> ARKIMEX. This, even when I switch off the coupling and there is only<br>
> diffusion. It takes too long.<br>
>  I tried KSPCG and KSPGMRES and PCNONE/PCILU.<br>
><br>
> - is it due to some problem with ARKIMEX and large values ?<br>
<br>
</div>Error control should be the same.  Run with -ts_adapt_monitor and send<br>
output if you don't understand it.<br>
<div><br>
> - How do you use ts_adapt_basic_clip in the run command to decrease the<br>
> fastest increase of timestep ? I would like to set 1.5 for the fastest<br>
> increase instead of 10, which is the default. I tried but PETSc complains<br>
> saying:<br>
><br>
> [0]PETSC ERROR: Argument out of range!<br>
> [0]PETSC ERROR: Must give exactly two values to -ts_adapt_basic_clip!<br>
<br>
</div>-ts_adapt_basic_clip 0.1,1.5<br>
<br>
The first number is the fastest decrease that will be allowed.<br></blockquote><div><br></div><div>Great, it works now.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div><br>
> - ARKIMEX seems to work better if I decrease the number of nodes, ie if I<br>
> increase the dx.<br>
<br>
</div>Then you'll be swamped with spatial error.<br>
<div><br>
> - I found out with ts_view that the ARKIMEX type is always ARKIMEX3, even<br>
> when I use<br>
><br>
>    ierr = TSARKIMEXSetType(ts,TSARKIMEX1BEE);<br>
<br>
</div>Maybe you call this before the type has been set, e.g., before<br>
TSSetFromOptions().  Use -ts_arkimex_type 1bee.<br></blockquote><div><br></div><div>Yes ! Actually, that was the problem ! Now I set ARKIMEX1BEE after TSSetFromOptions() and it is much faster ! ARKIMEXA2 seems even faster.</div>

<div>Thanks Jed !</div><div><br></div><div>Now I see that the convergence speed of ARKIMEX depends on where I put TSSetFromOptions().</div><div><br></div><div>If I do:</div><div>TSCreate();</div><div>TSSetFromOptions();</div>
<div>TSSetProblemType();</div><div>TSSetType();</div><div>TSARKIMEXSetType();</div><div><br></div><div>then ARKIMEXA2 is very fast.</div><div><br></div><div>Instead, if I put TSSetFromOptions() somewhere else:</div><div><div>
TSCreate();</div><div><br></div><div>TSSetProblemType();<br></div><div>TSSetType();</div><div><div><b>TSSetFromOptions();</b></div></div><div>TSARKIMEXSetType();<br></div></div><div><br></div><div>ARKIMEXA2 slows down significantly. I guess that TSSetFromOptions overrides something...Any idea ?</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><br>
> - With TSROSW, much better. Any idea why ?<br>
<br>
</div>Default TSROSW method (ra34pw2) has a good error estimate.  It's<br>
probably faster because it only does linear solves.  If your problem is<br>
linear (or weakly nonlinear), TSROSW is usually better than ARKIMEX, at<br>
least unless you tell the SNES to compute the Jacobian only once.<br></blockquote><div><br></div><div>Good to know.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div><br>
> - Do you recommend a particular KSP/PC for this type of problem ?<br>
<br>
</div>Use a direct solver until you understand what is happening in the outer<br>
levels.  Then use multigrid because it is the right way to solve the problem.<br></blockquote><div><br></div><div>Christophe </div></div><br></div></div>