/[escript]/trunk/finley/test/python/run_models.py
ViewVC logotype

Diff of /trunk/finley/test/python/run_models.py

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

revision 2473 by gross, Fri May 29 03:23:25 2009 UTC revision 2474 by gross, Tue Jun 16 06:32:15 2009 UTC
# Line 34  except KeyError: Line 34  except KeyError:
34    
35    
36  VERBOSE=False # or True  VERBOSE=False # or True
 DETAIL_VERBOSE=False  
37    
38  from esys.escript import *  from esys.escript import *
39  from esys.escript.models import StokesProblemCartesian, PowerLaw, IncompressibleIsotropicFlowCartesian  from esys.escript.models import StokesProblemCartesian, PowerLaw, IncompressibleIsotropicFlowCartesian
# Line 68  class Test_StokesProblemCartesian2D(unit Line 67  class Test_StokesProblemCartesian2D(unit
67         u0=(1-x[0])*x[0]*[0.,1.]         u0=(1-x[0])*x[0]*[0.,1.]
68         p0=Scalar(-P1,ReducedSolution(self.domain))         p0=Scalar(-P1,ReducedSolution(self.domain))
69         sp.setTolerance(self.TOL)         sp.setTolerance(self.TOL)
70         u,p=sp.solve(u0,p0,show_details=DETAIL_VERBOSE, verbose=VERBOSE,max_iter=100,usePCG=True)         u,p=sp.solve(u0,p0,verbose=VERBOSE,max_iter=100,usePCG=True)
71                
72         error_v0=Lsup(u[0]-u0[0])         error_v0=Lsup(u[0]-u0[0])
73         error_v1=Lsup(u[1]-u0[1])/0.25         error_v1=Lsup(u[1]-u0[1])/0.25
# Line 94  class Test_StokesProblemCartesian2D(unit Line 93  class Test_StokesProblemCartesian2D(unit
93         u0=(1-x[0])*x[0]*[0.,1.]         u0=(1-x[0])*x[0]*[0.,1.]
94         p0=Scalar(-P1,ReducedSolution(self.domain))         p0=Scalar(-P1,ReducedSolution(self.domain))
95         sp.setTolerance(self.TOL*0.2)         sp.setTolerance(self.TOL*0.2)
96         u,p=sp.solve(u0,p0,show_details=DETAIL_VERBOSE, verbose=VERBOSE,max_iter=100,usePCG=True)         u,p=sp.solve(u0,p0, verbose=VERBOSE,max_iter=100,usePCG=True)
97         error_v0=Lsup(u[0]-u0[0])         error_v0=Lsup(u[0]-u0[0])
98         error_v1=Lsup(u[1]-u0[1])/0.25         error_v1=Lsup(u[1]-u0[1])/0.25
99         error_p=Lsup(P1*x[0]*x[1]+p)         error_p=Lsup(P1*x[0]*x[1]+p)
# Line 119  class Test_StokesProblemCartesian2D(unit Line 118  class Test_StokesProblemCartesian2D(unit
118         u0=(1-x[0])*x[0]*[0.,1.]         u0=(1-x[0])*x[0]*[0.,1.]
119         p0=Scalar(-P1,ReducedSolution(self.domain))         p0=Scalar(-P1,ReducedSolution(self.domain))
120         sp.setTolerance(self.TOL)         sp.setTolerance(self.TOL)
121         u,p=sp.solve(u0,p0,show_details=DETAIL_VERBOSE, verbose=VERBOSE,max_iter=100,usePCG=True)         u,p=sp.solve(u0,p0, verbose=VERBOSE,max_iter=100,usePCG=True)
122                
123         error_v0=Lsup(u[0]-u0[0])         error_v0=Lsup(u[0]-u0[0])
124         error_v1=Lsup(u[1]-u0[1])/0.25         error_v1=Lsup(u[1]-u0[1])/0.25
# Line 145  class Test_StokesProblemCartesian2D(unit Line 144  class Test_StokesProblemCartesian2D(unit
144         u0=(1-x[0])*x[0]*[0.,1.]         u0=(1-x[0])*x[0]*[0.,1.]
145         p0=Scalar(-P1,ReducedSolution(self.domain))         p0=Scalar(-P1,ReducedSolution(self.domain))
146         sp.setTolerance(self.TOL)         sp.setTolerance(self.TOL)
147         u,p=sp.solve(u0,p0,show_details=DETAIL_VERBOSE, verbose=VERBOSE,max_iter=50,usePCG=False,iter_restart=18)         u,p=sp.solve(u0,p0, verbose=VERBOSE,max_iter=50,usePCG=False,iter_restart=18)
148                
149         error_v0=Lsup(u[0]-u0[0])         error_v0=Lsup(u[0]-u0[0])
150         error_v1=Lsup(u[1]-u0[1])/0.25         error_v1=Lsup(u[1]-u0[1])/0.25
# Line 171  class Test_StokesProblemCartesian2D(unit Line 170  class Test_StokesProblemCartesian2D(unit
170         u0=(1-x[0])*x[0]*[0.,1.]         u0=(1-x[0])*x[0]*[0.,1.]
171         p0=Scalar(-P1,ReducedSolution(self.domain))         p0=Scalar(-P1,ReducedSolution(self.domain))
172         sp.setTolerance(self.TOL*0.1)         sp.setTolerance(self.TOL*0.1)
173         u,p=sp.solve(u0,p0,show_details=DETAIL_VERBOSE, verbose=VERBOSE,max_iter=20,usePCG=False)         u,p=sp.solve(u0,p0, verbose=VERBOSE,max_iter=20,usePCG=False)
174                
175         error_v0=Lsup(u[0]-u0[0])         error_v0=Lsup(u[0]-u0[0])
176         error_v1=Lsup(u[1]-u0[1])/0.25         error_v1=Lsup(u[1]-u0[1])/0.25
# Line 197  class Test_StokesProblemCartesian2D(unit Line 196  class Test_StokesProblemCartesian2D(unit
196         u0=(1-x[0])*x[0]*[0.,1.]         u0=(1-x[0])*x[0]*[0.,1.]
197         p0=Scalar(-P1,ReducedSolution(self.domain))         p0=Scalar(-P1,ReducedSolution(self.domain))
198         sp.setTolerance(self.TOL)         sp.setTolerance(self.TOL)
199         u,p=sp.solve(u0,p0,show_details=DETAIL_VERBOSE, verbose=VERBOSE,max_iter=100,usePCG=False)         u,p=sp.solve(u0,p0, verbose=VERBOSE,max_iter=100,usePCG=False)
200                
201         error_v0=Lsup(u[0]-u0[0])         error_v0=Lsup(u[0]-u0[0])
202         error_v1=Lsup(u[1]-u0[1])/0.25         error_v1=Lsup(u[1]-u0[1])/0.25
# Line 234  class Test_StokesProblemCartesian3D(unit Line 233  class Test_StokesProblemCartesian3D(unit
233         u0=(1-x[0])*x[0]*(1-x[1])*x[1]*[0.,0.,1.]         u0=(1-x[0])*x[0]*(1-x[1])*x[1]*[0.,0.,1.]
234         p0=Scalar(-P1,ReducedSolution(self.domain))         p0=Scalar(-P1,ReducedSolution(self.domain))
235         sp.setTolerance(self.TOL)         sp.setTolerance(self.TOL)
236         u,p=sp.solve(u0,p0,show_details=DETAIL_VERBOSE, verbose=VERBOSE ,max_iter=100,usePCG=True)         u,p=sp.solve(u0,p0, verbose=VERBOSE ,max_iter=100,usePCG=True)
237                
238         error_v0=Lsup(u[0]-u0[0])         error_v0=Lsup(u[0]-u0[0])
239         error_v1=Lsup(u[1]-u0[1])         error_v1=Lsup(u[1]-u0[1])
# Line 265  class Test_StokesProblemCartesian3D(unit Line 264  class Test_StokesProblemCartesian3D(unit
264         u0=(1-x[0])*x[0]*(1-x[1])*x[1]*[0.,0.,1.]         u0=(1-x[0])*x[0]*(1-x[1])*x[1]*[0.,0.,1.]
265         p0=Scalar(-P1,ReducedSolution(self.domain))         p0=Scalar(-P1,ReducedSolution(self.domain))
266         sp.setTolerance(self.TOL*0.1)         sp.setTolerance(self.TOL*0.1)
267         u,p=sp.solve(u0,p0,show_details=DETAIL_VERBOSE, verbose=VERBOSE ,max_iter=100,usePCG=True)         u,p=sp.solve(u0,p0, verbose=VERBOSE ,max_iter=100,usePCG=True)
268         error_v0=Lsup(u[0]-u0[0])         error_v0=Lsup(u[0]-u0[0])
269         error_v1=Lsup(u[1]-u0[1])         error_v1=Lsup(u[1]-u0[1])
270         error_v2=Lsup(u[2]-u0[2])/0.25**2         error_v2=Lsup(u[2]-u0[2])/0.25**2
# Line 295  class Test_StokesProblemCartesian3D(unit Line 294  class Test_StokesProblemCartesian3D(unit
294         u0=(1-x[0])*x[0]*(1-x[1])*x[1]*[0.,0.,1.]         u0=(1-x[0])*x[0]*(1-x[1])*x[1]*[0.,0.,1.]
295         p0=Scalar(-P1,ReducedSolution(self.domain))         p0=Scalar(-P1,ReducedSolution(self.domain))
296         sp.setTolerance(self.TOL)         sp.setTolerance(self.TOL)
297         u,p=sp.solve(u0,-p0,show_details=DETAIL_VERBOSE, verbose=VERBOSE ,max_iter=100,usePCG=True)         u,p=sp.solve(u0,-p0, verbose=VERBOSE ,max_iter=100,usePCG=True)
298                
299         error_v0=Lsup(u[0]-u0[0])         error_v0=Lsup(u[0]-u0[0])
300         error_v1=Lsup(u[1]-u0[1])         error_v1=Lsup(u[1]-u0[1])
# Line 327  class Test_StokesProblemCartesian3D(unit Line 326  class Test_StokesProblemCartesian3D(unit
326         u0=(1-x[0])*x[0]*(1-x[1])*x[1]*[0.,0.,1.]         u0=(1-x[0])*x[0]*(1-x[1])*x[1]*[0.,0.,1.]
327         p0=Scalar(-P1,ReducedSolution(self.domain))         p0=Scalar(-P1,ReducedSolution(self.domain))
328         sp.setTolerance(self.TOL)         sp.setTolerance(self.TOL)
329         u,p=sp.solve(u0,p0,show_details=DETAIL_VERBOSE, verbose=VERBOSE,max_iter=100,usePCG=False,iter_restart=20)         u,p=sp.solve(u0,p0, verbose=VERBOSE,max_iter=100,usePCG=False,iter_restart=20)
330                
331         error_v0=Lsup(u[0]-u0[0])         error_v0=Lsup(u[0]-u0[0])
332         error_v1=Lsup(u[1]-u0[1])         error_v1=Lsup(u[1]-u0[1])
# Line 357  class Test_StokesProblemCartesian3D(unit Line 356  class Test_StokesProblemCartesian3D(unit
356         u0=(1-x[0])*x[0]*(1-x[1])*x[1]*[0.,0.,1.]         u0=(1-x[0])*x[0]*(1-x[1])*x[1]*[0.,0.,1.]
357         p0=Scalar(-P1,ReducedSolution(self.domain))         p0=Scalar(-P1,ReducedSolution(self.domain))
358         sp.setTolerance(self.TOL*0.1)         sp.setTolerance(self.TOL*0.1)
359         u,p=sp.solve(u0,p0,show_details=DETAIL_VERBOSE and False, verbose=VERBOSE,max_iter=100,usePCG=False)         u,p=sp.solve(u0,p0, verbose=VERBOSE,max_iter=100,usePCG=False)
360                
361         error_v0=Lsup(u[0]-u0[0])         error_v0=Lsup(u[0]-u0[0])
362         error_v1=Lsup(u[1]-u0[1])         error_v1=Lsup(u[1]-u0[1])
# Line 387  class Test_StokesProblemCartesian3D(unit Line 386  class Test_StokesProblemCartesian3D(unit
386         u0=(1-x[0])*x[0]*(1-x[1])*x[1]*[0.,0.,1.]         u0=(1-x[0])*x[0]*(1-x[1])*x[1]*[0.,0.,1.]
387         p0=Scalar(-P1,ReducedSolution(self.domain))         p0=Scalar(-P1,ReducedSolution(self.domain))
388         sp.setTolerance(self.TOL)         sp.setTolerance(self.TOL)
389         u,p=sp.solve(u0,p0,show_details=DETAIL_VERBOSE, verbose=VERBOSE ,max_iter=100,usePCG=False)         u,p=sp.solve(u0,p0, verbose=VERBOSE ,max_iter=100,usePCG=False)
390                
391         error_v0=Lsup(u[0]-u0[0])         error_v0=Lsup(u[0]-u0[0])
392         error_v1=Lsup(u[1]-u0[1])         error_v1=Lsup(u[1]-u0[1])
# Line 465  class Test_Darcy(unittest.TestCase): Line 464  class Test_Darcy(unittest.TestCase):
464                        location_of_fixed_flux=mv,                        location_of_fixed_flux=mv,
465                        permeability=Scalar(k,Function(self.dom)))                        permeability=Scalar(k,Function(self.dom)))
466          df.setTolerance(rtol=self.TOL)          df.setTolerance(rtol=self.TOL)
         df.setSubProblemTolerance()  
