Skip to content

Document how to mutate parameters p in integrator #800

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

Closed

Conversation

ChrisRackauckas
Copy link
Member

Summary

This PR adds documentation explaining how to modify parameters p in the integrator interface, addressing issue #243.

Problem

Users were unclear on how to change the differential equation parameters during integration. While the documentation showed set_t\!, set_u\!, and set_ut\! for modifying state variables, it didn't explain how to modify parameters.

Solution

Added a clear explanation in the integrator documentation that parameters can be modified directly via:

integrator.p = new_p

The documentation also explains why this is different from u and t - changing p doesn't affect the solver's internal state or accuracy, so it can be modified directly without a setter function.

Context

As confirmed by @ChrisRackauckas in the issue comments, parameters can be directly assigned unlike u or t. The callback documentation already shows examples of this pattern being used in affect\! functions.

Fixes #243

🤖 Generated with Claude Code

Add documentation explaining that parameters can be modified directly
via `integrator.p = new_p`, unlike u and t which require setter functions.

This addresses the user's question about how to change the differential
equation parameters during integration, particularly in callbacks.

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

Co-Authored-By: Claude <[email protected]>
@ChrisRackauckas ChrisRackauckas deleted the fix-issue-243-document-integrator-p-mutation branch July 24, 2025 03:04
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.

Add mutating of p fields for integrator
1 participant