-
Notifications
You must be signed in to change notification settings - Fork 113
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
Allow disabling reinterpolation in 1D plots #2258
Conversation
Review checklistThis 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
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2258 +/- ##
=======================================
Coverage 96.87% 96.87%
=======================================
Files 490 490
Lines 39454 39458 +4
=======================================
+ Hits 38220 38224 +4
Misses 1234 1234
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; I only added some comments aiming to improve semantics.
Co-authored-by: Daniel Doehring <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice idea!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @JoshuaLampert! This is a nice feature to have because using the (partially) supported utils/trixi2txt.jl
and ParaView is a bit unwieldy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Please resolve the conflicts so that we can merge this PR. Nice feature 👍
Co-authored-by: Hendrik Ranocha <[email protected]>
Done! |
Co-authored-by: Daniel Doehring <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for this new feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
For 1D plots the visualization nodes are currently always interpolated to uniformly distributed nodes. This can introduce spurious overshoots, which might not be within the solution data. This PR introduces a keyword argument, which allows to disable the interpolation therefore using the GLL nodes also for the visualization.
![with_interpolation](https://private-user-images.githubusercontent.com/51029046/409161174-100253aa-1312-4cfa-9523-f70e9a1228b3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MjkxNDksIm5iZiI6MTczOTYyODg0OSwicGF0aCI6Ii81MTAyOTA0Ni80MDkxNjExNzQtMTAwMjUzYWEtMTMxMi00Y2ZhLTk1MjMtZjcwZTlhMTIyOGIzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDE0MTQwOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA0ZWQ4Y2M4NTZmOTNkMjI2YTA5YzExZjQyZmUyYzRhNzA3OGJiNTIwMDI5ODM4NGRiNmJiNDc4M2EwZmQwOGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.4rLVXQDkRUlmrWwKV5WT_Ipc7BxQfrs4MYCP-V_ew-M)
![without_interpolation](https://private-user-images.githubusercontent.com/51029046/409161237-244c1c38-19bc-4fdc-982c-8f985ebf6930.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MjkxNDksIm5iZiI6MTczOTYyODg0OSwicGF0aCI6Ii81MTAyOTA0Ni80MDkxNjEyMzctMjQ0YzFjMzgtMTliYy00ZmRjLTk4MmMtOGY5ODVlYmY2OTMwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDE0MTQwOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTkzYmYxNzQ5NTc0Y2YxMWE4N2Y4YzUyY2YzZWEwYjZjNGY1NTlmOTE0NWEwMzhhOTEzMzU0MDM1OWYxZGQwY2YmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.-jgcFzXRG-p4h2xzVwRRShKnKessjw1-CY6ap3HamPM)
Below you can see a comparison.
with
reinterpolate = true
(current behavior and default with this PR):with
reinterpolate = false
:The plots are generated by the following code:
Closes #1527.