/[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 2676 by gross, Mon Sep 21 08:06:37 2009 UTC revision 2719 by gross, Wed Oct 14 06:38:03 2009 UTC
# Line 91  class Test_StokesProblemCartesian2D(unit Line 91  class Test_StokesProblemCartesian2D(unit
91         sp.initialize(f=F,fixed_u_mask=mask,eta=ETA)         sp.initialize(f=F,fixed_u_mask=mask,eta=ETA)
92         u0=(1-x[0])*x[0]*[0.,1.]         u0=(1-x[0])*x[0]*[0.,1.]
93         p0=Scalar(-P1,ReducedSolution(self.domain))         p0=Scalar(-P1,ReducedSolution(self.domain))
94         sp.setTolerance(self.TOL*0.2)         sp.setTolerance(self.TOL)
95         u,p=sp.solve(u0,p0, verbose=VERBOSE,max_iter=100,usePCG=True)         u,p=sp.solve(u0,p0, verbose=VERBOSE,max_iter=100,usePCG=True)
96         error_v0=Lsup(u[0]-u0[0])         error_v0=Lsup(u[0]-u0[0])
97         error_v1=Lsup(u[1]-u0[1])/0.25         error_v1=Lsup(u[1]-u0[1])/0.25
# Line 118  class Test_StokesProblemCartesian2D(unit Line 118  class Test_StokesProblemCartesian2D(unit
118         p0=Scalar(-P1,ReducedSolution(self.domain))         p0=Scalar(-P1,ReducedSolution(self.domain))
119         sp.setTolerance(self.TOL)         sp.setTolerance(self.TOL)
120         u,p=sp.solve(u0,p0, verbose=VERBOSE,max_iter=100,usePCG=True)         u,p=sp.solve(u0,p0, verbose=VERBOSE,max_iter=100,usePCG=True)
121           # 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 168  class Test_StokesProblemCartesian2D(unit Line 169  class Test_StokesProblemCartesian2D(unit
169         sp.initialize(f=F,fixed_u_mask=mask,eta=ETA)         sp.initialize(f=F,fixed_u_mask=mask,eta=ETA)
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)
173         u,p=sp.solve(u0,p0, 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
177         error_p=Lsup(P1*x[0]*x[1]+p)         error_p=Lsup(P1*x[0]*x[1]+p)
178    
179         self.failUnless(error_p<10*self.TOL, "pressure error too large.")         self.failUnless(error_p<10*self.TOL, "pressure error too large.")
180         self.failUnless(error_v0<10*self.TOL, "0-velocity error too large.")         self.failUnless(error_v0<10*self.TOL, "0-velocity error too large.")
181         self.failUnless(error_v1<10*self.TOL, "1-velocity error too large.")         self.failUnless(error_v1<10*self.TOL, "1-velocity error too large.")
# Line 262  class Test_StokesProblemCartesian3D(unit Line 264  class Test_StokesProblemCartesian3D(unit
264         sp.initialize(f=F,fixed_u_mask=mask,eta=ETA)         sp.initialize(f=F,fixed_u_mask=mask,eta=ETA)
265         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.]
266         p0=Scalar(-P1,ReducedSolution(self.domain))         p0=Scalar(-P1,ReducedSolution(self.domain))
267         sp.setTolerance(self.TOL*0.1)         sp.setTolerance(self.TOL)
268         u,p=sp.solve(u0,p0, verbose=VERBOSE ,max_iter=100,usePCG=True)         u,p=sp.solve(u0,p0, verbose=VERBOSE ,max_iter=100,usePCG=True)
269         error_v0=Lsup(u[0]-u0[0])         error_v0=Lsup(u[0]-u0[0])
270         error_v1=Lsup(u[1]-u0[1])         error_v1=Lsup(u[1]-u0[1])
# Line 293  class Test_StokesProblemCartesian3D(unit Line 295  class Test_StokesProblemCartesian3D(unit
295         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.]
296         p0=Scalar(-P1,ReducedSolution(self.domain))         p0=Scalar(-P1,ReducedSolution(self.domain))
297         sp.setTolerance(self.TOL)         sp.setTolerance(self.TOL)
298         u,p=sp.solve(u0,-p0, verbose=VERBOSE ,max_iter=100,usePCG=True)         u,p=sp.solve(u0,p0, verbose=VERBOSE ,max_iter=100,usePCG=True)
299                
300         error_v0=Lsup(u[0]-u0[0])         error_v0=Lsup(u[0]-u0[0])
301         error_v1=Lsup(u[1]-u0[1])         error_v1=Lsup(u[1]-u0[1])
# Line 354  class Test_StokesProblemCartesian3D(unit Line 356  class Test_StokesProblemCartesian3D(unit
356         sp.initialize(f=F,fixed_u_mask=mask,eta=ETA)         sp.initialize(f=F,fixed_u_mask=mask,eta=ETA)
357         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.]
358         p0=Scalar(-P1,ReducedSolution(self.domain))         p0=Scalar(-P1,ReducedSolution(self.domain))
359         sp.setTolerance(self.TOL*0.1)         sp.setTolerance(self.TOL/10)
360         u,p=sp.solve(u0,p0, verbose=VERBOSE,max_iter=100,usePCG=False)         u,p=sp.solve(u0,p0, verbose=VERBOSE,max_iter=100,usePCG=False)
361                
362         error_v0=Lsup(u[0]-u0[0])         error_v0=Lsup(u[0]-u0[0])

Legend:
Removed from v.2676  
changed lines
  Added in v.2719

  ViewVC Help
Powered by ViewVC 1.1.26