467          v,p=df.solve(u_ref,p, max_iter=100, verbose=VERBOSE)          v,p=df.solve(u_ref,p, max_iter=100, verbose=VERBOSE)
468          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")
469          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")
# Line 482  class Test_Darcy(unittest.TestCase): Line 480  class Test_Darcy(unittest.TestCase):
480                        location_of_fixed_flux=mv,                        location_of_fixed_flux=mv,
481                        permeability=Scalar(k,Function(self.dom)))                        permeability=Scalar(k,Function(self.dom)))
482          df.setTolerance(rtol=self.TOL)          df.setTolerance(rtol=self.TOL)
         df.setSubProblemTolerance()  
483          v,p=df.solve(u,p,max_iter=100, verbose=VERBOSE )          v,p=df.solve(u,p,max_iter=100, verbose=VERBOSE )
484          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")
485          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")
# Line 500  class Test_Darcy(unittest.TestCase): Line 497  class Test_Darcy(unittest.TestCase):
497                        location_of_fixed_flux=mv,                        location_of_fixed_flux=mv,
498                        permeability=Scalar(k,Function(self.dom)))                        permeability=Scalar(k,Function(self.dom)))
499          df.setTolerance(rtol=self.TOL)          df.setTolerance(rtol=self.TOL)
         df.setSubProblemTolerance()  
500          v,p=df.solve(u,p, max_iter=100, verbose=VERBOSE)          v,p=df.solve(u,p, max_iter=100, verbose=VERBOSE)
501          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")
502          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")
# Line 518  class Test_Darcy(unittest.TestCase): Line 514  class Test_Darcy(unittest.TestCase):
514                        location_of_fixed_flux=mv,                        location_of_fixed_flux=mv,
515                        permeability=Scalar(k,Function(self.dom)))                        permeability=Scalar(k,Function(self.dom)))
516          df.setTolerance(rtol=self.TOL)          df.setTolerance(rtol=self.TOL)
         df.setSubProblemTolerance()  
517          v,p=df.solve(u,p, max_iter=100, verbose=VERBOSE)          v,p=df.solve(u,p, max_iter=100, verbose=VERBOSE)
518          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")
519          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")
# Line 536  class Test_Darcy(unittest.TestCase): Line 531  class Test_Darcy(unittest.TestCase):
531                        location_of_fixed_flux=mv,                        location_of_fixed_flux=mv,
532                        permeability=Scalar(k,Function(self.dom)))                        permeability=Scalar(k,Function(self.dom)))
533          df.setTolerance(rtol=self.TOL)          df.setTolerance(rtol=self.TOL)
         df.setSubProblemTolerance()  
