Linear Solver Design #687
tommbendall
started this conversation in
Design discussion
Replies: 1 comment
-
|
Very nice summary! Few comments:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Linear Solver Design
The aim of our reorganisation of Gusto's linear solvers is to allow for more flexibility and rapid development of new solver strategies. This is to be achieved through:
PrognosticEquationSet, making it easier to add new equation sets (as they won't require a new linear solver object).solver_parameters. This would facilitate non-Quasi-Newton timesteppers from using the same solver strategy as the Quasi-Newton solvers.Part 1 was partially achieved through #649, which implemented a new general
SIQNLinearSolverobject.Part 2 is tackled with #648. This implements our current linear solvers through solver parameters.
However there are going to be several pieces of technical debt and follow-up tasks, which are captured in this discussion.
Summary of #648
solver_parameterssolver_parametersused in theSemiImplicitQuasiNewtonstepper are theHybridisedSolverParametersthat defined in the newsolver_presets.pyfileHybridisedSolverParameterscovers all currently implementedPrognosticEquationSets, through an if statementAuxiliaryPCclass has been implemented (why?)schur_complementroutines attached the thePrognosticEquationSets. This means we have essentially moved much of the hand-coded linearisations fromlinear_solvers.pyto theschur_complementroutines of thePrognosticEquationSets, so haven't yet removed them!CompressibleEulerEquationcase is still not covered by the infrastructure described above, so has its own special python preconditioner (I think this is because of the non-linear pressure gradient terms and the handling of the Exner pressure?)update_reference_profileshas been added to thePrognosticEquationSet, as this is now equation-specificOne concern that I do have is: by auto-generating the linearised equations, and specifying the solver strategy in general ways through solver parameter dictionaries, we lose the ability to read the maths by reading the code. To address this, I think we need to do the following:
form.__str__()so that it gives readable mathsNext Steps
HybridisedSolverParametersmore agnostic to thePrognosticEquationSetNonlinearVariationalSolvers (and thus in other time discretisations)Beta Was this translation helpful? Give feedback.
All reactions