SciML / MethodOfLines.jl

Automatic Finite Difference PDE solving with Julia SciML
https://docs.sciml.ai/MethodOfLines/stable/
MIT License
166 stars 31 forks source link

Staggered interpolations #354

Open cmhyett opened 10 months ago

cmhyett commented 10 months ago

Checklist

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[bot] commented 10 months ago

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 :warning:
src/discretization/staggered_discretize.jl 0.00% 3 Missing :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.