underworldcode / underworld3

https://underworldcode.github.io/underworld3/
18 stars 10 forks source link

unable to change SNES max iteration #220

Open bknight1 opened 1 month ago

bknight1 commented 1 month ago

Do we want the user to be able to adjust the max number of iterations or always limit solves to 50?

https://github.com/underworldcode/underworld3/blob/32a3e022b213aaca2732e6a516a816dea8ba247b/src/underworld3/cython/petsc_generic_snes_solvers.pyx#L2590

lmoresi commented 3 weeks ago

OK - so this one was my decision. The flag to use Picard for a few iterations just makes the coding awkward. I guess we have to think about whether the solution here is brute force (bash on through) or mathematical elegance (figure out why convergence is poor and fix that).

knepley commented 3 weeks ago

You can get the "Picard for a few iterations behavior" with command line options, using nonlinear preconditioning. We should definitely write that up since it is easy and generally useful.