File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
firedrake/preconditioners Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 5
5
6
6
7
7
class MassInvPC (AssembledPC ):
8
+ """A matrix free operator that assembles the mass matrix in the provided space.
8
9
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
14
11
by options using the extra options prefix ``Mp_``.
15
12
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
+
16
18
For Stokes problems, to be spectrally equivalent to the Schur
17
19
complement, the mass matrix should be weighted by the viscosity.
18
20
This can be provided (defaulting to constant viscosity) by
19
21
providing a field defining the viscosity in the application
20
22
context, keyed on ``"mu"``.
21
23
"""
24
+
25
+ _prefix = "Mp_"
26
+
22
27
def form (self , pc , test , trial ):
23
28
_ , bcs = super (MassInvPC , self ).form (pc )
24
29
You can’t perform that action at this time.
0 commit comments