Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable preconditioner reuse between nonlinear solves #3209

Open
reverendbedford opened this issue Mar 25, 2022 · 0 comments
Open

Enable preconditioner reuse between nonlinear solves #3209

reverendbedford opened this issue Mar 25, 2022 · 0 comments

Comments

@reverendbedford
Copy link
Contributor

Petsc supports reusing the preconditioner between iterations in a nonlinear solve and even in between multiple timesteps (i.e. repeat calls to solve a new nonlinear system using the same SNES instance) with SNESSetLagPreconditioner and SNESSetLagPreconditionerPersists. Some testing in MOOSE in tensor_mechanics and associate apps suggests that for runs using a full Newton solve and using a direct solve for the linearized equations we can save 10x the computational work or more by reusing the factorized equations from past iterations/timesteps as a preconditioner for GMRES.

It would be nice to enable preconditioner reuse in PetscNonlinearSolver. One annoyance is that the current implementation clears and releases the SNES instance in between nonlinear solves (though the PetscNonlinearSolver is kept around in MOOSE). If you release the SNES instance you lose your preconditioner, so some refactoring is going to be required to enable this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant