Closed tjhei closed 1 year ago
This change would only affect computations with a free surface with "simple" material models where the matrix does not depend on the solution (constant viscosity etc). In that case we would spend more time setting up the AMG preconditioner (and maybe get fewer iterations).
We already have logic to update the preconditioner, for example if the viscosity changes, right? Can't we hook into that flag?
Or are you talking about the preconditioner for anything else than the Stokes problem?
This might be a bug: if we have a free surface, shouldn't we always recompute the preconditioner? We currently have no logic to recompute the preconditioner even though the mesh gets deformed in every step.
While the preconditioner is likely similar (if deformations are small), there is no guarantee that it is still good. Note that tests like tests/remove_angular_momentum only update the preconditioner if the mesh changes (and would never update with a fixed mesh).
While it seems efficient to maybe reuse the preconditioner for a while, I would still suggest to always rebuild it to be consistent. Thoughts?
_Originally posted by @tjhei in https://github.com/geodynamics/aspect/pull/5070#discussion_r1106108216_