xref: /petsc/src/mat/tests/ex140.py (revision 12facf1b2b728ba534ad2f7a1cbdf48236a5076e)
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