gf_plot_mesh

Purpose

Mesh plotting function. 

Synopsis

[hmesh,hbound,hfill,hvert,hconv,hdof]=gf_plot_mesh(M, ...)

Description

The various options are expected as a list pair "option name"/"option value". These options are:

'vertices', {'off' | 'on'} displays also vertices numbers.
'convexes', {'off' | 'on'} displays also convexes numbers.
'dof',{'off' | 'on'} displays also finite element nodes.
'boundaries',blst displays the boundaries listed in blst.
'cvlst',cvlst display only the listed convexes. If cvlst has two rows, display only the faces listed in the second row.
'edges', {'on' | 'off'} display edges ?
'faces',{'off' | 'on'} fills each 2D-face of the mesh
'curved',{'off' | 'on'} displays curved edges (useful for quadratic meshes)
'refine',N refine curved edges and filled faces N times
'deformation', Udef optional deformation applied to the mesh (M must be a mesh_fem object)
'edges_color',[.6 .6 1] RGB values for the color of edges
'edges_width',1
'faces_color',[.75 .75 .75]) RGB values for the color of faces
'quality', {'off' | 'on'} show the quality of the mesh

This function can be used with any mesh in any dimension (except if the 'faces' options is turned on). On output, this function returns the handles to the various graphical objects created: hmesh is the handles to the mesh lines, hbound is the handles to the edges of the boundaries, hfill is the handle of the patch objects of faces, hvert (resp hconv,hdof) is the handles of the vertices (resp. convexes, dof) labels.

Examples

Displaying a donut (meshed with quadratic tetrahedrons) created with GiD:
% the mesh is in the tests directory of the distribution
m=gf_mesh('import','gid','donut_with_quadratic_tetra_314_elements.msh');
gf_plot_mesh(m,'refine',15,'cvlst',gf_mesh_get(m,'outer faces'),'faces','on',...
'faces_color',[1. .9 .2],'curved','on','edges_width',2); 
camlight % turn on the light!  

a donut
you can notice that the mesh has a small default on some elements.

See Also