Function lupnt::JacobianParallel

Function Documentation

VecX lupnt::JacobianParallel(const std::function<VecX(const VecX&)> &func, const VecX &x0, MatXd &J)

Compute func(x0) together with its Jacobian J = d(func)/d(x0), evaluating each column of J in parallel via finite differences/autodiff (jacobian/wrt/at from autodiff).

Called by Integrator::Propagate/PropagateEx (the MatXd* J/state-transition- matrix overloads) to compute the sensitivity of a propagated state with respect to its initial condition, by treating the whole propagation as func.

Parameters:
  • func – Function whose Jacobian is to be evaluated

  • x0 – Point at which to evaluate func and its Jacobian [size n]

  • J – Output Jacobian matrix, resized to m x n where m = func(x0).size()

Returns:

func(x0) [size m]