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