/[escript]/trunk/doc/cookbook/heatrefraction_mesher001.py
ViewVC logotype

Diff of /trunk/doc/cookbook/heatrefraction_mesher001.py

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

revision 2588 by ahallam, Wed Aug 5 22:42:36 2009 UTC revision 2589 by ahallam, Wed Aug 5 23:06:35 2009 UTC
# Line 30  import numpy as np Line 30  import numpy as np
30  #import numpy as n  #import numpy as n
31  from math import *  from math import *
32    
33    # routine to find consecutive coordinates of a loop in pycad
34  def loopcoords(loop):  def loopcoords(loop):
35        # return all construction points of input
36      temp = loop.getConstructionPoints()      temp = loop.getConstructionPoints()
37        #create a numpy array for xyz components or construction points
38      coords = np.zeros([len(temp),3],float)      coords = np.zeros([len(temp),3],float)
39        #place construction points in array
40      for i in range(0,len(temp)):      for i in range(0,len(temp)):
41          coords[i,:]=temp[i].getCoordinates()          coords[i,:]=temp[i].getCoordinates()
42        #return a numpy array
43      return coords      return coords
44    
45  # Overall Domain  # Overall Domain

Legend:
Removed from v.2588  
changed lines
  Added in v.2589

  ViewVC Help
Powered by ViewVC 1.1.26