-
Notifications
You must be signed in to change notification settings - Fork 13
Generalise linear solvers #648
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
Conversation
…set to 0 with a flag
gusto/solvers/preconditioners.py
Outdated
| self.W = equations.function_space | ||
| self.W_hyb = MixedFunctionSpace((self.Vu_broken, self.Vrho, self.Vtrace)) | ||
|
|
||
| # Define |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need more detail here? define what?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| """ | ||
| This module provides PETSc dictionaries for nonlinear and linear problems. | ||
| The solvers provided here are used for solving linear problems on mixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I"m a little bit confused by these two sentences - the first mentions nonlinear and linear problems but the second just says this is for linear problems...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was future proofing for nonlinear solvers in the future, but have left as linear for now
| # BCs, Forcing and Linear Solver --------------------------------------- | ||
| self.bcs = equation_set.bcs | ||
| self.forcing = Forcing(equation_set, self.implicit_terms, self.alpha) | ||
| if linear_solver is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want to keep this argument
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
| passed in. Defaults to False. | ||
| reference_dependent: this indicates that the solver Jacobian should | ||
| be rebuilt if the reference profiles have been updated. | ||
| appctx: appctx for the underlying :class:`LinearVariationalSolver`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more doc changes required above to remove obsolete arguments and put docs in same order as args
| self.equation.update_reference_profiles() | ||
| self.solver.invalidate_jacobian() | ||
|
|
||
| # TODO: Issue X is to address this reference profile update bug (pythonPC update not called) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have an issue number?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#686, added!
| for field_name in field_names: | ||
|
|
||
| if field_name not in prognostic_names: | ||
| logger.debug(f'Semi-Implicit Quasi Newton: Zeroing xrhs for {field_name}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this debug or info?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched to info
Co-authored-by: Dr Jemma Shipton <j.shipton@exeter.ac.uk>
Co-authored-by: Dr Jemma Shipton <j.shipton@exeter.ac.uk>
Co-authored-by: Dr Jemma Shipton <j.shipton@exeter.ac.uk>
Co-authored-by: Dr Jemma Shipton <j.shipton@exeter.ac.uk>
…roject/gusto into auxiliary-equation-pc
Co-authored-by: Dr Jemma Shipton <j.shipton@exeter.ac.uk>
No description provided.