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

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

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

trunk/esys2/modellib/py_src/input.py revision 149 by jgs, Thu Sep 1 03:31:39 2005 UTC trunk/modellib/py_src/input.py revision 423 by gross, Fri Jan 6 08:09:43 2006 UTC
# Line 7  class Sequencer(Model): Line 7  class Sequencer(Model):
7      """      """
8      Runs through time until t_end is reached.      Runs through time until t_end is reached.
9      """      """
10      def __init__(self,t=0.,t_end=Model.UNDEF_DT,dt_max=Model.UNDEF_DT,debug=False):      def __init__(self,debug=False):
11          """          """
12          @param t_end: - model is terminated when t_end is passed            @param t_end: - model is terminated when t_end is passed  
13                     (exposed in writeXML)                     (exposed in writeXML)
# Line 18  class Sequencer(Model): Line 18  class Sequencer(Model):
18          @type t: float          @type t: float
19    
20          """          """
21          Model.__init__(self,debug=debug)          super(Sequencer,self).__init__(debug=debug)
22          self.declareParameter(t=t, \          self.declareParameter(t=0.,
23                                t_end=t_end,  \                                t_end=1.,
24                                dt_max=dt_max)                                dt_max=Model.UNDEF_DT)
25    
26      def doInitialization(self):      def doInitialization(self):
27          """          """
# Line 77  class GaussianProfile(ParameterSet): Line 77  class GaussianProfile(ParameterSet):
77          x = self.domain.getX()          x = self.domain.getX()
78          dim = self.domain.getDim()          dim = self.domain.getDim()
79          l = length(x-self.x_c[:dim])          l = length(x-self.x_c[:dim])
80          m = (l-self.r).whereNegative()          m = whereNegative(l-self.r)
81    
82          return (m+(1.-m)*exp(-log(2.)*(l/self.width)**2))*self.A          return (m+(1.-m)*exp(-log(2.)*(l/self.width)**2))*self.A
83    

Legend:
Removed from v.149  
changed lines
  Added in v.423

  ViewVC Help
Powered by ViewVC 1.1.26