/[escript]/branches/symbolic_from_3470/escript/py_src/mountains.py
ViewVC logotype

Diff of /branches/symbolic_from_3470/escript/py_src/mountains.py

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

revision 3788 by caltinay, Tue Mar 15 04:23:54 2011 UTC revision 3789 by caltinay, Tue Jan 31 04:55:05 2012 UTC
# Line 54  class Mountains: Line 54  class Mountains:
54      order=escript.Solution(domain).getApproximationOrder()      order=escript.Solution(domain).getApproximationOrder()
55      if order>1:      if order>1:
56          reduced = True          reduced = True
57          if ReducedSolution(domain).getApproximationOrder()>1: raise ValueError,"Reduced order needs to be equal to 1."          if ReducedSolution(domain).getApproximationOrder()>1: raise ValueError("Reduced order needs to be equal to 1.")
58      else:      else:
59          reduced = False          reduced = False
60      if eps<0:      if eps<0:
# Line 169  class Mountains: Line 169  class Mountains:
169        dt_safe=self.getSafeTimeStepSize()        dt_safe=self.getSafeTimeStepSize()
170        n=max(int(math.ceil(dt/dt_safe)+0.5),1)        n=max(int(math.ceil(dt/dt_safe)+0.5),1)
171        if n>1 and not allow_substeps:        if n>1 and not allow_substeps:
172           raise SubSteppingException,"Substepping required."           raise SubSteppingException("Substepping required.")
173        dt/=n        dt/=n
174    
175        H=self.getTopography()        H=self.getTopography()
# Line 189  class Mountains: Line 189  class Mountains:
189           Hhalf=self.__PDE_H.getSolution()           Hhalf=self.__PDE_H.getSolution()
190           self.__PDE_H.setValue(X=w_tilda*Hhalf*dt, Y=w_z*dt+H-L)           self.__PDE_H.setValue(X=w_tilda*Hhalf*dt, Y=w_z*dt+H-L)
191           H=self.__PDE_H.getSolution()           H=self.__PDE_H.getSolution()
192           print "DDD : ava = ",integrate(H)           print(("DDD : ava = ",integrate(H)))
193           t+=dt           t+=dt
194        self.setTopography(H)        self.setTopography(H)
195    

Legend:
Removed from v.3788  
changed lines
  Added in v.3789

  ViewVC Help
Powered by ViewVC 1.1.26