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

Second-Order Finite Volume Integral in 1D #2022

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

DanielDoehring
Copy link
Contributor

This picks up the #433 draft by Gregor and updates it to the current structure. Could serve as a starting point to examine the effect of using an O2 FV scheme in the subcell capturing VolumeIntegralShockCapturingHG.

2D/3D will probably follow in some time, but this should also be trivial so if anyone else would like to pick this up, feel free to do so.

Also, this is helpful if one would like to bring a classic second order finite volume solver into Trixi at some point.

Xref: #425

Convergence studies:

Monotonized Central

l2
rho                 rho_v1              rho_e
error     EOC       error     EOC       error     EOC
4.82e-04  -         5.31e-04  -         7.90e-04  -
1.17e-04  2.04      1.28e-04  2.05      1.92e-04  2.04
2.96e-05  1.99      3.31e-05  1.95      4.87e-05  1.98
7.38e-06  2.00      8.33e-06  1.99      1.22e-05  1.99

mean      2.01      mean      2.00      mean      2.00
----------------------------------------------------------------------------------------------------
linf
rho                 rho_v1              rho_e
error     EOC       error     EOC       error     EOC
1.45e-03  -         1.42e-03  -         2.57e-03  -
3.64e-04  2.00      3.86e-04  1.88      6.72e-04  1.93
9.48e-05  1.94      1.02e-04  1.92      1.62e-04  2.06
2.55e-05  1.90      2.76e-05  1.89      4.00e-05  2.01

mean      1.94      mean      1.90      mean      2.00
----------------------------------------------------------------------------------------------------

minmod

l2
rho                 rho_v1              rho_e
error     EOC       error     EOC       error     EOC
2.90e-03  -         2.98e-03  -         2.25e-03  -
9.25e-04  1.65      9.51e-04  1.65      6.72e-04  1.74
2.93e-04  1.66      3.01e-04  1.66      2.02e-04  1.74
9.19e-05  1.67      9.43e-05  1.68      5.99e-05  1.75

mean      1.66      mean      1.66      mean      1.74
----------------------------------------------------------------------------------------------------
linf
rho                 rho_v1              rho_e
error     EOC       error     EOC       error     EOC
6.92e-03  -         6.62e-03  -         6.60e-03  -
2.72e-03  1.35      2.70e-03  1.29      2.31e-03  1.52
1.07e-03  1.35      1.07e-03  1.33      8.00e-04  1.53
4.19e-04  1.35      4.22e-04  1.35      2.81e-04  1.51

mean      1.35      mean      1.32      mean      1.52
----------------------------------------------------------------------------------------------------

superbee

l2
rho                 rho_v1              rho_e
error     EOC       error     EOC       error     EOC
2.07e-03  -         2.19e-03  -         1.73e-03  -
1.12e-03  0.88      1.15e-03  0.93      7.28e-04  1.24
5.49e-04  1.03      5.56e-04  1.05      3.12e-04  1.22
2.06e-04  1.41      2.07e-04  1.42      1.10e-04  1.50

mean      1.11      mean      1.13      mean      1.32
----------------------------------------------------------------------------------------------------
linf
rho                 rho_v1              rho_e
error     EOC       error     EOC       error     EOC
4.50e-03  -         4.96e-03  -         3.87e-03  -
3.26e-03  0.47      3.39e-03  0.55      2.17e-03  0.83
2.29e-03  0.51      2.34e-03  0.53      1.33e-03  0.71
1.25e-03  0.88      1.26e-03  0.90      6.58e-04  1.01

mean      0.62      mean      0.66      mean      0.85
----------------------------------------------------------------------------------------------------

van Leer

l2
rho                 rho_v1              rho_e
error     EOC       error     EOC       error     EOC
7.99e-04  -         8.34e-04  -         9.04e-04  -
2.22e-04  1.85      2.30e-04  1.86      2.25e-04  2.01
6.06e-05  1.87      6.26e-05  1.88      5.68e-05  1.98
1.63e-05  1.90      1.67e-05  1.90      1.44e-05  1.98

mean      1.87      mean      1.88      mean      1.99
----------------------------------------------------------------------------------------------------
linf
rho                 rho_v1              rho_e
error     EOC       error     EOC       error     EOC
2.73e-03  -         2.53e-03  -         2.84e-03  -
8.73e-04  1.64      8.63e-04  1.55      8.09e-04  1.81
2.90e-04  1.59      2.89e-04  1.58      2.33e-04  1.80
9.80e-05  1.57      9.80e-05  1.56      6.98e-05  1.74

mean      1.60      mean      1.56      mean      1.78
----------------------------------------------------------------------------------------------------

Not really sure why superbee is so bad.

Copy link
Contributor

Review checklist

This checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging.

Purpose and scope

  • The PR has a single goal that is clear from the PR title and/or description.
  • All code changes represent a single set of modifications that logically belong together.
  • No more than 500 lines of code are changed or there is no obvious way to split the PR into multiple PRs.

Code quality

  • The code can be understood easily.
  • Newly introduced names for variables etc. are self-descriptive and consistent with existing naming conventions.
  • There are no redundancies that can be removed by simple modularization/refactoring.
  • There are no leftover debug statements or commented code sections.
  • The code adheres to our conventions and style guide, and to the Julia guidelines.

Documentation

  • New functions and types are documented with a docstring or top-level comment.
  • Relevant publications are referenced in docstrings (see example for formatting).
  • Inline comments are used to document longer or unusual code sections.
  • Comments describe intent ("why?") and not just functionality ("what?").
  • If the PR introduces a significant change or new feature, it is documented in NEWS.md with its PR number.

Testing

  • The PR passes all tests.
  • New or modified lines of code are covered by tests.
  • New or modified tests run in less then 10 seconds.

Performance

  • There are no type instabilities or memory allocations in performance-critical parts.
  • If the PR intent is to improve performance, before/after time measurements are posted in the PR.

Verification

  • The correctness of the code was verified using appropriate tests.
  • If new equations/methods are added, a convergence test has been run and the results
    are posted in the PR.

Created with ❤️ by the Trixi.jl community.

Copy link

codecov bot commented Jul 24, 2024

Codecov Report

Attention: Patch coverage is 90.58824% with 8 lines in your changes missing coverage. Please review.

Project coverage is 96.22%. Comparing base (e1aabb3) to head (a64bb60).
Report is 3 commits behind head on main.

Files Patch % Lines
src/solvers/dgsem_tree/finite_volume_O2.jl 92.11% 3 Missing ⚠️
src/equations/linear_scalar_advection_1d.jl 0.00% 1 Missing ⚠️
src/equations/linear_scalar_advection_2d.jl 0.00% 1 Missing ⚠️
src/equations/linear_scalar_advection_3d.jl 0.00% 1 Missing ⚠️
src/solvers/dg.jl 90.00% 1 Missing ⚠️
src/solvers/dgsem_tree/dg_1d.jl 97.06% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2022      +/-   ##
==========================================
- Coverage   96.23%   96.22%   -0.01%     
==========================================
  Files         462      463       +1     
  Lines       37084    37169      +85     
==========================================
+ Hits        35687    35764      +77     
- Misses       1397     1405       +8     
Flag Coverage Δ
unittests 96.22% <90.59%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

test/test_unit.jl Outdated Show resolved Hide resolved
@DanielDoehring DanielDoehring added the enhancement New feature or request label Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant