# Diff of /trunk/escriptcore/py_src/flows.py

revision 1467 by gross, Wed Apr 2 08:10:37 2008 UTC revision 1481 by artak, Wed Apr 9 00:45:47 2008 UTC
# Line 105  class StokesProblemCartesian(Homogeneous Line 105  class StokesProblemCartesian(Homogeneous
106           """           """
107           self.__pde_u.setTolerance(self.getSubProblemTolerance())           self.__pde_u.setTolerance(self.getSubProblemTolerance())
108           self.__pde_u.setValue(X=-self.getStress(u)+p*util.kronecker(self.domain))           self.__pde_u.setValue(X=-self.getStress(u)-p*util.kronecker(self.domain))
109           return  self.__pde_u.getSolution(verbose=self.show_details)           return  self.__pde_u.getSolution(verbose=self.show_details)
110
111        def solve_prec(self,p):        def solve_prec(self,p):
# Line 131  class StokesProblemCartesian(Homogeneous Line 131  class StokesProblemCartesian(Homogeneous
131                return True                return True
132            else:            else:
133                return False                return False
134
135          def stoppingcriterium_MINRES(self,norm_r,norm_Ax):
136              if self.verbose: print "MINRES step %s: L2(r) = %s, L2(b)*TOL=%s"%(self.iter,norm_r,norm_Ax*self.getTolerance())
137              self.iter+=1
138              if norm_r <= norm_Ax*self.getTolerance():
139                  if self.verbose: print "MINRES terminated after %s steps."%self.iter
140                  return True
141              else:
142                  return False

Legend:
 Removed from v.1467 changed lines Added in v.1481