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

Add upwind operators of C. Williams and K. Duru #284

Merged
merged 5 commits into from
Aug 9, 2024
Merged

Conversation

Dougal-s
Copy link
Contributor

@Dougal-s Dougal-s commented Aug 5, 2024

The arXiv paper "Provably stable full-spectrum dispersion relation preserving schemes" is now on the SIAM Journal on Numerical Analysis as "Full-Spectrum Dispersion Relation Preserving Summation-by-Parts Operators" (https://epubs.siam.org/doi/10.1137/23M1586471).

This should close #269

Copy link

codecov bot commented Aug 5, 2024

Codecov Report

Attention: Patch coverage is 98.79518% with 2 lines in your changes missing coverage. Please review.

Project coverage is 91.80%. Comparing base (8184a39) to head (ef6826a).

Files Patch % Lines
src/SBP_coefficients/WilliamsDuru2024.jl 98.79% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #284      +/-   ##
==========================================
+ Coverage   91.59%   91.80%   +0.21%     
==========================================
  Files          35       36       +1     
  Lines        5364     5530     +166     
==========================================
+ Hits         4913     5077     +164     
- Misses        451      453       +2     
Flag Coverage Δ
unittests 91.80% <98.79%> (+0.21%) ⬆️

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.

@coveralls
Copy link

coveralls commented Aug 5, 2024

Coverage Status

coverage: 92.535% (+0.2%) from 92.362%
when pulling ef6826a on Dougal-s:main
into 8184a39 on ranocha:main.

Copy link
Owner

@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 for your contribution! Nice work 👍

@ranocha ranocha enabled auto-merge (squash) August 8, 2024 10:45
@ranocha ranocha disabled auto-merge August 8, 2024 10:49
Comment on lines +130 to +137
upper_coef_plus = SVector(T(205//143),
T(-873//2860),
T(-133//4290),
T(3//130), )
central_coef_plus = T(-889//858)
lower_coef_plus = SVector(T(57//1430),
T(-443//2860),
T(2//65), )
Copy link
Owner

Choose a reason for hiding this comment

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

I haven't read the paper in detail yet. Looking at the arXiv version, these coefficients should be the ones from the table in the appendix, Section A.1, correct? If so, could you please explain the differences?

Copy link
Contributor Author

@Dougal-s Dougal-s Aug 8, 2024

Choose a reason for hiding this comment

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

The 4th order accurate interior stencil was updated since the 2021 version was uploaded to arXiv. The coefficients I used should match the version on SIAM.

Copy link
Owner

Choose a reason for hiding this comment

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

Thanks!

T=Float64, mode=FastMode())
if order == 4
left_boundary_plus = (
DerivativeCoefficientRow{T,1, 6}(SVector( T(-7244216288712856142349841908536610983621117531423//4383417301651166629768772548289373010602184474830),
Copy link
Owner

Choose a reason for hiding this comment

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

I guess these coefficients are rational approximations of the floating point values from the paper. Do they still satisfy the accuracy conditions exactly?

Copy link
Contributor Author

@Dougal-s Dougal-s Aug 8, 2024

Choose a reason for hiding this comment

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

I got the rational coefficients directly from Kenneth Duru. I added some rational tests that show they satisfy the dual-pairing SBP property and accuracy conditions exactly.

Copy link
Owner

Choose a reason for hiding this comment

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

Great, thanks 👍

T=Float64, mode=FastMode())
if order == 4
left_boundary_plus = (
DerivativeCoefficientRow{T,1, 6}(SVector( T(-7244216288712856142349841908536610983621117531423//4383417301651166629768772548289373010602184474830),
Copy link
Owner

Choose a reason for hiding this comment

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

Great, thanks 👍

Comment on lines +130 to +137
upper_coef_plus = SVector(T(205//143),
T(-873//2860),
T(-133//4290),
T(3//130), )
central_coef_plus = T(-889//858)
lower_coef_plus = SVector(T(57//1430),
T(-443//2860),
T(2//65), )
Copy link
Owner

Choose a reason for hiding this comment

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

Thanks!

@ranocha ranocha merged commit 39a5785 into ranocha:main Aug 9, 2024
21 checks passed
This pull request was closed.
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.

New (dual-pairing/upwind) operators of Williams, Duru et al.
3 participants