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 79 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
@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 95.91837% with 4 lines in your changes missing coverage. Please review.

Project coverage is 96.37%. Comparing base (824f7a8) to head (59518f3).

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.37%   96.37%   -0.00%     
==========================================
  Files         483      483              
  Lines       38333    38338       +5     
==========================================
+ Hits        36943    36946       +3     
- Misses       1390     1392       +2     
Flag Coverage Δ
unittests 96.37% <95.92%> (-<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
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
examples/tree_1d_dgsem/elixir_advection_doublefloat.jl Outdated Show resolved Hide resolved
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
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! Is this close to be ready from your point of view?

examples/structured_1d_dgsem/elixir_advection_float128.jl Outdated Show resolved Hide resolved
examples/structured_1d_dgsem/elixir_advection_float128.jl Outdated Show resolved Hide resolved
examples/tree_1d_dgsem/elixir_advection_doublefloat.jl Outdated Show resolved Hide resolved
examples/tree_1d_dgsem/elixir_advection_doublefloat.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
Copy link
Contributor Author

Thanks a lot! Is this close to be ready from your point of view?

The only open question from my side would be the issue with the analysis function, i.e., whether we want to use the current "hot-fixed" way.

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.

Very cool feature! Just a small note, otherwise LGTM!

src/callbacks_step/analysis_dg1d.jl Outdated Show resolved Hide resolved
src/callbacks_step/analysis_dg3d.jl Outdated Show resolved Hide resolved
src/callbacks_step/analysis_dg3d.jl Outdated Show resolved Hide resolved
Co-authored-by: Michael Schlottke-Lakemper <[email protected]>
@torrilhon
Copy link
Contributor

Please note #1880 ...

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.

6 participants