/[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 3891 by jfenwick, Thu Mar 1 05:34:52 2012 UTC revision 3892 by jfenwick, Tue Apr 10 08:57:23 2012 UTC
# Line 56  class SolverOptions(object): Line 56  class SolverOptions(object):
56      ::      ::
57            
58        opts=SolverOptions()        opts=SolverOptions()
59        print opts        print(opts)
60        opts.resetDiagnostics()        opts.resetDiagnostics()
61        u=solver(opts)        u=solver(opts)
62        print "number of iteration steps: =",opts.getDiagnostics("num_iter")        print("number of iteration steps: =",opts.getDiagnostics("num_iter"))
63    
64      :cvar DEFAULT: The default method used to solve the system of linear equations      :cvar DEFAULT: The default method used to solve the system of linear equations
65      :cvar DIRECT: The direct solver based on LDU factorization      :cvar DIRECT: The direct solver based on LDU factorization
# Line 618  class SolverOptions(object): Line 618  class SolverOptions(object):
618    
619          :rtype: ``int`` or ``None``          :rtype: ``int`` or ``None``
620          """          """
621          if self.__restart < 0:          if (self.__restart is None) or (self.__restart < 0):
622              return None              return None
623          else:          else:
624              return self.__restart              return self.__restart
# Line 1481  class PDECoef(object): Line 1481  class PDECoef(object):
1481            for u in range(num):            for u in range(num):
1482               for e in range(num):               for e in range(num):
1483                  search.append((e,u))                  search.append((e,u))
1484            search.sort(self.__CompTuple2)            search.sort(key=lambda x: -(x[0]+x[1]))
1485            for item in search:            for item in search:
1486               s=self.getShape(domain,item[0],item[1])               s=self.getShape(domain,item[0],item[1])
1487               if len(s)==0 and len(shape)==0:               if len(s)==0 and len(shape)==0:

Legend:
Removed from v.3891  
changed lines
  Added in v.3892

  ViewVC Help
Powered by ViewVC 1.1.26