534          v,p=df.solve(u,p, max_iter=100, verbose=VERBOSE)          v,p=df.solve(u,p, max_iter=100, verbose=VERBOSE)
535          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")
536          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")
# Line 554  class Test_Darcy(unittest.TestCase): Line 548  class Test_Darcy(unittest.TestCase):
548                        location_of_fixed_flux=mv,                        location_of_fixed_flux=mv,
549                        permeability=Scalar(k,Function(self.dom)))                        permeability=Scalar(k,Function(self.dom)))
550          df.setTolerance(rtol=self.TOL)          df.setTolerance(rtol=self.TOL)
         df.setSubProblemTolerance()  
551          v,p=df.solve(u,p, max_iter=100, verbose=VERBOSE)          v,p=df.solve(u,p, max_iter=100, verbose=VERBOSE)
552          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")
553          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")
# Line 572  class Test_Darcy(unittest.TestCase): Line 565  class Test_Darcy(unittest.TestCase):
565                        location_of_fixed_flux=mv,                        location_of_fixed_flux=mv,
566                        permeability=Scalar(k,Function(self.dom)))                        permeability=Scalar(k,Function(self.dom)))
567          df.setTolerance(rtol=self.TOL)          df.setTolerance(rtol=self.TOL)
         df.setSubProblemTolerance()  
568          v,p=df.solve(u,p, max_iter=100, verbose=VERBOSE)          v,p=df.solve(u,p, max_iter=100, verbose=VERBOSE)
569          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")
570          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")
# Line 590  class Test_Darcy(unittest.TestCase): Line 582  class Test_Darcy(unittest.TestCase):
582                        location_of_fixed_flux=mv,                        location_of_fixed_flux=mv,
583                        permeability=Scalar(k,Function(self.dom)))                        permeability=Scalar(k,Function(self.dom)))
584          df.setTolerance(rtol=self.TOL)          df.setTolerance(rtol=self.TOL)
         df.setSubProblemTolerance()  
