Source code for firedrake.preconditioners.low_order

from firedrake.preconditioners.pmg import PMGPC, PMGSNES

__all__ = ("P1PC", "P1SNES")


[docs]class P1PC(PMGPC):
[docs] def coarsen_element(self, ele): if super().max_degree(ele) <= self.coarse_degree: raise ValueError return super().reconstruct_degree(ele, self.coarse_degree)
[docs]class P1SNES(PMGSNES):
[docs] def coarsen_element(self, ele): if super().max_degree(ele) <= self.coarse_degree: raise ValueError return super().reconstruct_degree(ele, self.coarse_degree)