# Diff of /trunk/escript/py_src/pdetools.py

revision 1553 by gross, Thu May 8 08:52:41 2008 UTC revision 1554 by artak, Fri May 9 02:50:49 2008 UTC
# Line 1275  class ArithmeticTuple(object): Line 1275  class ArithmeticTuple(object):
1275         @param other: increment         @param other: increment
1276         @type other: C{ArithmeticTuple}         @type other: C{ArithmeticTuple}
1277         """         """
1278         if not isinstance(other,float):  #      if not isinstance(other,float):
1279          if len(self) != len(other):         if len(self) != len(other):
1280             raise ValueError,"tuple length must match."            raise ValueError,"tuple length must match."
1281          for i in range(len(self)):         for i in range(len(self)):
1282             self.__items[i]+=other[i]            self.__items[i]+=other[i]
1283         else:  #       else:
1284          for i in range(len(self)):  #        for i in range(len(self)):
1285             self.__items[i]+=other  #           self.__items[i]+=other
1286
1287         return self         return self
1288
1507
1508        pc=x[1]        pc=x[1]
1509            v=self.solve_A(self.__z,-pc)            v=self.solve_A(self.__z,-pc)
1510        p=self.solve_prec(self.B(v))        p=self.solve_prec1(self.B(v))
1511
1512            return ArithmeticTuple(v,p)            return ArithmeticTuple(v,p)
1513
1529            #solve Av =-B^*p as Av =f-Az-B^*p            #solve Av =-B^*p as Av =f-Az-B^*p
1530            pc=x[1]            pc=x[1]
1531        v=self.solve_A(self.__z,-pc)        v=self.solve_A(self.__z,-pc)
1532            p=self.solve_prec(self.B(v-self.__z))            p=self.solve_prec1(self.B(v-self.__z))
1533            return ArithmeticTuple(v,p)            return ArithmeticTuple(v,p)
1534

Legend:
 Removed from v.1553 changed lines Added in v.1554