Skip to content

Commit

Permalink
fail gracefully if unable to get sub KSPs
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrubeck committed Nov 21, 2022
1 parent 9ae2fc4 commit f64882b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions firedrake/preconditioners/asm.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,11 @@ def view(self, pc, viewer=None):

def update(self, pc):
# FIXME this should be done internally by PCASM
for sub in self.asmpc.getASMSubKSP():
sub.getOperators()[0].setUnfactored()
try:
for sub in self.asmpc.getASMSubKSP():
sub.getOperators()[0].setUnfactored()
except PETSc.Error:
pass
self.asmpc.setUp()

def apply(self, pc, x, y):
Expand Down

0 comments on commit f64882b

Please sign in to comment.