UCL / dxss

DOLFINx slab solver

Home Page:http://github-pages.ucl.ac.uk/dxss/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Regression test for the values of the 1D solution

samcunliffe opened this issue · comments

Expect a damped sine wave. Should do a stupid regression test of these values.

expected

The expected solution ☝️ obtained from the initial commit of Janosch's code. Errors here are:

t = 1, L2-error = 0.07976660467116257
L-infty-L2 error u =  0.09457065797536773
L-infty-L2 error u_t =  0.7751446961112378
L2-L2 error u_t =  0.5385788727685025

And in the current HEAD of main:

The convergence reason code is 3
elapsed time  0.05649995803833008 seconds
t = 1, L2-error = 0.7071067811865475
L-infty-L2 error u =  0.7071067811865475
L-infty-L2 error u_t =  4.442882938158366
L2-L2 error u_t =  3.141592653589793

So a failing test looks "easy". Can just check the error dictionary to make sure they are small. Slow(ish) manual bisection ongoing....

Looks like the bug was introduced during #17. My test passes on the commit before, fails after #17, although #35 is also needed to get the 1d solver to run.

commit 4efff748d542c73674e17375aa7bb50b6a049bac (HEAD)
Author: Sam Cunliffe <samcunliffe@users.noreply.github.com>
Date:   Thu Oct 5 17:15:32 2023 +0100

    Smoke test and fix solve_1d.py (#35)
commit 69b68ed62add8af6ad8f27b92aa1b36ed0843f6a
Author: Sam Cunliffe <samcunliffe@users.noreply.github.com>
Date:   Sun Oct 1 19:35:42 2023 +0100

    Linting part two (#17)

Note that the above commit hashes are different to main because we force-rewrote history in order to solve #34.