/[escript]/trunk/escript/py_src/linearPDEs.py
ViewVC logotype

Diff of /trunk/escript/py_src/linearPDEs.py

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

revision 1552 by gross, Thu May 8 08:52:41 2008 UTC revision 1819 by artak, Tue Sep 30 05:58:06 2008 UTC
# Line 1  Line 1 
1    
2    ########################################################
3  #  #
4  # $Id$  # Copyright (c) 2003-2008 by University of Queensland
5  #  # Earth Systems Science Computational Center (ESSCC)
6  #######################################################  # http://www.uq.edu.au/esscc
 #  
 #           Copyright 2003-2007 by ACceSS MNRF  
 #       Copyright 2007 by University of Queensland  
 #  
 #                http://esscc.uq.edu.au  
 #        Primary Business: Queensland, Australia  
 #  Licensed under the Open Software License version 3.0  
 #     http://www.opensource.org/licenses/osl-3.0.php  
7  #  #
8  #######################################################  # Primary Business: Queensland, Australia
9    # Licensed under the Open Software License version 3.0
10    # http://www.opensource.org/licenses/osl-3.0.php
11  #  #
12    ########################################################
13    
14    __copyright__="""Copyright (c) 2003-2008 by University of Queensland
15    Earth Systems Science Computational Center (ESSCC)
16    http://www.uq.edu.au/esscc
17    Primary Business: Queensland, Australia"""
18    __license__="""Licensed under the Open Software License version 3.0
19    http://www.opensource.org/licenses/osl-3.0.php"""
20    __url__="http://www.uq.edu.au/esscc/escript-finley"
21    
22  """  """
23  The module provides an interface to define and solve linear partial  The module provides an interface to define and solve linear partial
# Line 40  import util Line 45  import util
45  import numarray  import numarray
46    
47  __author__="Lutz Gross, l.gross@uq.edu.au"  __author__="Lutz Gross, l.gross@uq.edu.au"
 __copyright__="""  Copyright (c) 2006 by ACcESS MNRF  
                     http://www.access.edu.au  
                 Primary Business: Queensland, Australia"""  
 __license__="""Licensed under the Open Software License version 3.0  
              http://www.opensource.org/licenses/osl-3.0.php"""  
 __url__="http://www.iservo.edu.au/esys"  
 __version__="$Revision$"  
 __date__="$Date$"  
