/[escript]/trunk/modellib/py_src/mechanics.py
ViewVC logotype

Diff of /trunk/modellib/py_src/mechanics.py

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

revision 3013 by jfenwick, Thu Jan 28 02:03:15 2010 UTC revision 3014 by gross, Wed Apr 28 04:05:21 2010 UTC
# Line 91  class Mechanics(Model): Line 91  class Mechanics(Model):
91             # open PDE:             # open PDE:
92             self.__pde=LinearPDE(self.domain)             self.__pde=LinearPDE(self.domain)
93             self.__pde.setSolverMethod(self.__pde.DIRECT)             self.__pde.setSolverMethod(self.__pde.DIRECT)
94               self.__solver_options=self.__pde.getSolverOptions()
95               self.__solver_options.setSolverMethod(self.__solver_options.DIRECT)
96               self.__solver_options.setVerbosity(self.debug)
97    
98             # self.__pde.setSymmetryOn()             # self.__pde.setSymmetryOn()
99    
100        def doStepPreprocessing(self,dt):        def doStepPreprocessing(self,dt):
# Line 130  class Mechanics(Model): Line 134  class Mechanics(Model):
134            if not self.prescribed_velocity.isEmpty() and self.__iter==1:            if not self.prescribed_velocity.isEmpty() and self.__iter==1:
135                 self.__pde.setValue(r=dt*self.prescribed_velocity)                 self.__pde.setValue(r=dt*self.prescribed_velocity)
136            # solve the PDE:            # solve the PDE:
137            self.__pde.setTolerance(self.rel_tol**2)            self.__solver_options.setTolerance(self.rel_tol**2)
138            self.du=self.__pde.getSolution(verbose=self.debug)            self.du=self.__pde.getSolution()
139            # update geometry            # update geometry
140            self.displacement=self.displacement+self.du            self.displacement=self.displacement+self.du
141            self.domain.setX(self.__x+self.displacement)            self.domain.setX(self.__x+self.displacement)

Legend:
Removed from v.3013  
changed lines
  Added in v.3014

  ViewVC Help
Powered by ViewVC 1.1.26