<div dir="ltr">Darn, sorry.<div><br></div><div>I realize the ARKIMEX page does say "Methods with an explicit stage can only be used with ODE in which the stiff part G(t,X,Xdot) has the form Xdot + Ghat(t,X)." So my example does not do that. Is there a way for ARKIMEX to detect that dG/d(Xdot) = I?<div><br></div><div>Ed</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Aug 30, 2020 at 2:44 PM Ed Bueler <<a href="mailto:elbueler@alaska.edu">elbueler@alaska.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Dear PETSc --</div><div><br></div><div>I tried twice to make this an issue at the <a href="http://gitlab.com" target="_blank">gitlab.com</a> host site, but both times got "something went wrong (500)". So this is a bug report by old-fashioned means.</div><div><br></div>I created a TS example, <a href="https://github.com/bueler/p4pdes-next/blob/master/c/fix-arkimex/ex54.c" target="_blank">https://github.com/bueler/p4pdes-next/blob/master/c/fix-arkimex/ex54.c</a> at my github, also attached. It solves a 2D linear ODE<br>```<br> x' + y' = 6 y<br> y' = x<br>```<br>Pretty basic; the known exact solution is just exponentials. The code writes it as F(t,u,u')=G(t,u) and supplies all the pieces, namely IFunction,IJacobian,RHSFunction,RHSJacobian. Note both F and G must be seen by TS to get the correct solution. In summary, a boring (and valgrind-clean ;-)) example.<div><br>For current master branch it runs fine for the fully-implicit methods (e.g. BDF, CN, ROSW) which can use the IFunction F, including with finite-differenced Jacobians. With BDF2, BDF2+-snes_fd, BDF6+tight tol., CN, BEULER, ROSW:<br>$ ./ex54<br>error norm at tf = 1.000000 from 33 steps: |u-u_exact| = 9.29170e-02<br>$ ./ex54 -snes_fd<br>error norm at tf = 1.000000 from 33 steps: |u-u_exact| = 9.29170e-02<br>$ ./ex54 -ts_rtol 1.0e-14 -ts_atol 1.0e-14 -ts_bdf_order 6<br>error norm at tf = 1.000000 from 388 steps: |u-u_exact| = 4.23624e-11<br>$ ./ex54 -ts_type beuler<br>error norm at tf = 1.000000 from 100 steps: |u-u_exact| = 6.71676e-01<br>$ ./ex54 -ts_type cn<br>error norm at tf = 1.000000 from 100 steps: |u-u_exact| = 2.22839e-03<br>$ ./ex54 -ts_type rosw<br>error norm at tf = 1.000000 from 21 steps: |u-u_exact| = 5.64012e-03<br><br>But it produces wrong values with ARKIMEX:<br>$ ./ex54 -ts_type arkimex<br>error norm at tf = 1.000000 from 16 steps: |u-u_exact| = 1.93229e+01<br><div><br>Neither tightening tolerance nor changing type (`-ts_arkimex_type`) helps ARKIMEX.<br><br>Thanks!</div><div><br>Ed</div><div><br></div><div>PS My book is at a late proofs stage, and out of my hands. It should appear SIAM Press in a couple of months. In all the examples in my book, only my diffusion-reaction system example using F(t,u,u') = G(t,u) is broken. Thus the motivation for a trivial ODE example as above.</div><div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Ed Bueler<br>Dept of Mathematics and Statistics<br>University of Alaska Fairbanks<br>Fairbanks, AK 99775-6660<br>306C Chapman<br></div></div></div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Ed Bueler<br>Dept of Mathematics and Statistics<br>University of Alaska Fairbanks<br>Fairbanks, AK 99775-6660<br>306C Chapman<br></div></div></div></div></div></div></div>