Add source terms for SGN with BathymetryFlat#180
Add source terms for SGN with BathymetryFlat#180JoshuaLampert merged 25 commits intoNumericalMathematics:mainfrom
Conversation
|
Thanks a lot! Regarding the tests it's fine to use the values you obtain locally after you verified everything works as expected. You can obtain these values from |
|
Since the manufactured solution is (obviously) an analytical solution, could you please provide a convergence test to see if we match the expected order of convergence? You can use |
|
For the formatter you can run: |
For |
I did use (Ctrl-K Ctrl-F) in VSCode now - I think it did the same. https://www.julia-vscode.org/docs/dev/userguide/formatter/ Edit: ok with all those CI fails, maybe I should start doing format(".") afterall :D |
where? The only reference to convergence_test() I found in |
The |
You could use VSCode for that (I would recommend using |
Oh, I didn't mean to include a |
|
Because the tests are failing, was it correct to put in the three components of err = errors(analysis_callback)
err.l2_error[:,end]
3-element Vector{Float64}:
5.034595145055819e-5
9.546213964026592e-7
0.0into |
Yes, looks correct to me. I don't know why tests are failing. Let's check tomorrow :) |
|
Looking at the CI logs, the tests only fail on MacOS with differences of the order of 1e-6, which is a little bit too big to be acceptable in my opinion. This looks to me like the problem is rather ill-posed. Could you please check the condition number of the |
JoshuaLampert
left a comment
There was a problem hiding this comment.
Thanks a lot! I left some comments below. I suggest to add support for source terms with a variable bathymetry in a separate PR.
examples/serre_green_naghdi_1d/serre_green_naghdi_manufactured.jl
Outdated
Show resolved
Hide resolved
examples/serre_green_naghdi_1d/serre_green_naghdi_manufactured.jl
Outdated
Show resolved
Hide resolved
Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com>
Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com>
Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com>
Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com>
yes, this was the idea :) |
I will look into it. |
I did run convergence_test(SGN_MANUF_File, [128, 256, 512, 1024, 2048], tspan=(0.0, 1.0))
####################################################################################################
l2
η v D
N error EOC N error EOC N error EOC
128 3.97e-05 - 128 1.01e-05 - 128 0.00e+00 -
256 5.18e-05 -0.39 256 9.90e-07 3.35 256 0.00e+00 NaN
512 5.61e-05 -0.11 512 1.08e-06 -0.12 512 0.00e+00 NaN
1024 1.28e-04 -1.19 1024 1.08e-06 0.00 1024 0.00e+00 NaN
2048 2.50e-04 -0.96 2048 1.19e-06 -0.15 2048 0.00e+00 NaN
mean -0.66 mean 0.77 mean NaN
----------------------------------------------------------------------------------------------------
linf
η v D
N error EOC N error EOC N error EOC
128 2.01e-04 - 128 1.52e-05 - 128 0.00e+00 -
256 2.41e-04 -0.26 256 3.92e-06 1.95 256 0.00e+00 NaN
512 3.84e-04 -0.68 512 5.91e-06 -0.59 512 0.00e+00 NaN
1024 9.55e-04 -1.31 1024 6.96e-06 -0.24 1024 0.00e+00 NaN
2048 2.12e-03 -1.15 2048 6.43e-06 0.12 2048 0.00e+00 NaN
mean -0.85 mean 0.31 mean NaN
----------------------------------------------------------------------------------------------------
but not sure if this is how it is supposed to be, because nowhere I did but the analytical solution for reference (?). |
Thanks for the convergence test. Yes, I agree, it seems like something is not working yet. We would expect an EOC of approximately 4 for |
|
Not sure why it now also fails for windows and linux, but the bad condition number might be a reason. I will see what I can do to improve that :) |
Thanks, but I think ~863932 seems not too high to have such an impact. Looks like there is something else going on. |
Setting ####################################################################################################
l2
η v D
N error EOC N error EOC N error EOC
128 1.83e-05 - 128 1.00e-05 - 128 0.00e+00 -
256 1.15e-06 4.00 256 6.28e-07 4.00 256 0.00e+00 NaN
512 7.17e-08 4.00 512 3.93e-08 4.00 512 0.00e+00 NaN
1024 4.48e-09 4.00 1024 2.45e-09 4.00 1024 0.00e+00 NaN
2048 2.92e-10 3.94 2048 1.41e-10 4.12 2048 0.00e+00 NaN
mean 3.98 mean 4.03 mean NaN
----------------------------------------------------------------------------------------------------
linf
η v D
N error EOC N error EOC N error EOC
128 4.66e-05 - 128 1.35e-05 - 128 0.00e+00 -
256 2.93e-06 3.99 256 8.33e-07 4.02 256 0.00e+00 NaN
512 1.83e-07 4.00 512 5.21e-08 4.00 512 0.00e+00 NaN
1024 1.21e-08 3.92 1024 3.25e-09 4.00 1024 0.00e+00 NaN
2048 9.50e-10 3.67 2048 2.10e-10 3.95 2048 0.00e+00 NaN
mean 3.90 mean 3.99 mean NaN
----------------------------------------------------------------------------------------------------Should I adjust the l2, linf, change_waterhight, ... values in the testitem to the values corresponding to sol with |
|
Ahh, that makes sense. The time error was dominating. Lowering the time integration tolerances to focus on the spatial error sounds good. I'm wondering, however, whether they need to be that low. Can you maybe try something more like |
Benchmark Results
Benchmark PlotsA plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR. |
for |
Ok, I assume the EOC for smaller N will be closer to ~4 as for N = 2048? If we only see a "clean" EOC of 4 until, say, N = 512 or 1024 that should also be fine. Otherwise, setting the tolerances to |
What I just got was with Ns = [128, 256, 512, 1024, ]. |
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
JoshuaLampert
left a comment
There was a problem hiding this comment.
One final fix for CI until this looks good from my side. Thanks again!
@ranocha, do you also want to take a look?
Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com>
Pull Request Test Coverage Report for Build 14761975630Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Add source terms for SGN with BathymetryFlat. Will do for BathymetryVariable next.
I did local testing in
examples/serre_green_naghdi_1d/serre_green_naghdi_manufactured.jland everything worked fine.I was unsure about
test/test_serre_green_naghdi_1d.jl. Here I only put in a template, but commented it out, because I was unsure which numerical values to put in.Also I am not sure, if any more test are needed, which I missed.