Changeset 22320


Ignore:
Timestamp:
01/03/18 11:12:58 (7 years ago)
Author:
Mathieu Morlighem
Message:

CHG: fixed python version of roundmesh

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/mesh/roundmesh.py

    r21303 r22320  
    2020
    2121        #Get number of points on the circle
    22         pointsonedge=np.floor((2.*np.pi*radius) / resolution)
     22        pointsonedge=np.floor((2.*np.pi*radius) / resolution)+1 #+1 to close the outline
    2323
    2424        #Calculate the cartesians coordinates of the points
    25         x_list=np.ones(pointsonedge)
    26         y_list=np.ones(pointsonedge)
    27         theta=np.linspace(0.,2.*np.pi,num=pointsonedge,endpoint=False)
    28         x_list=roundsigfig(radius*x_list*np.cos(theta),12)
    29         y_list=roundsigfig(radius*y_list*np.sin(theta),12)
     25        theta=np.linspace(0.,2.*np.pi,pointsonedge)
     26        x_list=roundsigfig(radius*np.cos(theta),12)
     27        y_list=roundsigfig(radius*np.sin(theta),12)
    3028        A=OrderedDict()
    3129        A['x']=[x_list]
Note: See TracChangeset for help on using the changeset viewer.