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

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

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

revision 5774 by jfenwick, Fri Apr 24 01:36:26 2015 UTC revision 5775 by sshaw, Thu Jul 30 08:01:06 2015 UTC
# Line 1  Line 1 
 from __future__ import division, print_function  
1  ##############################################################################  ##############################################################################
2  #  #
3  # Copyright (c) 2009-2015 by The University of Queensland  # Copyright (c) 2009-2015 by The University of Queensland
# Line 14  from __future__ import division, print_f Line 13  from __future__ import division, print_f
13  #  #
14  ##############################################################################  ##############################################################################
15    
16    from __future__ import division, print_function
17  __copyright__="""Copyright (c) 2009-2015 by The University of Queensland  __copyright__="""Copyright (c) 2009-2015 by The University of Queensland
18  http://www.uq.edu.au  http://www.uq.edu.au
19  Primary Business: Queensland, Australia"""  Primary Business: Queensland, Australia"""
# Line 40  from math import * # math package Line 40  from math import * # math package
40  from esys.escript import *  from esys.escript import *
41  from esys.escript.unitsSI import *  from esys.escript.unitsSI import *
42  from esys.escript.linearPDEs import LinearPDE  from esys.escript.linearPDEs import LinearPDE
43  from cblib import toRegGrid  from cblib import toRegGrid, HAVE_NATGRID
44  import pylab as pl #Plotting package  import pylab as pl #Plotting package
45    
46  try:  try:
# Line 56  if getMPISizeWorld() > 1: Line 56  if getMPISizeWorld() > 1:
56          print("This example will not run in an MPI world.")          print("This example will not run in an MPI world.")
57          sys.exit(0)          sys.exit(0)
58    
59  try:  if not HAVE_NATGRID:
60      from mpl_toolkits.natgrid import _natgrid      print("This example requires that natgrid is available to matplotlib")
     HAVE_NATGRID=True  
 except ImportError:  
     HAVE_NATGRID=False  
61    
62  if HAVE_FINLEY and HAVE_NATGRID:  if HAVE_FINLEY and HAVE_NATGRID:
63      #################################################ESTABLISHING VARIABLES      #################################################ESTABLISHING VARIABLES

Legend:
Removed from v.5774  
changed lines
  Added in v.5775

  ViewVC Help
Powered by ViewVC 1.1.26