Source code for firedrake.preconditioners.massinv
from firedrake.preconditioners.assembled import AssembledPC
from firedrake import inner, dx
__all__ = ("MassInvPC", )
[docs]
class MassInvPC(AssembledPC):
_prefix = "Mp_"
"""A matrix free operator that inverts the mass matrix in the provided space.
Internally this creates a PETSc KSP object that can be controlled
by options using the extra options prefix ``Mp_``.
For Stokes problems, to be spectrally equivalent to the Schur
complement, the mass matrix should be weighted by the viscosity.
This can be provided (defaulting to constant viscosity) by
providing a field defining the viscosity in the application
context, keyed on ``"mu"``.
"""
[docs]
def set_nullspaces(self, pc):
# the mass matrix does not have a nullspace
pass