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

Fix incorrect substitution for finite domain transformation #243

Merged
merged 2 commits into from
Mar 2, 2024

Conversation

danielwe
Copy link
Contributor

@danielwe danielwe commented Feb 29, 2024

Checklist

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

Additional context

In the infinity handling code, the branch that transforms non-infinite dimensions made an incorrect substitution leading to plainly incorrect results. This was not caught by tests because this branch was only tested with a constant function, which is only sensitive to the correctness of the jacobian, not the substituted value.

This PR modifies tests to use a quadratic instead of constant, adds tests for mixed infinite-finite multivariate problems (which I suppose is the reason this branch exists at all), and finally fixes the substitution such that the tests pass.

@lxvm
Copy link
Collaborator

lxvm commented Mar 2, 2024

Hi, thanks for the pr! I made that mistake and made a fix for it in #241, but I agree we should patch this ASAP since that pr is more ambitious

@lxvm lxvm merged commit 884fdcc into SciML:master Mar 2, 2024
8 checks passed
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.

2 participants