Skip to content

Commit

Permalink
Update firedrake/preconditioners/base.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrubeck authored Feb 7, 2025
1 parent 4abd841 commit 21db7ff
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion firedrake/preconditioners/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,27 @@ def get_appctx(pc):

@staticmethod
def new_snes_ctx(pc, op, bcs, mat_type, fcp=None, options_prefix=None, pre_apply_bcs=True):
""" Create a new SNES contex for nested preconditioning
"""Create a new `_SNESContext` for nested (linear) preconditioning

Check failure on line 114 in firedrake/preconditioners/base.py

View workflow job for this annotation

GitHub Actions / Run linter

W293

firedrake/preconditioners/base.py:114:1: W293 blank line contains whitespace
Parameters
----------
pc : PETSc.PC
The PC object.
op : ufl.BaseForm
A bilinear form.
bcs : DirichletBC[]
The boundary conditions.
mat_type : str
The matrix type for the assembly of ``op``.
options_prefix : str
The PETSc options prefix for the new `_SNESContext`.
pre_apply_bcs : bool
If ``True``, the ``bcs`` are pre applied on the solution before the solve,

Check failure on line 128 in firedrake/preconditioners/base.py

View workflow job for this annotation

GitHub Actions / Run linter

W291

firedrake/preconditioners/base.py:128:88: W291 trailing whitespace
otherwise the residual of the ``bcs`` is included in the linear system.

Check failure on line 130 in firedrake/preconditioners/base.py

View workflow job for this annotation

GitHub Actions / Run linter

W293

firedrake/preconditioners/base.py:130:1: W293 blank line contains whitespace
Returns
-------
A new `_SNESContext`
"""
from firedrake.variational_solver import LinearVariationalProblem
from firedrake.function import Function
Expand Down

0 comments on commit 21db7ff

Please sign in to comment.