31 |
|
|
32 |
class Test_linearPDEs(unittest.TestCase): |
class Test_linearPDEs(unittest.TestCase): |
33 |
TOL=1.e-6 |
TOL=1.e-6 |
34 |
|
SOLVER_TOL=1.e-10 |
35 |
DEBUG=False |
DEBUG=False |
36 |
VERBOSE=False |
VERBOSE=False |
37 |
def check(self,arg,ref_arg,tol=None): |
def check(self,arg,ref_arg,tol=None): |
517 |
mypde=LinearPDE(self.domain,debug=self.DEBUG) |
mypde=LinearPDE(self.domain,debug=self.DEBUG) |
518 |
mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.) |
mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.) |
519 |
mypde.setSolverMethod(mypde.GMRES) |
mypde.setSolverMethod(mypde.GMRES) |
520 |
u=mypde.getSolution(verbose=self.VERBOSE,preconditioner=mypde.ILU0,truncation=10,restart=20) |
mypde.setTolerance(1.e-12) |
521 |
|
u=mypde.getSolution(verbose=self.VERBOSE or True,preconditioner=mypde.ILU0,truncation=10,restart=20) |
522 |
self.failUnless(self.check(u,1.),'solution is wrong.') |
self.failUnless(self.check(u,1.),'solution is wrong.') |
523 |
def test_Lumping_attemptToSetA(self): |
def test_Lumping_attemptToSetA(self): |
524 |
mypde=LinearPDE(self.domain,debug=self.DEBUG) |
mypde=LinearPDE(self.domain,debug=self.DEBUG) |