Changeset 22319


Ignore:
Timestamp:
01/03/18 10:07:00 (7 years ago)
Author:
Mathieu Morlighem
Message:

CHG: fixed roundmesh, need to use linspace rather than colon operator

Location:
issm/trunk-jpl
Files:
4 edited

Legend:

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

    r15106 r22319  
    1010
    1111%First we have to create the domain outline
     12expname = [tempname() '.exp'];
    1213
    1314%Get number of points on the circle
    14 pointsonedge=floor((2.*pi*radius) / resolution);
     15pointsonedge=floor((2.*pi*radius) / resolution)+1; %+1 to close the outline
    1516
    1617%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);
     18theta=linspace(0,2*pi,pointsonedge)';
     19x_list=roundsigfig(radius*cos(theta),12);
     20y_list=roundsigfig(radius*sin(theta),12);
    2121A=struct('x',x_list,'y',y_list,'density',1.);
    22 expwrite(A,'RoundDomainOutline.exp');
     22expwrite(A,expname);
    2323
    2424%Call Bamg
    25 md=triangle(md,'RoundDomainOutline.exp',resolution);
     25md=triangle(md,expname,resolution);
    2626%md=bamg(md,'domain','RoundDomainOutline.exp','hmin',resolution);
    2727
     
    3232
    3333%delete domain
    34 delete('RoundDomainOutline.exp')
     34delete(expname);
    3535end
    3636
Note: See TracChangeset for help on using the changeset viewer.