/[escript]/release/4.1/doc/examples/cookbook/example10a.py
ViewVC logotype

Diff of /release/4.1/doc/examples/cookbook/example10a.py

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

revision 5766 by jfenwick, Fri Jul 17 04:40:03 2015 UTC revision 5767 by sshaw, Wed Jul 29 01:33:52 2015 UTC
# Line 43  from math import pi, sqrt, sin, cos Line 43  from math import pi, sqrt, sin, cos
43    
44  from esys.escript.pdetools import Projector  from esys.escript.pdetools import Projector
45    
46  from cblib import toRegGrid  from cblib import toRegGrid, HAVE_NATGRID
47  import pylab as pl #Plotting package  import pylab as pl #Plotting package
48  import numpy as np  import numpy as np
49    
# Line 58  if getMPISizeWorld() > 1: Line 58  if getMPISizeWorld() > 1:
58      print("This example will not run in an MPI world.")      print("This example will not run in an MPI world.")
59      sys.exit(0)      sys.exit(0)
60    
61  try:  if not HAVE_NATGRID:
62      from mpl_toolkits.natgrid import _natgrid      print("This example requires that natgrid is available to matplotlib")
     HAVE_NATGRID=True  
 except ImportError:  
     HAVE_NATGRID=False  
   
63    
64  if HAVE_FINLEY and HAVE_NATGRID:  if HAVE_FINLEY and HAVE_NATGRID:
65      #################################################ESTABLISHING VARIABLES      #################################################ESTABLISHING VARIABLES

Legend:
Removed from v.5766  
changed lines
  Added in v.5767

  ViewVC Help
Powered by ViewVC 1.1.26