Home > p2plib > newbmesh.m

newbmesh

PURPOSE ^

build new base mesh

SYNOPSIS ^

function p=newbmesh(p)

DESCRIPTION ^

 build new base mesh

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function p=newbmesh(p) 
0002 % build new base mesh
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

Generated on Wed 15-Aug-2012 10:09:15 by m2html © 2005