Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manufactured solution for Svärd-Kalisch equations with variable bathymetry #84

Merged
merged 14 commits into from
Feb 2, 2024

Conversation

JoshuaLampert
Copy link
Owner

@JoshuaLampert JoshuaLampert commented Feb 1, 2024

I finally found a working version for a manufactured solution for the Svärd-Kalisch equations with a variable bathymetry, see also #65.

Convergence test:

p = 2:
julia> convergence_test("examples/svaerd_kalisch_1d/svaerd_kalisch_1d_manufactured.jl", 3, N = 32, accuracy_order = 2, tspan = (0.0, 0.01))
[...]
####################################################################################################
l2
η                        v                        D                        
N    error     EOC       N    error     EOC       N    error     EOC       
32   5.00e-03  -         32   2.40e-04  -         32   0.00e+00  -         
64   1.26e-03  1.99      64   5.90e-05  2.02      64   0.00e+00  NaN       
128  3.15e-04  2.00      128  1.47e-05  2.01      128  0.00e+00  NaN       

mean      2.00      mean      2.02      mean      NaN       
----------------------------------------------------------------------------------------------------
linf
η                        v                        D                        
N    error     EOC       N    error     EOC       N    error     EOC       
32   9.48e-03  -         32   4.11e-04  -         32   0.00e+00  -         
64   2.35e-03  2.01      64   1.02e-04  2.00      64   0.00e+00  NaN       
128  5.89e-04  2.00      128  2.56e-05  2.00      128  0.00e+00  NaN       

mean      2.00      mean      2.00      mean      NaN       
----------------------------------------------------------------------------------------------------
p = 4:
julia> convergence_test("examples/svaerd_kalisch_1d/svaerd_kalisch_1d_manufactured.jl", 3, N = 32, accuracy_order = 4, tspan = (0.0, 0.01))
[...]
####################################################################################################
l2
η                        v                        D                        
N    error     EOC       N    error     EOC       N    error     EOC       
32   1.50e-04  -         32   3.55e-06  -         32   0.00e+00  -         
64   9.54e-06  3.98      64   2.24e-07  3.98      64   0.00e+00  NaN       
128  5.99e-07  3.99      128  1.41e-08  3.99      128  0.00e+00  NaN       

mean      3.99      mean      3.99      mean      NaN       
----------------------------------------------------------------------------------------------------
linf
η                        v                        D                        
N    error     EOC       N    error     EOC       N    error     EOC       
32   2.64e-04  -         32   7.32e-06  -         32   0.00e+00  -         
64   1.69e-05  3.97      64   4.73e-07  3.95      64   0.00e+00  NaN       
128  1.06e-06  3.99      128  2.96e-08  4.00      128  0.00e+00  NaN       

mean      3.98      mean      3.97      mean      NaN       
----------------------------------------------------------------------------------------------------
p = 6:
julia> convergence_test("examples/svaerd_kalisch_1d/svaerd_kalisch_1d_manufactured.jl", 3, N = 32, accuracy_order = 6, tspan = (0.0, 0.01))
[...]
####################################################################################################
l2
η                        v                        D                        
N    error     EOC       N    error     EOC       N    error     EOC       
32   6.37e-06  -         32   2.18e-07  -         32   0.00e+00  -         
64   1.03e-07  5.95      64   3.54e-09  5.95      64   0.00e+00  NaN       
128  1.97e-09  5.71      128  5.58e-11  5.99      128  0.00e+00  NaN       

mean      5.83      mean      5.97      mean      NaN       
----------------------------------------------------------------------------------------------------
linf
η                        v                        D                        
N    error     EOC       N    error     EOC       N    error     EOC       
32   1.09e-05  -         32   3.78e-07  -         32   0.00e+00  -         
64   1.80e-07  5.92      64   6.10e-09  5.95      64   0.00e+00  NaN       
128  7.40e-09  4.61      128  9.65e-11  5.98      128  0.00e+00  NaN       

mean      5.26      mean      5.97      mean      NaN       
----------------------------------------------------------------------------------------------------

@JoshuaLampert
Copy link
Owner Author

This is breaking because I change the behavior of initial_condition_manufactured and source_terms_manufactured for the Svärd-Kalisch equations, but I think having a breaking change isn't too much of a trouble at this stage. We could also keep the old manufactured solution (for a constant bathymetry) and introduce a new for the variable bathymetry, but I don't think this is so useful.

@JoshuaLampert JoshuaLampert changed the title Manufactured svaerd kalisch variable Manufactured solition for Svärd-Kalisch equations with variable bathymetry Feb 1, 2024
@JoshuaLampert JoshuaLampert changed the title Manufactured solition for Svärd-Kalisch equations with variable bathymetry Manufactured solution for Svärd-Kalisch equations with variable bathymetry Feb 1, 2024
Copy link
Collaborator

@ranocha ranocha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! This looks good to me - nice work 👍

src/equations/svaerd_kalisch_1d.jl Outdated Show resolved Hide resolved
@ranocha
Copy link
Collaborator

ranocha commented Feb 1, 2024

CI failed in the last run. Do you have an idea why - do we need to increase the test tolerances?

@JoshuaLampert
Copy link
Owner Author

CI failed in the last run. Do you have an idea why - do we need to increase the test tolerances?

Yes, the tolerances need to be increased. I just did that in 9c94fa3. Let's hope CI passes now.

ranocha
ranocha previously approved these changes Feb 1, 2024
Copy link
Collaborator

@ranocha ranocha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@JoshuaLampert
Copy link
Owner Author

I put the tolerance at the wrong place - stupid me. 🙄

Copy link

codecov bot commented Feb 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6fb0978) 96.07% compared to head (529413a) 96.12%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #84      +/-   ##
==========================================
+ Coverage   96.07%   96.12%   +0.05%     
==========================================
  Files          17       17              
  Lines        1095     1110      +15     
==========================================
+ Hits         1052     1067      +15     
  Misses         43       43              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JoshuaLampert
Copy link
Owner Author

To avoid massive clutter of the terminal, I increased the interval of the AnalysisCallback for those elixirs with a very strict time step restriction.

@JoshuaLampert JoshuaLampert requested a review from ranocha February 1, 2024 14:32
@JoshuaLampert JoshuaLampert enabled auto-merge (squash) February 1, 2024 14:32
@JoshuaLampert JoshuaLampert merged commit ccb42cb into main Feb 2, 2024
14 checks passed
@JoshuaLampert JoshuaLampert deleted the manufactured-Svaerd-Kalisch-variable branch February 2, 2024 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants