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

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

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

revision 341 by gross, Mon Dec 12 05:26:10 2005 UTC revision 353 by gross, Wed Dec 14 04:13:59 2005 UTC
# Line 24  Utility functions for escript Line 24  Utility functions for escript
24  __author__="Lutz Gross, l.gross@uq.edu.au"  __author__="Lutz Gross, l.gross@uq.edu.au"
25  __licence__="contact: esys@access.uq.edu.au"  __licence__="contact: esys@access.uq.edu.au"
26  __url__="http://www.iservo.edu.au/esys/escript"  __url__="http://www.iservo.edu.au/esys/escript"
27  __version__="$Revision: 329 $"  __version__="$Revision$"
28  __date__="$Date$"  __date__="$Date$"
29    
30    
# Line 3661  def interpolate(arg,where): Line 3661  def interpolate(arg,where):
3661      @param arg:    interpolant      @param arg:    interpolant
3662      @param where:  FunctionSpace to interpolate to      @param where:  FunctionSpace to interpolate to
3663      """      """
3664      if testForZero(arg):      if isinstance(arg,Symbol):
       return 0  
     elif isinstance(arg,Symbol):  
3665         return Interpolated_Symbol(arg,where)         return Interpolated_Symbol(arg,where)
3666      else:      else:
3667         return escript.Data(arg,where)         return escript.Data(arg,where)
# Line 3688  def jump(arg): Line 3686  def jump(arg):
3686                    to be calculated.                    to be calculated.
3687      """      """
3688      d=arg.getDomain()      d=arg.getDomain()
3689      return arg.interpolate(escript.FunctionOnContactOne())-arg.interpolate(escript.FunctionOnContactZero())      return arg.interpolate(escript.FunctionOnContactOne(d))-arg.interpolate(escript.FunctionOnContactZero(d))
3690    
3691  #=============================  #=============================
3692  #  #

Legend:
Removed from v.341  
changed lines
  Added in v.353

  ViewVC Help
Powered by ViewVC 1.1.26