Changeset 13741


Ignore:
Timestamp:
10/18/12 16:06:12 (12 years ago)
Author:
jschierm
Message:

NEW: Python version of roundmesh (plus cosmetic Matlab changes).

Location:
issm/trunk-jpl/src/m
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/geometry/FlagElements.py

    r13503 r13741  
    5252                        flag=numpy.logical_not(flag)
    5353
    54         elif isinstance(region,numpy.nparray) or isinstance(region,bool):
     54        elif isinstance(region,numpy.ndarray) or isinstance(region,bool):
    5555                if not numpy.size(region,0)==md.mesh.numberofelements:
    5656                        raise TypeError("Flaglist for region must be of same size as number of elements in model.")
  • issm/trunk-jpl/src/m/mesh/roundmesh.m

    r13021 r13741  
    1212
    1313%Get number of points on the circle
    14 pointsonedge=floor((2*pi*radius) / resolution);
     14pointsonedge=floor((2.*pi*radius) / resolution);
    1515
    1616%Calculate the cartesians coordinates of the points
    1717x_list=ones(pointsonedge,1); y_list=ones(pointsonedge,1);
    18 theta=(0:2*pi/pointsonedge:2*pi*(1-1/pointsonedge))';
     18theta=(0.:2.*pi/pointsonedge:2.*pi*(1.-1./pointsonedge))';
    1919x_list=radius*x_list.*cos(theta);
    2020y_list=radius*y_list.*sin(theta);
    21 A=struct('x',x_list,'y',y_list,'density',1);
     21A=struct('x',x_list,'y',y_list,'density',1.);
    2222expwrite(A,'RoundDomainOutline.exp');
    2323
     
    2828%move the closest node to the center
    2929[mini pos]=min(md.mesh.x.^2+md.mesh.y.^2);
    30 md.mesh.x(pos)=0;
    31 md.mesh.y(pos)=0;
     30md.mesh.x(pos)=0.;
     31md.mesh.y(pos)=0.;
    3232
    3333%delete domain
Note: See TracChangeset for help on using the changeset viewer.