/[escript]/trunk/escript/py_src/heat.py
ViewVC logotype

Diff of /trunk/escript/py_src/heat.py

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

revision 2169 by caltinay, Wed Dec 17 03:08:58 2008 UTC revision 2337 by gross, Thu Mar 26 07:07:42 2009 UTC
# Line 59  class TemperatureCartesian(TransportPDE) Line 59  class TemperatureCartesian(TransportPDE)
59              T = sp.getTemperature(dt)              T = sp.getTemperature(dt)
60              t += dt              t += dt
61      """      """
62      def __init__(self,domain,theta=0.5,**kwargs):      def __init__(self,domain,useBackwardEuler=False,**kwargs):
63          """          """
64          Initializes the temperature advection-diffusion problem.          Initializes the temperature advection-diffusion problem.
65    
66          @param domain: domain of the problem          @param domain: domain of the problem
67          @param theta: method control:          @param useBackwardEuler: if set the backward Euler scheme is used. Otherwise the Crank-Nicholson scheme is applied. Not that backward Euler scheme will return a safe time step size which is practically infinity as the scheme is unconditional unstable. So other measures need to be applied to control the time step size. The Crank-Nicholson scheme provides a higher accuracy but requires to limit the time step size to be stable.
68              - theta=1.0: backward Euler          @type useBackwardEuler: C{bool}
             - theta=0.5: Crank-Nicholson scheme  
             - theta=0.0: forward Euler (not recommended)  
69          """          """
70          TransportPDE.__init__(self,domain,numEquations=1,theta=theta,**kwargs)          TransportPDE.__init__(self,domain,numEquations=1,useBackwardEuler=useBackwardEuler,**kwargs)
71          self.setReducedOrderOn()          self.setReducedOrderOn()
72          self.__rhocp=None          self.__rhocp=None
73          self.__v=None          self.__v=None

Legend:
Removed from v.2169  
changed lines
  Added in v.2337

  ViewVC Help
Powered by ViewVC 1.1.26