I added a gradientensolver as well as a singleton NoLineSearch and ArmijoGoldstein which does backtracking linesearch. Instead of having the function getjacobian I included the function getsystemmatrix which takes two arguments a problem and a nonlinear solver. By this, one could have special dispatches for the different solver and e.g. assemble in the plasticity example for the gradientsolver a preconditioner of the form
which only needs to be computed once prior to the simulation since neither $\Omega$ nor $N$ change during the simulation. In contrast one could dispatch for a newton solver the correct Jacobian in each step. However, to fully utilize this, we'd need to provide the nlsolver in the update_problem! dispatch as well, since from a user perspective we can't decide otherwise what to do
I added a gradientensolver as well as a singleton
NoLineSearch
andArmijoGoldstein
which does backtracking linesearch. Instead of having the functiongetjacobian
I included the functiongetsystemmatrix
which takes two arguments a problem and a nonlinear solver. By this, one could have special dispatches for the different solver and e.g. assemble in the plasticity example for the gradientsolver a preconditioner of the form$$ K{ij} = \int{\Omega} \nabla N_i \nabla N_j dx $$
which only needs to be computed once prior to the simulation since neither $\Omega$ nor $N$ change during the simulation. In contrast one could dispatch for a newton solver the correct Jacobian in each step. However, to fully utilize this, we'd need to provide the
nlsolver
in theupdate_problem!
dispatch as well, since from a user perspective we can't decide otherwise what to do