/[escript]/trunk/finley/test/python/run_amg.py
ViewVC logotype

Diff of /trunk/finley/test/python/run_amg.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3448 by gross, Tue Jan 18 05:38:48 2011 UTC revision 3449 by gross, Fri Jan 21 05:48:15 2011 UTC
# Line 40  from esys.escript import * Line 40  from esys.escript import *
40  from esys.finley import Rectangle,Brick  from esys.finley import Rectangle,Brick
41  from esys.escript.linearPDEs import LinearPDE, SolverOptions  from esys.escript.linearPDEs import LinearPDE, SolverOptions
42  import numpy  import numpy
43  OPTIMIZE=True  OPTIMIZE=True # and False
44  SOLVER_VERBOSE=True  SOLVER_VERBOSE=True and False
45    
46    MIN_MATRIX_SIZE=1
47    MIN_SPARSITY=1.
48  MIN_MATRIX_SIZE=None  MIN_MATRIX_SIZE=None
49  MIN_SPARSITY=None  MIN_SPARSITY=None
50  MAX_LEVEL=None  MAX_LEVEL=None
# Line 56  FINLEY_TEST_MESH_PATH=os.path.join(FINLE Line 58  FINLEY_TEST_MESH_PATH=os.path.join(FINLE
58    
59  # number of elements in the spatial directions  # number of elements in the spatial directions
60  NE_TOTAL=4096  NE_TOTAL=4096
61    #NE_TOTAL=4
62    
63  class Test_AMG(unittest.TestCase):  class Test_AMG(unittest.TestCase):
64    
# Line 77  class Test_AMG(unittest.TestCase): Line 80  class Test_AMG(unittest.TestCase):
80          # -------- get the solution ---------------------------          # -------- get the solution ---------------------------
81          pde.getSolverOptions().setTolerance(self.SOLVER_TOL)          pde.getSolverOptions().setTolerance(self.SOLVER_TOL)
82          pde.getSolverOptions().setSolverMethod(SolverOptions.PCG)          pde.getSolverOptions().setSolverMethod(SolverOptions.PCG)
83          #if (USE_AMG): pde.getSolverOptions().setPreconditioner(SolverOptions.AMG)          if (USE_AMG): pde.getSolverOptions().setPreconditioner(SolverOptions.AMG)
84          pde.getSolverOptions().setVerbosity(SOLVER_VERBOSE)          pde.getSolverOptions().setVerbosity(SOLVER_VERBOSE)
85          if MIN_MATRIX_SIZE!= None: pde.getSolverOptions().setMinCoarseMatrixSize(MIN_MATRIX_SIZE)          if MIN_MATRIX_SIZE!= None: pde.getSolverOptions().setMinCoarseMatrixSize(MIN_MATRIX_SIZE)
86          if MIN_SPARSITY!=None: pde.getSolverOptions().setMinCoarseMatrixSparsity(MIN_SPARSITY)          if MIN_SPARSITY!=None: pde.getSolverOptions().setMinCoarseMatrixSparsity(MIN_SPARSITY)
# Line 798  if __name__ == '__main__': Line 801  if __name__ == '__main__':
801     suite = unittest.TestSuite()     suite = unittest.TestSuite()
802     suite.addTest(unittest.makeSuite(Test_AMGOnFinleyHex2DOrder1))     suite.addTest(unittest.makeSuite(Test_AMGOnFinleyHex2DOrder1))
803     suite.addTest(unittest.makeSuite(Test_AMGOnFinleyHex3DOrder1))     suite.addTest(unittest.makeSuite(Test_AMGOnFinleyHex3DOrder1))
804     #suite.addTest(Test_AMGOnFinleyHex2DOrder1("test_WeakCoupled4"))     # suite.addTest(Test_AMGOnFinleyHex3DOrder1("test_Poisson4"))
805       # suite.addTest(Test_AMGOnFinleyHex2DOrder1("test_WeakCoupled4"))
806    
807     s=unittest.TextTestRunner(verbosity=2).run(suite)     s=unittest.TextTestRunner(verbosity=2).run(suite)
808     if not s.wasSuccessful(): sys.exit(12)     if not s.wasSuccessful(): sys.exit(12)

Legend:
Removed from v.3448  
changed lines
  Added in v.3449

  ViewVC Help
Powered by ViewVC 1.1.26