[petsc-users] ARKIMEX produces incorrect values

Ed Bueler elbueler at alaska.edu
Sun Aug 30 17:57:47 CDT 2020


Darn, sorry.

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?

Ed

On Sun, Aug 30, 2020 at 2:44 PM Ed Bueler <elbueler at alaska.edu> wrote:

> Dear PETSc --
>
> I tried twice to make this an issue at the gitlab.com host site, but both
> times got "something went wrong (500)".  So this is a bug report by
> old-fashioned means.
>
> I created a TS example,
> https://github.com/bueler/p4pdes-next/blob/master/c/fix-arkimex/ex54.c at
> my github, also attached.  It solves a 2D linear ODE
> ```
>    x' + y' = 6 y
>         y' = x
> ```
> 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.
>
> 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:
> $ ./ex54
> error norm at tf = 1.000000 from 33 steps:  |u-u_exact| =  9.29170e-02
> $ ./ex54 -snes_fd
> error norm at tf = 1.000000 from 33 steps:  |u-u_exact| =  9.29170e-02
> $ ./ex54 -ts_rtol 1.0e-14 -ts_atol 1.0e-14 -ts_bdf_order 6
> error norm at tf = 1.000000 from 388 steps:  |u-u_exact| =  4.23624e-11
> $ ./ex54 -ts_type beuler
> error norm at tf = 1.000000 from 100 steps:  |u-u_exact| =  6.71676e-01
> $ ./ex54 -ts_type cn
> error norm at tf = 1.000000 from 100 steps:  |u-u_exact| =  2.22839e-03
> $ ./ex54 -ts_type rosw
> error norm at tf = 1.000000 from 21 steps:  |u-u_exact| =  5.64012e-03
>
> But it produces wrong values with ARKIMEX:
> $ ./ex54 -ts_type arkimex
> error norm at tf = 1.000000 from 16 steps:  |u-u_exact| =  1.93229e+01
>
> Neither tightening tolerance nor changing type (`-ts_arkimex_type`) helps
> ARKIMEX.
>
> Thanks!
>
> Ed
>
> 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.
>
>
> --
> Ed Bueler
> Dept of Mathematics and Statistics
> University of Alaska Fairbanks
> Fairbanks, AK 99775-6660
> 306C Chapman
>


-- 
Ed Bueler
Dept of Mathematics and Statistics
University of Alaska Fairbanks
Fairbanks, AK 99775-6660
306C Chapman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200830/bca125fa/attachment.html>


More information about the petsc-users mailing list