1from petsc4py import PETSc 2 3class Matrix(object): 4 5 def __init__(self): 6 pass 7 8 def create(self, mat): 9 pass 10 11 def destroy(self, mat): 12 pass 13 14 def setFromOptions(self, mat): 15 m = PETSc.Options().getString('enable',None) 16 if m is not None: 17 setattr(self,m,1) 18