pybamm.Jacobian(known_jacs=None, clear_domain=True)[source]¶Helper class to calculate the jacobian of an expression.
| Parameters: |
|
|---|
jac(symbol, variable)[source]¶This function recurses down the tree, computing the Jacobian using the Jacobians defined in classes derived from pybamm.Symbol. E.g. the Jacobian of a ‘pybamm.Multiplication’ is computed via the product rule. If the Jacobian of a symbol has already been calculated, the stored value is returned. Note: The Jacobian is the derivative of a symbol with respect to a (slice of) a State Vector.
| Parameters: |
|
|---|---|
| Returns: | Symbol representing the Jacobian |
| Return type: |