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

Interpolating if one or more of the dimensions has length 1. #330

Open Qfl3x opened 1 year ago

Qfl3x commented 1 year ago

304

Still has a warning assertion in case all ivs have length 1. Otherwise it will build an interpolation object for the non-"singleton" ivs.

If the model is prompted to give the solution using the interpolator, it will silently ignore the missing ivs and only consider the ivs for which length is > 1.

Performance shouldn't be too big of an issue, though it would've been better to only do the singleton ivs lookup once.

It's all silent, so feel free to add warnings or let me know if you want warnings.

codecov[bot] commented 1 year ago

Codecov Report

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

Comparison is base (6c8b78d) 69.95% compared to head (9af715e) 85.81%. Report is 13 commits behind head on master.

Files Patch % Lines
src/interface/solution/common.jl 20.00% 8 Missing :warning:
src/interface/solution/solution_utils.jl 80.00% 1 Missing :warning:
src/system_parsing/pde_system_transformation.jl 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #330 +/- ## =========================================== + Coverage 69.95% 85.81% +15.85% =========================================== Files 38 40 +2 Lines 1741 1769 +28 =========================================== + Hits 1218 1518 +300 + Misses 523 251 -272 ```

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

xtalax commented 1 year ago

Hey, rebase and this should pass - thanks!