KnutAM / FESolvers.jl

Solvers for Ferrite.jl problems
https://knutam.github.io/FESolvers.jl/dev
MIT License
3 stars 0 forks source link

Gradientsolver and linesearch #5

Closed koehlerson closed 2 years ago

koehlerson commented 2 years ago

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

$$ 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 the update_problem! dispatch as well, since from a user perspective we can't decide otherwise what to do