<?xml version="1.0" encoding="UTF-8"?>
<refentry version="5.0-subset Scilab" xml:id="gf_mesh_fem_set" 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_mesh_fem_set</refname>
    <refpurpose>  General function for modifying mesh_fem objects.
  </refpurpose>
  </refnamediv>

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

    <synopsis>gf_mesh_fem_set(mesh_fem MF, 'fem', fem f[, ivec CVids])</synopsis>
    <synopsis>gf_mesh_fem_set(mesh_fem MF, 'classical fem', int k[, ivec CVids])</synopsis>
    <synopsis>gf_mesh_fem_set(mesh_fem MF, 'classical discontinuous fem', int K[, @tscalar alpha[, ivec CVIDX]])</synopsis>
    <synopsis>gf_mesh_fem_set(mesh_fem MF, 'qdim', int Q)</synopsis>
    <synopsis>gf_mesh_fem_set(mesh_fem MF, 'reduction matrices', mat R, mat E)</synopsis>
    <synopsis>gf_mesh_fem_set(mesh_fem MF, 'reduction', int s)</synopsis>
    <synopsis>gf_mesh_fem_set(mesh_fem MF, 'reduce meshfem', mat RM)</synopsis>
    <synopsis>gf_mesh_fem_set(mesh_fem MF, 'dof partition', ivec DOFP)</synopsis>
    <synopsis>gf_mesh_fem_set(mesh_fem MF, 'set partial', ivec DOFs[, ivec RCVs])</synopsis>
  </refsynopsisdiv>

  <refsection>
    <title>Description</title>
    <para>  General function for modifying mesh_fem objects.
  </para>
  </refsection>

  <refsection>
    <title>Command list</title>

    <itemizedlist>
    <listitem>
    <para><literal>gf_mesh_fem_set(mesh_fem MF, 'fem', fem f[, ivec CVids])</literal></para>

    <para>         Set the Finite Element Method.
      
      Assign a FEM <literal>f</literal> to all convexes whose #ids are listed in <literal>CVids</literal>.
      If <literal>CVids</literal> is not given, the integration is assigned to all convexes.
      
      See the help of gf_fem to obtain a list of available FEM methods.
    </para>
    </listitem>

    <listitem>
    <para><literal>gf_mesh_fem_set(mesh_fem MF, 'classical fem', int k[, ivec CVids])</literal></para>

    <para>       Assign a classical (Lagrange polynomial) fem of order <literal>k</literal> to the mesh_fem.

    Uses FEM_PK for simplexes, FEM_QK for parallelepipeds etc.
    </para>
    </listitem>

    <listitem>
    <para><literal>gf_mesh_fem_set(mesh_fem MF, 'classical discontinuous fem', int K[, @tscalar alpha[, ivec CVIDX]])</literal></para>

    <para>       Assigns a classical (Lagrange polynomial) discontinuous fem or order K.

    Similar to gf_mesh_fem_set(mesh_fem MF, 'classical fem') except that
    FEM_PK_DISCONTINUOUS is used. Param <literal>alpha</literal> the node inset,
    <latex style="text"><![CDATA[0 \leq alpha < 1]]></latex>, where 0 implies usual dof nodes, greater values
    move the nodes toward the center of gravity, and 1 means that all
    degrees of freedom collapse on the center of gravity.
    </para>
    </listitem>

    <listitem>
    <para><literal>gf_mesh_fem_set(mesh_fem MF, 'qdim', int Q)</literal></para>

    <para>         Change the <literal>Q</literal> dimension of the field that is interpolated by the mesh_fem.
      
      <literal>Q = 1</literal> means that the mesh_fem describes a scalar field, <literal>Q = N</literal> means
      that the mesh_fem describes a vector field of dimension N.
    </para>
    </listitem>

    <listitem>
    <para><literal>gf_mesh_fem_set(mesh_fem MF, 'reduction matrices', mat R, mat E)</literal></para>

    <para>         Set the reduction and extension matrices and valid their use.
    </para>
    </listitem>

    <listitem>
    <para><literal>gf_mesh_fem_set(mesh_fem MF, 'reduction', int s)</literal></para>

    <para>         Set or unset the use of the reduction/extension matrices.
    </para>
    </listitem>

    <listitem>
    <para><literal>gf_mesh_fem_set(mesh_fem MF, 'reduce meshfem', mat RM)</literal></para>

    <para>         Set reduction mesh fem
      This function selects the degrees of freedom of the finite element
      method by selecting a set of independent vectors of the matrix RM.
      The numer of columns of RM should corresponds to the number of degrees
      of fredoom of the finite element method.  
    </para>
    </listitem>

    <listitem>
    <para><literal>gf_mesh_fem_set(mesh_fem MF, 'dof partition', ivec DOFP)</literal></para>

    <para>         Change the 'dof_partition' array.
      
      <literal>DOFP</literal> is a vector holding a integer value for each convex of the mesh_fem.
      See gf_mesh_fem_get(mesh_fem MF, 'dof partition') for a description of "dof partition".
    </para>
    </listitem>

    <listitem>
    <para><literal>gf_mesh_fem_set(mesh_fem MF, 'set partial', ivec DOFs[, ivec RCVs])</literal></para>

    <para>         Can only be applied to a partial mesh_fem. Change the subset of the
      degrees of freedom of <literal>mf</literal>.

      If <literal>RCVs</literal> is given, no FEM will be put on the convexes listed
      in <literal>RCVs</literal>.
    </para>
    </listitem>

    </itemizedlist>
  </refsection>

  <refsection>
    <title>See Also</title>
    <simplelist type="inline">
      <member><link linkend="getfem_types">getfem types</link></member>
    </simplelist>
  </refsection>

  <refsection>
    <title>Authors</title>
    <para>Y. Collette</para>
  </refsection>

</refentry>
