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

Staggered interpolations #354

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cmhyett
Copy link
Contributor

@cmhyett cmhyett commented Jan 13, 2024

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Working to fix #351. Need to utilize variable staggering for non-derivative terms. I currently implement this as a simple average between neighboring points, but in general we should leverage MoL's already built-in interpolations.

Attached are generated code before/after for gas-flow equations.
interpolation_results.txt

CI will break on this commit due to lack of support for periodic bcs, but I'll resolve it in the next.

Copy link

codecov bot commented Jan 13, 2024

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (172cdc4) 84.99% compared to head (f504463) 61.78%.

Files Patch % Lines
src/discretization/discretize_vars.jl 0.00% 12 Missing ⚠️
src/discretization/staggered_discretize.jl 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #354       +/-   ##
===========================================
- Coverage   84.99%   61.78%   -23.22%     
===========================================
  Files          41       41               
  Lines        1959     1965        +6     
===========================================
- Hits         1665     1214      -451     
- Misses        294      751      +457     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@xtalax xtalax left a comment

Choose a reason for hiding this comment

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

Looks good, could use higher order interpolations though, see the nonlinear laplacian for how

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.

Interpolate grid values for staggered grid discretization
2 participants