Code covered by the BSD License  

Highlights from
regular_mesh

image thumbnail

regular_mesh

by

 

Regular (uniform) meshes for non-rectangular domains.

drawedges(geom)
function drawedges(geom)

[p,e,t] = initmesh(geom,'Hmax',0.9);

for i=1:size(e,2)
	p1   = p(:,e(1,i));
	p2   = p(:,e(2,i));
    midp = (p1+p2)./2;
	
    pdemesh(p,e,t);
    hold on;
    text(midp(1),midp(2),[num2str(i),'=',num2str(e(5,i))],'BackgroundColor',[.7 .9 .7]);
end

title('EDGES AND THEIR SEGMENTS')

end

Contact us