/[escript]/branches/stage3.1/doc/examples/cookbook/cblib.py
ViewVC logotype

Contents of /branches/stage3.1/doc/examples/cookbook/cblib.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2945 - (show annotations)
Wed Feb 24 00:17:46 2010 UTC (8 years, 11 months ago) by jfenwick
File MIME type: text/x-python
File size: 1181 byte(s)
Bringing release stage up to trunk version 2944

1 ########################################################
2 #
3 # Copyright (c) 2009-2010 by University of Queensland
4 # Earth Systems Science Computational Center (ESSCC)
5 # http://www.uq.edu.au/esscc
6 #
7 # Primary Business: Queensland, Australia
8 # Licensed under the Open Software License version 3.0
9 # http://www.opensource.org/licenses/osl-3.0.php
10 #
11 ########################################################
12
13 __copyright__="""Copyright (c) 2009-2010 by University of Queensland
14 Earth Systems Science Computational Center (ESSCC)
15 http://www.uq.edu.au/esscc
16 Primary Business: Queensland, Australia"""
17 __license__="""Licensed under the Open Software License version 3.0
18 http://www.opensource.org/licenses/osl-3.0.php"""
19 __url__="https://launchpad.net/escript-finley"
20
21 """
22 Additional routines using matplotlib for cookbook examples.
23 Author: Antony Hallam antony.hallam@uqconnect.edu.au
24 """
25
26 import numpy as np
27
28 # Extract the X and Y coordinates as two numpy arrays from escript coordiantes from .getX function
29 def toXYTuple(coords):
30 coords = np.array(coords.toListOfTuples()) #convert to array
31 coordX = coords[:,0]; coordY = coords[:,1] #X and Y components.
32 return coordX,coordY

  ViewVC Help
Powered by ViewVC 1.1.26