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

Arbitrary Precision LGL Basis #2128

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

Conversation

DanielDoehring
Copy link
Contributor

Convergence study:

####################################################################################################
l2
scalar              
error     EOC       
1.23e-16  -         
9.88e-18  3.64      
6.55e-19  3.92      
4.20e-20  3.96      
2.70e-21  3.96      
1.69e-22  4.00      

mean      3.90      
----------------------------------------------------------------------------------------------------
linf
scalar              
error     EOC       
1.75e-16  -         
1.40e-17  3.64      
9.26e-19  3.92      
5.94e-20  3.96      
3.82e-21  3.96      
2.39e-22  4.00      

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

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
Member

@JoshuaLampert JoshuaLampert left a comment

Choose a reason for hiding this comment

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

I just had a brief look.

src/auxiliary/special_elixirs.jl Outdated Show resolved Hide resolved
src/auxiliary/special_elixirs.jl Outdated Show resolved Hide resolved
Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com>
@DanielDoehring DanielDoehring changed the title WIP: Higher LGL Precision Basis WIP: Higher Precision LGL Basis Oct 23, 2024
@DanielDoehring DanielDoehring marked this pull request as draft October 23, 2024 10:11
Copy link

codecov bot commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 96.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 96.36%. Comparing base (e1950ac) to head (16abc04).

Files with missing lines Patch % Lines
src/auxiliary/special_elixirs.jl 60.00% 2 Missing ⚠️
src/solvers/dgsem/basis_lobatto_legendre.jl 96.88% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2128      +/-   ##
==========================================
- Coverage   96.36%   96.36%   -0.00%     
==========================================
  Files         480      480              
  Lines       38069    38084      +15     
==========================================
+ Hits        36684    36697      +13     
- Misses       1385     1387       +2     
Flag Coverage Δ
unittests 96.36% <96.00%> (-<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.

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.

Not a full review but I like the PR - cool idea!

src/auxiliary/special_elixirs.jl Show resolved Hide resolved
src/callbacks_step/analysis_dg1d.jl Outdated Show resolved Hide resolved
src/solvers/dgsem/basis_lobatto_legendre.jl Outdated Show resolved Hide resolved
src/solvers/dgsem/basis_lobatto_legendre.jl Outdated Show resolved Hide resolved
DanielDoehring and others added 8 commits October 23, 2024 14:36
This reverts commit 8103d0a.
Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com>
@DanielDoehring DanielDoehring marked this pull request as ready for review October 29, 2024 12:56
@DanielDoehring DanielDoehring changed the title WIP: Higher Precision LGL Basis Arbitrary Precision LGL Basis Oct 30, 2024
@DanielDoehring DanielDoehring marked this pull request as draft November 7, 2024 08:20
@DanielDoehring
Copy link
Contributor Author

14'th order convergence test (elixir_advection_float128.jl) :

####################################################################################################
l2
scalar              
error     EOC       
6.50e-09  -         
3.69e-13  14.10     
2.76e-17  13.71     
1.68e-21  14.00     
1.03e-25  14.00     
6.27e-30  14.00     
1.16e-31  5.75      

mean      12.59     
----------------------------------------------------------------------------------------------------
linf
scalar              
error     EOC       
5.36e-08  -         
3.06e-12  14.09     
3.26e-16  13.20     
2.00e-20  13.99     
1.24e-24  13.98     
7.55e-29  14.00     
2.19e-31  8.43      

mean      12.95     
----------------------------------------------------------------------------------------------------

8'th order convergence (elixir_advection_double_float.jl):

####################################################################################################
l2
scalar              
error     EOC       
6.81e-11  -         
2.63e-13  8.02      
1.03e-15  8.00      
4.01e-18  8.00      
1.57e-20  8.00      
6.12e-23  8.00      
2.39e-25  8.00      

mean      8.00      
----------------------------------------------------------------------------------------------------
linf
scalar              
error     EOC       
5.83e-10  -         
2.34e-12  7.96      
9.11e-15  8.00      
3.58e-17  7.99      
1.39e-19  8.01      
5.46e-22  7.99      
2.12e-24  8.01      

mean      7.99      
----------------------------------------------------------------------------------------------------

@DanielDoehring DanielDoehring marked this pull request as ready for review November 8, 2024 08:22
Comment on lines +23 to +27
# For `TreeMesh` the datatype has to be specified explicitly
mesh = TreeMesh(coordinates_min, coordinates_max,
initial_refinement_level = 3,
n_cells_max = 30_000,
RealT = RealT)
Copy link
Member

Choose a reason for hiding this comment

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

Can we please collect an issue listing these differences between the TreeMesh and the StructuredMesh?

test/Project.toml Show resolved Hide resolved
test/Project.toml Show resolved Hide resolved
test/test_structured_1d.jl Show resolved Hide resolved
test/test_tree_1d_advection.jl Show resolved Hide resolved
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.

5 participants