/[escript]/branches/3.4.1/modellib/py_src/input.py
ViewVC logotype

Diff of /branches/3.4.1/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 628 by elspeth, Thu Mar 23 02:27:57 2006 UTC
# Line 1  Line 1 
1  # $Id$  # $Id$
2    
3    __copyright__="""  Copyright (c) 2006 by ACcESS MNRF
4                        http://www.access.edu.au
5                    Primary Business: Queensland, Australia"""
6    __license__="""Licensed under the Open Software License version 3.0
7                 http://www.opensource.org/licenses/osl-3.0.php"""
8    
9  from esys.escript import *  from esys.escript import *
10  from esys.escript.modelframe import Model,ParameterSet  from esys.escript.modelframe import Model,ParameterSet
11  from math import log  from math import log
# Line 7  class Sequencer(Model): Line 14  class Sequencer(Model):
14      """      """
15      Runs through time until t_end is reached.      Runs through time until t_end is reached.
16      """      """
17      def __init__(self,t=0.,t_end=Model.UNDEF_DT,dt_max=Model.UNDEF_DT,debug=False):      def __init__(self,debug=False):
18          """          """
19          @param t_end: - model is terminated when t_end is passed            @param t_end: - model is terminated when t_end is passed  
20                     (exposed in writeXML)                     (exposed in writeXML)
# Line 18  class Sequencer(Model): Line 25  class Sequencer(Model):
25          @type t: float          @type t: float
26    
27          """          """
28          Model.__init__(self,debug=debug)          super(Sequencer,self).__init__(debug=debug)
29          self.declareParameter(t=t, \          self.declareParameter(t=0.,
30                                t_end=t_end,  \                                t_end=1.,
31                                dt_max=dt_max)                                dt_max=Model.UNDEF_DT)
32    
33      def doInitialization(self):      def doInitialization(self):
34          """          """
# Line 77  class GaussianProfile(ParameterSet): Line 84  class GaussianProfile(ParameterSet):
84          x = self.domain.getX()          x = self.domain.getX()
85          dim = self.domain.getDim()          dim = self.domain.getDim()
86          l = length(x-self.x_c[:dim])          l = length(x-self.x_c[:dim])
87          m = (l-self.r).whereNegative()          m = whereNegative(l-self.r)
88    
89          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
90    

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

  ViewVC Help
Powered by ViewVC 1.1.26