<?xml version="1.0" encoding="UTF-8"?>
<refentry version="5.0-subset Scilab" xml:id="gf_plot_mesh" xml:lang="en"
          xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:xi="http://www.w3.org/2001/XInclude"
          xmlns:svg="http://www.w3.org/2000/svg"
          xmlns:mml="http://www.w3.org/1998/Math/MathML"
          xmlns:html="http://www.w3.org/1999/xhtml"
          xmlns:db="http://docbook.org/ns/docbook">
  <refnamediv>
    <refname>gf_plot_mesh</refname>

    <refpurpose>General mesh plotting function.</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <title>Calling Sequence</title>

    <synopsis>[hmesh,hbound,hfill,hvert,hconv,hdof]=gf_plot_mesh(M, [,properties] [,'cvlst',CVLST] ['boundaries'[BLST]])</synopsis>
  </refsynopsisdiv>

  <refsection>
    <title>Description</title>

    <para>H=gf_plot_mesh(M) displays a mesh.</para>

    <para>Properties are:</para>

    <itemizedlist>
      <listitem>
        <para>'vertices', {'off'|'on'} displays also vertices numbers.</para>
      </listitem>

      <listitem>
        <para>'convexes', {'off'|'on'} displays also convexes numbers.</para>
      </listitem>

      <listitem>
        <para>'dof',{'off'|'on'} displays also finite element nodes.</para>
      </listitem>

      <listitem>
        <para>'regions',BLST displays the boundaries listed in BLST.</para>
      </listitem>

      <listitem>
        <para>'cvlst',CVLST display only the listed convexes. If CVLST has two
        rows, display only the faces listed in the second row.</para>
      </listitem>

      <listitem>
        <para>'edges', {'on' | 'off'} display edges ?</para>
      </listitem>

      <listitem>
        <para>'faces', {'off'|'on'} fills each 2D-face of the mesh</para>
      </listitem>

      <listitem>
        <para>'curved', {'off'|'on'} displays curved edges</para>
      </listitem>

      <listitem>
        <para>'refine',N refine curved edges and filled faces N times</para>
      </listitem>

      <listitem>
        <para>'deformation', Udef optionnal deformation applied to the mesh (M
        must be a mesh_fem object)</para>
      </listitem>

      <listitem>
        <para>'edges_color',[.6 .6 1] RGB values for the color of edges</para>
      </listitem>

      <listitem>
        <para>'edges_width',1</para>
      </listitem>

      <listitem>
        <para>'faces_color',[.75 .75 .75]) RGB values for the color of
        faces</para>
      </listitem>

      <listitem>
        <para>'quality',{ 'off' | 'on' } Display the quality of the
        mesh.</para>
      </listitem>
    </itemizedlist>

    <para>CAUTION: For 'dof', M should be a mesh_fem identifier, not a simple
    mesh object.</para>

    <para>This function can be used with any mesh in any dimension (except if
    the 'faces' options is turned on).</para>

    <para>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.</para>
  </refsection>

  <refsection>
    <title>Examples</title>

    <para>Displaying a donut (meshed with quadratic tetrahedrons) created with
    <ulink url="http://gid.cimne.upc.es/">GiD</ulink>:</para>

    <programlisting role="example"> 
// the mesh is in the demos directory of the distribution
m = gf_mesh('import','gid','donut_with_quadratic_tetra_1100_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); 
 </programlisting>

    <mediaobject>
      <imageobject>
        <imagedata align="center" fileref="../fig/gf_plot_mesh_fig_1.png" />
      </imageobject>
    </mediaobject>

    <para>You can notice that the mesh has a small default on some
    elements.</para>
  </refsection>

  <refsection>
    <title>See Also</title>

    <simplelist type="inline">
      <member><link linkend="gf_plot">gf_plot</link></member>
    </simplelist>
  </refsection>
</refentry>
