/[escript]/trunk/doc/examples/cookbook/example10e.py
ViewVC logotype

Diff of /trunk/doc/examples/cookbook/example10e.py

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

revision 3891 by ahallam, Thu Dec 9 07:02:52 2010 UTC revision 3892 by jfenwick, Tue Apr 10 08:57:23 2012 UTC
# Line 50  from mpl_toolkits.mplot3d import Axes3D Line 50  from mpl_toolkits.mplot3d import Axes3D
50  ########################################################MPI WORLD CHECK  ########################################################MPI WORLD CHECK
51  if getMPISizeWorld() > 1:  if getMPISizeWorld() > 1:
52      import sys      import sys
53      print "This example will not run in an MPI world."      print("This example will not run in an MPI world.")
54      sys.exit(0)      sys.exit(0)
55    
56  #################################################ESTABLISHING VARIABLES  #################################################ESTABLISHING VARIABLES
# Line 121  def gzpot(p, y, x, *args): Line 121  def gzpot(p, y, x, *args):
121      psol=rec.getValue(gz)      psol=rec.getValue(gz)
122    
123      err = np.sum((np.array(y) - np.array(psol))**2.)      err = np.sum((np.array(y) - np.array(psol))**2.)
124      print "Lsup= ",Lsup(np.array(psol)-np.array(sol_angz))/Lsup(np.array(psol))      print("Lsup= ",Lsup(np.array(psol)-np.array(sol_angz))/Lsup(np.array(psol)))
125      return err      return err
126    
127  #Initial Guess  #Initial Guess

Legend:
Removed from v.3891  
changed lines
  Added in v.3892

  ViewVC Help
Powered by ViewVC 1.1.26