Skip to content

Refactor internal state handling to support autodiff

Brian Groenke requested to merge feature/autodiff into master

Moves all state variables into specialized state type CryoGridState which is handled by the solver.

This enables seemless integration with autodiff tools at the cost of performance due to more state variables being copied.

This could be mitigated somewhat in the future by being "smarter" in CryoGridState about which arrays to copy the data and which to copy just the reference.

Also adds support for specifying Jacobian (tridiagonal) sparsity in CryoGridProblem which speeds up stiff solvers by 1-2 orders of magnitude.

Edited by Brian Groenke

Merge request reports