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