585          v,p=df.solve(u,p, max_iter=100, verbose=VERBOSE)          v,p=df.solve(u,p, max_iter=100, verbose=VERBOSE)
586          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")
587          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")
# Line 608  class Test_Darcy(unittest.TestCase): Line 599  class Test_Darcy(unittest.TestCase):
599                        location_of_fixed_flux=mv,                        location_of_fixed_flux=mv,
600                        permeability=Scalar(k,Function(self.dom)))                        permeability=Scalar(k,Function(self.dom)))
601          df.setTolerance(rtol=self.TOL)          df.setTolerance(rtol=self.TOL)
         df.setSubProblemTolerance()  
602          v,p=df.solve(u,p, max_iter=100, verbose=VERBOSE)          v,p=df.solve(u,p, max_iter=100, verbose=VERBOSE)
603          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")
604          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")
# Line 626  class Test_Darcy(unittest.TestCase): Line 616  class Test_Darcy(unittest.TestCase):
616                        location_of_fixed_flux=mv,                        location_of_fixed_flux=mv,
617                        permeability=Scalar(k,Function(self.dom)))                        permeability=Scalar(k,Function(self.dom)))
618          df.setTolerance(rtol=self.TOL)          df.setTolerance(rtol=self.TOL)
         df.setSubProblemTolerance()  
619          v,p=df.solve(u,p, max_iter=100, verbose=VERBOSE)          v,p=df.solve(u,p, max_iter=100, verbose=VERBOSE)
620          self.failUnless(Lsup(v-u_ref)<self.TOL*25.*Lsup(u_ref), "flux error too big.")  # 25 because of disc. error.          self.failUnless(Lsup(v-u_ref)<self.TOL*25.*Lsup(u_ref), "flux error too big.")  # 25 because of disc. error.
621          self.failUnless(Lsup(p-p_ref)<self.TOL*25.*Lsup(p_ref), "pressure error too big.")          self.failUnless(Lsup(p-p_ref)<self.TOL*25.*Lsup(p_ref), "pressure error too big.")
# Line 644  class Test_Darcy(unittest.TestCase): Line 633  class Test_Darcy(unittest.TestCase):
633                        location_of_fixed_flux=mv,                        location_of_fixed_flux=mv,
634                        permeability=Scalar(k,Function(self.dom)))                        permeability=Scalar(k,Function(self.dom)))
635          df.setTolerance(rtol=self.TOL)          df.setTolerance(rtol=self.TOL)
         df.setSubProblemTolerance()  
636          v,p=df.solve(u,p, max_iter=100, verbose=VERBOSE)          v,p=df.solve(u,p, max_iter=100, verbose=VERBOSE)
637          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")
638          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")
# Line 662  class Test_Darcy(unittest.TestCase): Line 650  class Test_Darcy(unittest.TestCase):
650                        location_of_fixed_flux=mv,                        location_of_fixed_flux=mv,
651                        permeability=Scalar(k,Function(self.dom)))                        permeability=Scalar(k,Function(self.dom)))
652          df.setTolerance(rtol=self.TOL)          df.setTolerance(rtol=self.TOL)
         df.setSubProblemTolerance()  
653          v,p=df.solve(u,p, max_iter=100, verbose=VERBOSE)          v,p=df.solve(u,p, max_iter=100, verbose=VERBOSE)
654          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")          self.failUnless(Lsup(v-u_ref)<self.TOL*10.*Lsup(u_ref), "flux error too big.")
655          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")          self.failUnless(Lsup(p-p_ref)<self.TOL*10.*Lsup(p_ref), "pressure error too big.")
# Line 978  class Test_IncompressibleIsotropicFlowCa Line 965  class Test_IncompressibleIsotropicFlowCa
965        mod.setElasticShearModulus(self.mu)        mod.setElasticShearModulus(self.mu)
966        mod.setPowerLaws([self.eta_0, self.eta_1, self.eta_2], [ 1., self.tau_1, self.tau_2],  [1.,self.N_1,self.N_2])        mod.setPowerLaws([self.eta_0, self.eta_1, self.eta_2], [ 1., self.tau_1, self.tau_2],  [1.,self.N_1,self.N_2])
967        mod.setTolerance(self.TOL)        mod.setTolerance(self.TOL)
       mod.setFlowSubTolerance(self.TOL**2)  
968        mod.setFlowTolerance(self.TOL)        mod.setFlowTolerance(self.TOL)
969    
970        BF=Vector(self.P_max,Function(self.dom))        BF=Vector(self.P_max,Function(self.dom))

Legend:
Removed from v.2473  
changed lines
  Added in v.2474

  ViewVC Help
Powered by ViewVC 1.1.26