Skip to content

Commit 27ecc59

Browse files
authored
MassInvPC: update docstring (#4542)
1 parent a20f37a commit 27ecc59

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

firedrake/preconditioners/massinv.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,25 @@
55

66

77
class MassInvPC(AssembledPC):
8+
"""A matrix free operator that assembles the mass matrix in the provided space.
89
9-
_prefix = "Mp_"
10-
11-
"""A matrix free operator that inverts the mass matrix in the provided space.
12-
13-
Internally this creates a PETSc KSP object that can be controlled
10+
Internally this creates a PETSc PC object that can be controlled
1411
by options using the extra options prefix ``Mp_``.
1512
13+
A preconditioner with the (approximate) action of the inverse mass matrix
14+
can be constructed by creating an internal PETSc KSP object by setting
15+
``-Mp_pc_type ksp`` and suitable inner options, such as
16+
``-Mp_ksp_ksp_type chebyshev`` and ``-Mp_ksp_pc_type jacobi``, for example.
17+
1618
For Stokes problems, to be spectrally equivalent to the Schur
1719
complement, the mass matrix should be weighted by the viscosity.
1820
This can be provided (defaulting to constant viscosity) by
1921
providing a field defining the viscosity in the application
2022
context, keyed on ``"mu"``.
2123
"""
24+
25+
_prefix = "Mp_"
26+
2227
def form(self, pc, test, trial):
2328
_, bcs = super(MassInvPC, self).form(pc)
2429

0 commit comments

Comments
 (0)