Version: dev

Differentiate a model

Take a model or flattened system, differentiate its right-hand side, and get back structured Jacobian bands.

OperationKindBindingsSummary
dscalarfunctionJulia, Python, RustDerivative of the scalar expression e with respect to site s, as a new ESM expression.
jacobian_bandsfunctionJulia, Python, RustDifferentiate every differential equation of the system with respect to every state (wrt = :states) or every parameter (wrt = :parameters) that structurally occurs in its…
simplify_branchesfunctionJulia, Python, RustConditional-specific simplification, complementing EarthSciAST.simplify:
sysviewfunctionJulia, Python, RustView a model of an EsmFile, or a FlattenedSystem, for differentiation.
bandtypeJulia, Python, RustOne structured block of ∂(rhs of the equation for u)/∂v:
jac_entrytypeJulia, Python, RustOne band of the model Jacobian: ∂(equation for state u)/∂v`` with its Band.
sitetypeJulia, Python, RustThe thing a scalar derivative is taken with respect to: a bare VarExpr (scalar variable) or an index(v, i…) node (one symbolic cell of an array variable).
sys_viewtypeJulia, Python, RustUniform system view: variables (name → ModelVariable), equations, and the document’s index_sets.
band_errorerrorJulia, Python, RustAn expression has a form the band calculus cannot differentiate (for example a filtered faq node or a non-"+" semiring).
derivative_rule_errorerrorJulia, Python, RustA scalar operator has no derivative rule (spec §3).

All topics