Index: /issm/trunk-jpl/src/m/mesh/roundmesh.m
===================================================================
--- /issm/trunk-jpl/src/m/mesh/roundmesh.m	(revision 22318)
+++ /issm/trunk-jpl/src/m/mesh/roundmesh.m	(revision 22319)
@@ -10,18 +10,18 @@
 
 %First we have to create the domain outline 
+expname = [tempname() '.exp'];
 
 %Get number of points on the circle
-pointsonedge=floor((2.*pi*radius) / resolution);
+pointsonedge=floor((2.*pi*radius) / resolution)+1; %+1 to close the outline
 
 %Calculate the cartesians coordinates of the points
-x_list=ones(pointsonedge,1); y_list=ones(pointsonedge,1);
-theta=(0.:2.*pi/pointsonedge:2.*pi*(1.-1./pointsonedge))';
-x_list=roundsigfig(radius*x_list.*cos(theta),12);
-y_list=roundsigfig(radius*y_list.*sin(theta),12);
+theta=linspace(0,2*pi,pointsonedge)';
+x_list=roundsigfig(radius*cos(theta),12);
+y_list=roundsigfig(radius*sin(theta),12);
 A=struct('x',x_list,'y',y_list,'density',1.);
-expwrite(A,'RoundDomainOutline.exp');
+expwrite(A,expname);
 
 %Call Bamg
-md=triangle(md,'RoundDomainOutline.exp',resolution);
+md=triangle(md,expname,resolution);
 %md=bamg(md,'domain','RoundDomainOutline.exp','hmin',resolution);
 
@@ -32,5 +32,5 @@
 
 %delete domain
-delete('RoundDomainOutline.exp')
+delete(expname);
 end
 