48    
49    
50  class IllegalCoefficient(ValueError):  class IllegalCoefficient(ValueError):
# Line 445  class LinearPDE(object): Line 442  class LinearPDE(object):
442     @cvar CR: The conjugate residual method     @cvar CR: The conjugate residual method
443     @cvar CGS: The conjugate gardient square method     @cvar CGS: The conjugate gardient square method
444     @cvar BICGSTAB: The stabilized BiConjugate Gradient method.     @cvar BICGSTAB: The stabilized BiConjugate Gradient method.
445       @cvar TFQMR: Transport Free Quasi Minimal Residual method.
446       @cvar MINRES: Minimum residual method.
447     @cvar SSOR: The symmetric overrealaxtion method     @cvar SSOR: The symmetric overrealaxtion method
448     @cvar ILU0: The incomplete LU factorization preconditioner  with no fill in     @cvar ILU0: The incomplete LU factorization preconditioner  with no fill in
449     @cvar ILUT: The incomplete LU factorization preconditioner with will in     @cvar ILUT: The incomplete LU factorization preconditioner with will in
# Line 463  class LinearPDE(object): Line 462  class LinearPDE(object):
462     @cvar ITERATIVE: The default iterative solver     @cvar ITERATIVE: The default iterative solver
463     @cvar AMG: algebraic multi grid     @cvar AMG: algebraic multi grid
464     @cvar RILU: recursive ILU     @cvar RILU: recursive ILU
465       @cvar GS: Gauss-Seidel solver
466    
467     """     """
468     DEFAULT= 0     DEFAULT= 0
# Line 490  class LinearPDE(object): Line 490  class LinearPDE(object):
490     AMG= 22     AMG= 22
491     RILU = 23     RILU = 23
492     TRILINOS = 24     TRILINOS = 24
493       NONLINEAR_GMRES = 25
494       TFQMR = 26
495       MINRES = 27
496       GS=28
497    
498     SMALL_TOLERANCE=1.e-13     SMALL_TOLERANCE=1.e-13
499     __PACKAGE_KEY="package"     __PACKAGE_KEY="package"
# Line 948  class LinearPDE(object): Line 952  class LinearPDE(object):
952         sets a new solver         sets a new solver
953    
954         @param solver: sets a new solver method.         @param solver: sets a new solver method.
955         @type solver: one of L{DEFAULT}, L{ITERATIVE} L{DIRECT}, L{CHOLEVSKY}, L{PCG}, L{CR}, L{CGS}, L{BICGSTAB}, L{SSOR}, L{GMRES}, L{PRES20}, L{LUMPING}, L{AMG}         @type solver: one of L{DEFAULT}, L{ITERATIVE} L{DIRECT}, L{CHOLEVSKY}, L{PCG}, L{CR}, L{CGS}, L{BICGSTAB}, L{SSOR}, L{GMRES}, L{TFQMR}, L{MINRES}, L{PRES20}, L{LUMPING}, L{AMG}
956         @param preconditioner: sets a new solver method.         @param preconditioner: sets a new solver method.
957         @type preconditioner: one of L{DEFAULT}, L{JACOBI} L{ILU0}, L{ILUT},L{SSOR}, L{RILU}         @type preconditioner: one of L{DEFAULT}, L{JACOBI} L{ILU0}, L{ILUT},L{SSOR}, L{RILU},  L{GS}
958         """         """
959         if solver==None: solver=self.__solver_method         if solver==None: solver=self.__solver_method
960         if preconditioner==None: preconditioner=self.__preconditioner         if preconditioner==None: preconditioner=self.__preconditioner
# Line 978  class LinearPDE(object): Line 982  class LinearPDE(object):
982         elif m[0]==self.ITERATIVE: method= "ITERATIVE"         elif m[0]==self.ITERATIVE: method= "ITERATIVE"
983         elif m[0]==self.CHOLEVSKY: method= "CHOLEVSKY"         elif m[0]==self.CHOLEVSKY: method= "CHOLEVSKY"
984         elif m[0]==self.PCG: method= "PCG"         elif m[0]==self.PCG: method= "PCG"
985           elif m[0]==self.TFQMR: method= "TFQMR"
986           elif m[0]==self.MINRES: method= "MINRES"
987         elif m[0]==self.CR: method= "CR"         elif m[0]==self.CR: method= "CR"
988         elif m[0]==self.CGS: method= "CGS"         elif m[0]==self.CGS: method= "CGS"
989         elif m[0]==self.BICGSTAB: method= "BICGSTAB"         elif m[0]==self.BICGSTAB: method= "BICGSTAB"
# Line 993  class LinearPDE(object): Line 999  class LinearPDE(object):
999         elif m[1]==self.SSOR: method+= "+SSOR"         elif m[1]==self.SSOR: method+= "+SSOR"
1000         elif m[1]==self.AMG: method+= "+AMG"         elif m[1]==self.AMG: method+= "+AMG"
1001         elif m[1]==self.RILU: method+= "+RILU"         elif m[1]==self.RILU: method+= "+RILU"
1002           elif m[1]==self.GS: method+= "+GS"
1003         if p==self.DEFAULT: package="DEFAULT"         if p==self.DEFAULT: package="DEFAULT"
1004         elif p==self.PASO: package= "PASO"         elif p==self.PASO: package= "PASO"
1005         elif p==self.MKL: package= "MKL"         elif p==self.MKL: package= "MKL"
# Line 1747  class LinearPDE(object): Line 1754  class LinearPDE(object):
1754                      d_reduced_times_e=escript.Data()                      d_reduced_times_e=escript.Data()
1755    
1756                   self.__operator=self.__getNewRightHandSide()                   self.__operator=self.__getNewRightHandSide()
1757                   if hasattr(self.getDomain(), "addPDEToLumpedSystem") :                   if False and hasattr(self.getDomain(), "addPDEToLumpedSystem") :
1758                      self.getDomain().addPDEToLumpedSystem(self.__operator, D_times_e, d_times_e)                      self.getDomain().addPDEToLumpedSystem(self.__operator, D_times_e, d_times_e)
1759                      self.getDomain().addPDEToLumpedSystem(self.__operator, D_reduced_times_e, d_reduced_times_e)                      self.getDomain().addPDEToLumpedSystem(self.__operator, D_reduced_times_e, d_reduced_times_e)
1760                   else:                   else:

Legend:
Removed from v.1552  
changed lines
  Added in v.1819

  ViewVC Help
Powered by ViewVC 1.1.26