Skip to content

Conversation

@AayushSabharwal
Copy link
Member

Supersedes #30

ChrisRackauckas and others added 3 commits September 4, 2025 21:34
This commit implements Symbolics.jl support for DataInterpolationsND.jl
to enable ModelingToolkit (MTK) compatibility as requested in issue SciML#6.

Changes:
- Add DataInterpolationsNDSymbolicsExt extension in ext/ directory
- Register NDInterpolation objects as symbolic functions
- Implement symbolic differentiation for partial derivatives
- Add comprehensive test suite for symbolic functionality
- Configure Project.toml with proper extension setup

The extension supports:
- Symbolic evaluation: itp(x, y) with symbolic variables
- Partial differentiation: ∂f/∂x, ∂f/∂y via Symbolics.derivative
- Higher-order and mixed partial derivatives
- Value substitution and numerical comparison

Testing shows the extension works correctly:
- Symbolic expressions are created properly
- Derivatives match ForwardDiff results
- Substitution produces correct numerical values

Resolves SciML#6

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Remove try/catch block and simplify test structure.
The tests now directly use Symbolics without error handling
since the extension will only load when Symbolics is available.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Symbolics is now included in [extras] and [targets] test so that
the Symbolics extension tests can run properly without try/catch.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ChrisRackauckas ChrisRackauckas merged commit 01d166c into SciML:main Oct 28, 2025
20 checks passed
@SouthEndMusic
Copy link
Member

Thanks for completing this work. Is there much effort needed to support #33?

@AayushSabharwal AayushSabharwal deleted the as/symbolics-ext branch October 28, 2025 10:18
@AayushSabharwal
Copy link
Member Author

This extension doesn't particularly care about the details of interpolation, it simply needs some type information from the interpolation object. That PR changes the type parameters, so the extension would need to be updated accordingly.

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.

3 participants