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

First order finite volume 1D #1489

Merged
merged 10 commits into from
May 26, 2023
Merged

Conversation

jmbender
Copy link
Contributor

I enabled first order finite volume methods on the 1D TreeMesh. Therefore I modified Lobatto Legendre basis to allow polynomial degree zero and fixed the determination of cell midpoints. Last I modified the visualization to receive the right cell boundaries and added a test.

Here is the result of a convergence test

julia> convergence_test("examples/tree_1d_dgsem/elixir_advection_finite_volume.jl",7)
...
####################################################################################################
l2
scalar              
error     EOC       
1.17e-02  -         
5.75e-03  1.02      
2.75e-03  1.06      
1.38e-03  1.00      
6.86e-04  1.00      
3.41e-04  1.01      
1.71e-04  1.00      

mean      1.02      
----------------------------------------------------------------------------------------------------
linf
scalar              
error     EOC       
1.65e-02  -         
8.12e-03  1.02      
3.89e-03  1.06      
1.94e-03  1.00      
9.70e-04  1.00      
4.82e-04  1.01      
2.41e-04  1.00      

mean      1.02      
----------------------------------------------------------------------------------------------------
Dict{Symbol, Any} with 3 entries:
  :variables => ("scalar",)
  :l2        => [1.01588]
  :linf      => [1.01559]

Here is a plot result

julia> trixi_include("examples/tree_1d_dgsem/elixir_advection_finite_volume.jl")
julia> plot(sol)

plot_fv

ranocha
ranocha previously approved these changes May 25, 2023
Copy link
Member

@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!

@sloede It would be nice to get a brief review from you since I was involved in this PR.

@ranocha ranocha requested a review from sloede May 25, 2023 09:27
@ranocha
Copy link
Member

ranocha commented May 25, 2023

This enables the functionality requested in #1318 on the 1D TreeMesh.

@codecov
Copy link

codecov bot commented May 25, 2023

Codecov Report

Merging #1489 (4a2b660) into main (9bd246f) will decrease coverage by 0.04%.
The diff coverage is 40.91%.

❗ Current head 4a2b660 differs from pull request most recent head 24978ea. Consider uploading reports for the commit 24978ea to get more accurate results

@@            Coverage Diff             @@
##             main    #1489      +/-   ##
==========================================
- Coverage   95.70%   95.66%   -0.04%     
==========================================
  Files         360      360              
  Lines       29816    29835      +19     
==========================================
+ Hits        28533    28539       +6     
- Misses       1283     1296      +13     
Flag Coverage Δ
unittests 95.66% <40.91%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
src/visualization/types.jl 88.84% <13.33%> (-5.66%) ⬇️
src/solvers/dgsem/basis_lobatto_legendre.jl 88.85% <100.00%> (+0.14%) ⬆️
src/solvers/dgsem_tree/containers_1d.jl 97.33% <100.00%> (ø)
src/solvers/dgsem_tree/containers_2d.jl 96.32% <100.00%> (ø)
src/solvers/dgsem_tree/containers_3d.jl 97.65% <100.00%> (ø)

Copy link
Member

@sloede sloede left a comment

Choose a reason for hiding this comment

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

Overall this LGTM, I have only two small suggestions/questions

src/visualization/types.jl Outdated Show resolved Hide resolved
src/solvers/dgsem/basis_lobatto_legendre.jl Show resolved Hide resolved
Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
@ranocha ranocha requested a review from sloede May 26, 2023 08:10
@ranocha ranocha enabled auto-merge (squash) May 26, 2023 08:10
Copy link
Member

@sloede sloede 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 for this contribution and for bearing with us in the review process. LGTM 👍

@ranocha ranocha disabled auto-merge May 26, 2023 11:27
@ranocha ranocha merged commit f6c5bce into trixi-framework:main May 26, 2023
23 of 26 checks passed
@jmbender jmbender deleted the finite_volume branch May 30, 2023 06:37
@jmbender jmbender restored the finite_volume branch May 30, 2023 06:37
@jmbender jmbender deleted the finite_volume branch May 30, 2023 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants