Phase out InverseRTransform and use forward transforms directly #313
Phase out InverseRTransform and use forward transforms directly #313Ao-chuba wants to merge 4 commits into
Conversation
|
When call passes This happened because |
There was a problem hiding this comment.
Pull request overview
This PR continues the #308 migration away from InverseRTransform by deprecating it and updating Poisson/ODE solvers (and their tests) to operate using the forward transform plus BaseTransform’s inverse-derivative helpers.
Changes:
- Deprecates
InverseRTransform(kept for backward compatibility viaDeprecationWarning) and updates call sites/tests to pass the forward transform directly. - Refactors
solve_ode_ivp/solve_ode_bvpand internal ODE transformation helpers to solve on the finite domain usingtransform.inverse(...)plusderiv_inverse*methods. - Updates Poisson solvers and ODE/Poisson tests to match the new forward-transform convention and revised bounds.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/grid/tests/test_poisson.py | Updates Poisson tests to pass forward transforms directly (no InverseRTransform). |
| src/grid/tests/test_ode.py | Refactors ODE tests for the new “solve on finite domain” transform convention and uses deriv_inverse*. |
| src/grid/rtransform.py | Adds a DeprecationWarning and deprecation docs to InverseRTransform. |
| src/grid/poisson.py | Updates Poisson solver docs/validation for forward transforms and adds backward-compat unwrap for InverseRTransform. |
| src/grid/ode.py | Refactors ODE solvers/helpers to use transform.inverse and inverse-derivative methods consistently. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
updated the pr, |
closes #308.
InverseRTransformand preserved it purely for backward compatibility with aDeprecationWarning.solve_poisson_bvpandsolve_poisson_ivpto accept forward transforms directly.ode.pyto consistently operate on the finite integration domain usingtransform.inverse.BaseTransform.deriv_inverseand related methods instead of wrapping.test_ode.pyto reflect the correct forward transform bounds and ensure strict monotonicity.InverseRTransformhave been removed from the codebase.InverseRTransform, which is deprecated and will be removed soon.@marco-2023 Since
InverseRTransformis not being used no more, would you prefer I leave it deprecated for a release cycle as currently implemented, or should I go ahead and completely remove the class and its unit tests right now in this PR?do let me know if further changes required.