Changeset 13741
- Timestamp:
- 10/18/12 16:06:12 (12 years ago)
- 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 52 52 flag=numpy.logical_not(flag) 53 53 54 elif isinstance(region,numpy.n parray) or isinstance(region,bool):54 elif isinstance(region,numpy.ndarray) or isinstance(region,bool): 55 55 if not numpy.size(region,0)==md.mesh.numberofelements: 56 56 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 12 12 13 13 %Get number of points on the circle 14 pointsonedge=floor((2 *pi*radius) / resolution);14 pointsonedge=floor((2.*pi*radius) / resolution); 15 15 16 16 %Calculate the cartesians coordinates of the points 17 17 x_list=ones(pointsonedge,1); y_list=ones(pointsonedge,1); 18 theta=(0 :2*pi/pointsonedge:2*pi*(1-1/pointsonedge))';18 theta=(0.:2.*pi/pointsonedge:2.*pi*(1.-1./pointsonedge))'; 19 19 x_list=radius*x_list.*cos(theta); 20 20 y_list=radius*y_list.*sin(theta); 21 A=struct('x',x_list,'y',y_list,'density',1 );21 A=struct('x',x_list,'y',y_list,'density',1.); 22 22 expwrite(A,'RoundDomainOutline.exp'); 23 23 … … 28 28 %move the closest node to the center 29 29 [mini pos]=min(md.mesh.x.^2+md.mesh.y.^2); 30 md.mesh.x(pos)=0 ;31 md.mesh.y(pos)=0 ;30 md.mesh.x(pos)=0.; 31 md.mesh.y(pos)=0.; 32 32 33 33 %delete domain
Note:
See TracChangeset
for help on using the changeset viewer.