0001 function p=newbmesh(p)
0002
0003 q=p;
0004 msel=0; msel=asknu('Delaunay (0) or point-mesh(1)?',msel);
0005 if(msel==0)
0006 xmin=min(p.points(1,:)); xmax=max(p.points(2,:));
0007 ymin=min(p.points(2,:)); ymax=max(p.points(2,:));
0008 hmax=min((xmax-xmin)/20,(ymax-ymin)/20);
0009 hmax=asknu('hmax:', hmax); q=stanmesh(q,hmax);
0010 else nx=20;ny=20; nx=asknu('nx', nx);ny=asknu('ny', ny);
0011 q=stanmesh(q,nx,ny);
0012 end
0013 p.bpoints=q.points; p.bedges=q.edges; p.btria=q.tria; p.maxt=2*q.nt;
0014