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

Add ODE_DEFAULT_NORM overload for GTPSA #1108

Merged
merged 3 commits into from
Jan 6, 2025

Conversation

mattsignorelli
Copy link
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

I added an overload for ODE_DEFAULT_NORM with TPS types where it calculates the 2-norm of the scalar (0th order) part of the TPS, and is necessary because the GTPSA C library does not allow sqrt(TPS(0)) as the derivatives are undefined.

The calculation of the norm of the scalar part follows from what I see in the Tracker extension. If instead it should calculate a norm including all monomial coefficients/partial derivatives, I can quickly change that to the function GTPSA.normTPS.

@ChrisRackauckas
Copy link
Member

If instead it should calculate a norm including all monomial coefficients/partial derivatives, I can quickly change that to the function GTPSA.normTPS

That would be better because then it would be guaranteed convergent.

@mattsignorelli
Copy link
Contributor Author

Done.

@ChrisRackauckas ChrisRackauckas merged commit 419a2b5 into SciML:master Jan 6, 2025
27 of 44 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