/[escript]/branches/symbolic_from_3470/escript/py_src/linearPDEs.py
ViewVC logotype

Diff of /branches/symbolic_from_3470/escript/py_src/linearPDEs.py

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

revision 2759 by gross, Tue Nov 17 07:32:59 2009 UTC revision 2760 by artak, Thu Nov 19 05:22:45 2009 UTC
# Line 81  class SolverOptions(object): Line 81  class SolverOptions(object):
81      :cvar NESTED_DISSECTION: Reorder matrix to improve load balancing during factorization      :cvar NESTED_DISSECTION: Reorder matrix to improve load balancing during factorization
82      :cvar PASO: PASO solver package      :cvar PASO: PASO solver package
83      :cvar SCSL: SGI SCSL solver library      :cvar SCSL: SGI SCSL solver library
84      :cvar MKL: Intel's MKL solver library.  If the stiffness matrix is non-regular MKL may return without returning a proper error code. If you observe suspicious solutions when using MKL, this may cause by a non-invertible operator.      :cvar MKL: Intel's MKL solver library
85      :cvar UMFPACK: The UMFPACK library      :cvar UMFPACK: The UMFPACK library
86      :cvar TRILINOS: The TRILINOS parallel solver class library from Sandia National Labs      :cvar TRILINOS: The TRILINOS parallel solver class library from Sandia National Labs
87      :cvar ITERATIVE: The default iterative solver      :cvar ITERATIVE: The default iterative solver
88      :cvar AMG: Algebraic Multi Grid      :cvar AMG: Algebraic Multi Grid
89        :cvar AMLI: Algebraic Multi Level Iteration
90      :cvar REC_ILU: recursive ILU0      :cvar REC_ILU: recursive ILU0
91      :cvar RILU: relaxed ILU0      :cvar RILU: relaxed ILU0
92      :cvar GAUSS_SEIDEL: Gauss-Seidel solver      :cvar GAUSS_SEIDEL: Gauss-Seidel solver
93      :cvar DEFAULT_REORDERING: the reordering method recommended by the solver      :cvar DEFAULT_REORDERING: the reordering method recommended by the solver
94      :cvar SUPER_LU: the Super_LU solver package      :cvar SUPER_LU: the Super_LU solver package
95      :cvar PASTIX: the Pastix direct solver_package      :cvar PASTIX: the Pastix direct solver_package
96      :cvar YAIR_SHAPIRA_COARSENING: AMG coarsening method by Yair-Shapira      :cvar YAIR_SHAPIRA_COARSENING: AMLI coarsening method by Yair-Shapira
97      :cvar RUGE_STUEBEN_COARSENING: AMG coarsening method by Ruge and Stueben      :cvar RUGE_STUEBEN_COARSENING: AMLI coarsening method by Ruge and Stueben
98      :cvar AGGREGATION_COARSENING: AMG coarsening using (symmetric) aggregation      :cvar AGGREGATION_COARSENING: AMLI coarsening using (symmetric) aggregation
99      :cvar MIN_COARSE_MATRIX_SIZE: minimum size of the coarsest level matrix to use direct solver.      :cvar MIN_COARSE_MATRIX_SIZE: minimum size of the coarsest level matrix to use direct solver.
100      :cvar NO_PRECONDITIONER: no preconditioner is applied.      :cvar NO_PRECONDITIONER: no preconditioner is applied.
101      """      """
# Line 135  class SolverOptions(object): Line 136  class SolverOptions(object):
136      AGGREGATION_COARSENING=35      AGGREGATION_COARSENING=35
137      NO_PRECONDITIONER=36      NO_PRECONDITIONER=36
138      MIN_COARSE_MATRIX_SIZE=37      MIN_COARSE_MATRIX_SIZE=37
139            AMLI=38    
140    
141      def __init__(self):      def __init__(self):
142          self.setLevelMax()          self.setLevelMax()
143          self.setCoarseningThreshold()          self.setCoarseningThreshold()
# Line 197  class SolverOptions(object): Line 199  class SolverOptions(object):
199                  out+="\nCoarsening threshold = %e"%self.getMinCoarseMatrixSize()                  out+="\nCoarsening threshold = %e"%self.getMinCoarseMatrixSize()
200                  out+="\nMinimum size of the coarsest level matrix = %e"%self.getCoarseningThreshold()                  out+="\nMinimum size of the coarsest level matrix = %e"%self.getCoarseningThreshold()
201                  out+="\nNumber of pre / post sweeps = %s / %s, %s"%(self.getNumPreSweeps(), self.getNumPostSweeps(), self.getNumSweeps())                  out+="\nNumber of pre / post sweeps = %s / %s, %s"%(self.getNumPreSweeps(), self.getNumPostSweeps(), self.getNumSweeps())
202              if self.getPreconditioner() == self.GAUSS_SEIDEL:              if self.getPreconditioner() == self.AMLI:
203                    out+="\nMaximum number of levels = %s"%self.LevelMax()
204                    out+="\nCoarsening method = %s"%self.getName(self.getCoarsening())
205                    out+="\nCoarsening threshold = %e"%self.getMinCoarseMatrixSize()
206                    out+="\nMinimum size of the coarsest level matrix = %e"%self.getCoarseningThreshold()
207                    out+="\nNumber of pre / post sweeps = %s / %s, %s"%(self.getNumPreSweeps(), self.getNumPostSweeps(), self.getNumSweeps())
208            if self.getPreconditioner() == self.GAUSS_SEIDEL:
209                  out+="\nNumber of sweeps = %s"%self.getNumSweeps()                  out+="\nNumber of sweeps = %s"%self.getNumSweeps()
210              if self.getPreconditioner() == self.ILUT:              if self.getPreconditioner() == self.ILUT:
211                  out+="\nDrop tolerance = %e"%self.getDropTolerance()                  out+="\nDrop tolerance = %e"%self.getDropTolerance()
# Line 234  class SolverOptions(object): Line 242  class SolverOptions(object):
242          if key == self.ITERATIVE: return "ITERATIVE"          if key == self.ITERATIVE: return "ITERATIVE"
243          if key == self.PASO: return "PASO"          if key == self.PASO: return "PASO"
244          if key == self.AMG: return "AMG"          if key == self.AMG: return "AMG"
245            if key == self.AMLI: return "AMLI"
246          if key == self.REC_ILU: return "REC_ILU"          if key == self.REC_ILU: return "REC_ILU"
247          if key == self.TRILINOS: return "TRILINOS"          if key == self.TRILINOS: return "TRILINOS"
248          if key == self.NONLINEAR_GMRES: return "NONLINEAR_GMRES"          if key == self.NONLINEAR_GMRES: return "NONLINEAR_GMRES"
# Line 395  class SolverOptions(object): Line 404  class SolverOptions(object):
404    
405          :param preconditioner: key of the preconditioner to be used.          :param preconditioner: key of the preconditioner to be used.
406          :type preconditioner: in `SolverOptions.SSOR`, `SolverOptions.ILU0`, `SolverOptions.ILUT`, `SolverOptions.JACOBI`,          :type preconditioner: in `SolverOptions.SSOR`, `SolverOptions.ILU0`, `SolverOptions.ILUT`, `SolverOptions.JACOBI`,
407                                      `SolverOptions.AMG`, `SolverOptions.REC_ILU`, `SolverOptions.GAUSS_SEIDEL`, `SolverOptions.RILU`,                                      `SolverOptions.AMG`, `SolverOptions.AMLI`, `SolverOptions.REC_ILU`, `SolverOptions.GAUSS_SEIDEL`, `SolverOptions.RILU`,
408                                      `SolverOptions.NO_PRECONDITIONER`                                      `SolverOptions.NO_PRECONDITIONER`
409          :note: Not all packages support all preconditioner. It can be assumed that a package makes a reasonable choice if it encounters an unknown preconditioner.          :note: Not all packages support all preconditioner. It can be assumed that a package makes a reasonable choice if it encounters an unknown preconditioner.
410          """          """
411      if preconditioner==None: preconditioner=10      if preconditioner==None: preconditioner=10
412          if not preconditioner in [ SolverOptions.SSOR, SolverOptions.ILU0, SolverOptions.ILUT, SolverOptions.JACOBI,          if not preconditioner in [ SolverOptions.SSOR, SolverOptions.ILU0, SolverOptions.ILUT, SolverOptions.JACOBI,
413                                      SolverOptions.AMG, SolverOptions.REC_ILU, SolverOptions.GAUSS_SEIDEL, SolverOptions.RILU,                                      SolverOptions.AMG, SolverOptions.AMLI, SolverOptions.REC_ILU, SolverOptions.GAUSS_SEIDEL, SolverOptions.RILU,
414                                      SolverOptions.NO_PRECONDITIONER] :                                      SolverOptions.NO_PRECONDITIONER] :
415               raise ValueError,"unknown preconditioner %s"%preconditioner               raise ValueError,"unknown preconditioner %s"%preconditioner
416          self.__preconditioner=preconditioner              self.__preconditioner=preconditioner    

Legend:
Removed from v.2759  
changed lines
  Added in v.2760

  ViewVC Help
Powered by ViewVC 1.1.26