Skip to content

Cleanup existing jacobian apply engines

René Heß requested to merge feature/jacobian-apply-cleanup into master

This merge request cleans up the existing jacobian apply engines. We remove the NonlinearJacobianApply engine and instead make sure that the JacobianApply engine can handle the linear and the non-linear case. This is done by introducing a flag isLinear to the local operators through <dune/pdelab/localoperator/flags.hh>. The JacobianApply uses this flag to decide which methods need to be called.

On the GridOperator side we have two methods called jacobian_apply that take a different number of arguments for the linear and non-linear case. The method nonlinear_jacobian_apply still exists but is deprecated. If you use the wrong method you will get an error.

Changes for users: If you have a non-linear residual and want to use the nonlinear_jacobian_apply method you need to set the isLinear flag in your local operator.

This merge request is based on inspired by the work of @smuething and @marian in the EXADune project, checked out on commit 70c0f644dee360259b36cb17888e6baf90da5056.

Edited by René Heß

Merge request reports