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

Diff of /release/4.1/doc/examples/cookbook/example03a.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 46  from esys.escript.unitsSI import * Line 46  from esys.escript.unitsSI import *
46  import pylab as pl #Plotting package.  import pylab as pl #Plotting package.
47  import numpy as np #Array package.  import numpy as np #Array package.
48  import os #This package is necessary to handle saving our data.  import os #This package is necessary to handle saving our data.
49  from cblib import toXYTuple  from cblib import toXYTuple, HAVE_NATGRID
50  try:  try:
51      from esys.finley import Rectangle      from esys.finley import Rectangle
52      HAVE_FINLEY = True      HAVE_FINLEY = True
# Line 59  if getMPISizeWorld() > 1: Line 59  if getMPISizeWorld() > 1:
59          print("This example will not run in an MPI world.")          print("This example will not run in an MPI world.")
60          sys.exit(0)          sys.exit(0)
61    
62  try:  if not HAVE_NATGRID:
63      from mpl_toolkits.natgrid import _natgrid      print("This example requires that natgrid is available to matplotlib")
     HAVE_NATGRID=True  
 except ImportError:  
     HAVE_NATGRID=False  
   
64    
65  if HAVE_FINLEY and HAVE_NATGRID:  if HAVE_FINLEY and HAVE_NATGRID:
66      #################################################ESTABLISHING VARIABLES      #################################################ESTABLISHING VARIABLES

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

  ViewVC Help
Powered by ViewVC 1.1.26