Changeset 22319
- Timestamp:
- 01/03/18 10:07:00 (7 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/mesh/roundmesh.m
r15106 r22319 10 10 11 11 %First we have to create the domain outline 12 expname = [tempname() '.exp']; 12 13 13 14 %Get number of points on the circle 14 pointsonedge=floor((2.*pi*radius) / resolution) ;15 pointsonedge=floor((2.*pi*radius) / resolution)+1; %+1 to close the outline 15 16 16 17 %Calculate the cartesians coordinates of the points 17 x_list=ones(pointsonedge,1); y_list=ones(pointsonedge,1); 18 theta=(0.:2.*pi/pointsonedge:2.*pi*(1.-1./pointsonedge))'; 19 x_list=roundsigfig(radius*x_list.*cos(theta),12); 20 y_list=roundsigfig(radius*y_list.*sin(theta),12); 18 theta=linspace(0,2*pi,pointsonedge)'; 19 x_list=roundsigfig(radius*cos(theta),12); 20 y_list=roundsigfig(radius*sin(theta),12); 21 21 A=struct('x',x_list,'y',y_list,'density',1.); 22 expwrite(A, 'RoundDomainOutline.exp');22 expwrite(A,expname); 23 23 24 24 %Call Bamg 25 md=triangle(md, 'RoundDomainOutline.exp',resolution);25 md=triangle(md,expname,resolution); 26 26 %md=bamg(md,'domain','RoundDomainOutline.exp','hmin',resolution); 27 27 … … 32 32 33 33 %delete domain 34 delete( 'RoundDomainOutline.exp')34 delete(expname); 35 35 end 36 36
Note:
See TracChangeset
for help on using the changeset viewer.