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

Contents of /trunk/doc/cookbook/cblib/getLoopCoords.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2597 - (show annotations)
Thu Aug 6 03:30:09 2009 UTC (10 years, 1 month ago) by ahallam
File MIME type: text/x-python
File size: 1281 byte(s)
Updates to: cookbook documentation; heat refraction problems; mencoder investigation for *.png animation
1 ########################################################
2 #
3 # Copyright (c) 2003-2009 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) 2003-2009 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 Author: Antony Hallam antony.hallam@uqconnect.edu.au
23 """
24
25 from esys.pycad import *
26 import numpy as np
27
28 # routine to find consecutive coordinates of a loop in pycad
29 def getLoopCoords(loop):
30 # return all construction points of input
31 temp = loop.getConstructionPoints()
32 #create a numpy array for xyz components or construction points
33 coords = np.zeros([len(temp),3],float)
34 #place construction points in array
35 for i in range(0,len(temp)):
36 coords[i,:]=temp[i].getCoordinates()
37 #return a numpy array
38 return coords

  ViewVC Help
Powered by ViewVC 1.1.26