--- branches/windows_from_1456_trunk_1522_merged_in/escript/py_src/pdetools.py 2008/05/01 03:09:42 1544 +++ branches/windows_from_1456_trunk_1522_merged_in/escript/py_src/pdetools.py 2008/05/01 07:08:20 1545 @@ -474,7 +474,7 @@ """ self.history.append(norm_r) - if self.verbose: print "iter: #s: inner(rhat,r) = #e"#(len(self.history)-1, self.history[-1]) + if self.verbose: print "iter: %s: inner(rhat,r) = %e"%(len(self.history)-1, self.history[-1]) return self.history[-1]<=self.tolerance * self.history[0] def stoppingcriterium2(self,norm_r,norm_b,solver="GMRES",TOL=None): @@ -493,7 +493,7 @@ if TOL==None: TOL=self.tolerance self.history.append(norm_r) - if self.verbose: print "iter: #s: norm(r) = #e"#(len(self.history)-1, self.history[-1]) + if self.verbose: print "iter: %s: norm(r) = %e"%(len(self.history)-1, self.history[-1]) return self.history[-1]<=TOL * norm_b def PCG(b, Aprod, Msolve, bilinearform, stoppingcriterium, x=None, iter_max=100): @@ -1483,7 +1483,7 @@ @param text: a text message @type text: C{str} """ - if self.__verbose: print "#s: #s"%(str(self),text) + if self.__verbose: print "%s: %s"%(str(self),text) def solve_f(self,u,p,tol=1.e-8): """ @@ -1633,8 +1633,8 @@ norm_u_new = util.Lsup(u_new) p_new=p+self.relaxation*g_new norm_p_new = util.sqrt(self.inner(p_new,p_new)) - self.trace("%s th step: f = %s, f/u = %s, g = %s, g/p = %s, relaxation = %s."%(self.iter, norm_f_new ,norm_f_new/norm_u_new, norm_g_new, norm_g_new/norm_p_new, self.relaxation)) + self.trace("step %d: f = %e, f/u = %e, g = %e, g/p = %e, relaxation = %e."%(self.iter, norm_f_new ,norm_f_new/norm_u_new, norm_g_new, norm_g_new/norm_p_new, self.relaxation)) if self.iter>1: dg2=g_new-g df2=f_new-f