Native symbolic automatic differentiation

Automatic differentiation in Navpactos is native. Navpactos offers:

  • a next generation formulation of calculations: tensor-wise, multi-valued, indexable for loops, knowledgeable of finite elements, sparse matrices and parameter tables.
  • a virtual calculator, able to compute some formulas together by constructing an optimized internal chain which the user can call at his own discretion.

The derivation stays within this framework: it’s native.

For the user, the derivation thus consists in requesting the derived formula, either with respect to a dummy or real primary variable, or with respect to an array of parameters, in which case the resulting formula contains the derivative with respect to all the parameters of the table. Since it is still a formula, it is calculated the same way. It is thus possible to calculate together value and derivatives.

When programming with Navpactos, the derivation is therefore very naturally added to the same code.

A few examples

  1. Euler-Lagrange optimality condition, i.e. the Jacobian of a Lagrangian, can themselves be derivated to give the true Hessian.
  2. In assemblies from finite elements, an elementary matrix is often the derivative of an elementary vector with respect to the degrees of freedom on the element. But if one derives with respect to all the degrees of freedom, one has a priori a sparse matrix repeating the pattern of the elementary column vector on its columns, the underlying elementary matrix pattern of which being analysed internally by Navpactos.