Skip to content

Write a wrapper for LocalOperator that adds numerical jacobians

The wrapper should

  • inspect the given ´LocalOperator´and add all missing ´jacobian()´and ´jacobian_apply()` methods using numerical differentiation.
  • have a template parameter that causes all methods to be overridden by the numerical version (for testing purposes etc.).
  • provide a free-standing function addNumericalJacobian(local_operator) that returns a copy of the wrapper.
  • accept an lvalue reference to the wrapped operator and store a reference (or a pointer) to it.
  • Detect whether the wrapped operator implements the instantionary interface and expose that interface if required.

This is part of #45.