/[escript]/trunk/escript/py_src/flows.py
ViewVC logotype

Diff of /trunk/escript/py_src/flows.py

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

revision 1672 by gross, Mon Jul 21 22:08:27 2008 UTC revision 1673 by gross, Thu Jul 24 22:28:50 2008 UTC
# Line 92  class StokesProblemCartesian_DC(Homogene Line 92  class StokesProblemCartesian_DC(Homogene
92    
93        def inner(self,p0,p1):        def inner(self,p0,p1):
94           return util.integrate(p0*p1)           return util.integrate(p0*p1)
95             # return util.integrate(1/self.__inv_eta**2*p0*p1)
96    
97        def getStress(self,u):        def getStress(self,u):
98           mg=util.grad(u)           mg=util.grad(u)
# Line 124  class StokesProblemCartesian_DC(Homogene Line 125  class StokesProblemCartesian_DC(Homogene
125                return True                return True
126            else:            else:
127                return False                return False
128          def stoppingcriterium2(self,norm_r,norm_b,solver='GMRES',TOL=None):
129          if TOL==None:
130                 TOL=self.getTolerance()
131              if self.verbose: print "%s step %s: L2(r) = %s, L2(b)*TOL=%s"%(solver,self.iter,norm_r,norm_b*TOL)
132              self.iter+=1
133              
134              if norm_r <= norm_b*TOL:
135                  if self.verbose: print "%s terminated after %s steps."%(solver,self.iter)
136                  return True
137              else:
138                  return False
139    
140    
141  class StokesProblemCartesian(HomogeneousSaddlePointProblem):  class StokesProblemCartesian(HomogeneousSaddlePointProblem):

Legend:
Removed from v.1672  
changed lines
  Added in v.1673

  ViewVC Help
Powered by ViewVC 1.1.26