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

Code generation for partial derivatives of the vectorfield #36

Open
Richert opened this issue Jun 12, 2024 · 0 comments
Open

Code generation for partial derivatives of the vectorfield #36

Richert opened this issue Jun 12, 2024 · 0 comments
Assignees
Labels
enhancement idea Suggestion or request for new features/enhancing changes help wanted Extra attention is needed

Comments

@Richert
Copy link
Member

Richert commented Jun 12, 2024

In its current state, PyRates generates code for a backend-specific function that evaluates the right-hand-side of a differential equation system $\dot y = f(y, \theta, t)$.
In many cases, partial derivatives of $f(y, \theta, t)$ can help to apply numerical algorithms to the DE system. For example, the Jacobian $J_{ij} = \frac{\partial f_i}{\partial y_j}$ can be required for certain gradient-based parameter optimization problems, and the partial derivatives $\frac{\partial f_i}{\partial \theta_j}$ can be used to improve the accuracy and speed of parameter continuation algorithms.

As a new feature, I suggest to leverage the sympy-based parser of PyRates to analytically find these partial derivatives, if possible, and generate additional code that implements functionals $g(f, y, \theta)$ that compute the partial derivatives based on the current state and vectorfield of the system.

@Richert Richert added enhancement idea Suggestion or request for new features/enhancing changes help wanted Extra attention is needed labels Jun 12, 2024
@Richert Richert self-assigned this Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement idea Suggestion or request for new features/enhancing changes help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant