Skip to content

Staggered interpolations#354

Open
cmhyett wants to merge 2 commits into
SciML:masterfrom
cmhyett:staggered_interpolations
Open

Staggered interpolations#354
cmhyett wants to merge 2 commits into
SciML:masterfrom
cmhyett:staggered_interpolations

Conversation

@cmhyett

@cmhyett cmhyett commented Jan 13, 2024

Copy link
Copy Markdown
Contributor

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.

@codecov

codecov Bot commented Jan 13, 2024

Copy link
Copy Markdown

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.

@xtalax xtalax left a comment

Copy link
Copy Markdown
Member

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