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

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

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

revision 2657 by jfenwick, Mon Sep 7 00:06:15 2009 UTC revision 2658 by ahallam, Thu Sep 10 02:58:44 2009 UTC
# Line 22  __url__="https://launchpad.net/escript-f Line 22  __url__="https://launchpad.net/escript-f
22  Author: Antony Hallam antony.hallam@uqconnect.edu.au  Author: Antony Hallam antony.hallam@uqconnect.edu.au
23  """  """
24    
25  from esys.pycad import *  from esys.pycad import CurveLoop
26  import numpy as np  import numpy as np
27  # To run the function it is necessary to import the modules we  # To run the function it is necessary to import the modules we
28  # require.  # require.
29  # This imports everything from the escript library  # This imports everything from the escript library
30  from esys.escript import *  #from esys.escript import Locator
31  # numpy for array handling  # numpy for array handling
32  import numpy as np  import numpy as np
33  # pylab for matplotlib and plotting  # pylab for matplotlib and plotting
34  import pylab as pl  import pylab as pl
35  # tools for dealing with PDEs - contains locator  # tools for dealing with PDEs - contains locator
36  from esys.escript.pdetools import *  from esys.escript.pdetools import Locator
37    
38  # routine to find consecutive coordinates of a loop in pycad  # routine to find consecutive coordinates of a loop in pycad
39  def getLoopCoords(loop):  def getLoopCoords(loop):
# Line 76  def toXYTuple(coords): Line 76  def toXYTuple(coords):
76      coordX = coords[:,0]; coordY = coords[:,1] #X and Y components.      coordX = coords[:,0]; coordY = coords[:,1] #X and Y components.
77      return coordX,coordY      return coordX,coordY
78    
79    # joel wrote this to create directories for you
80  import os  import os
81  def needdirs(dirlist):  def needdirs(dirlist):
82      for name in dirlist:      for name in dirlist:

Legend:
Removed from v.2657  
changed lines
  Added in v.2658

  ViewVC Help
Powered by ViewVC 1.1.26