# sfepy.discrete.iga.utils module

Utility functions based on igakit.

sfepy.discrete.iga.utils.create_linear_fe_mesh(nurbs, pars=None)

  Convert a NURBS object into a nD-linear tensor product FE mesh.

  Parameters:
    nurbs igakit.nurbs.NURBS instance

      The NURBS object.

    pars sequence of array, optional

      The values of parameters in each parametric dimension. If not given, the values are set so that the resulting mesh has the same number of vertices as the number of control points/basis functions of the NURBS object.

  Returns:
    coors array

      The coordinates of mesh vertices.

    conn array

      The vertex connectivity array.

    desc str

      The cell kind.

sfepy.discrete.iga.utils.create_mesh_and_output(nurbs, pars=None, **kwargs)

  Create a nD-linear tensor product FE mesh using `create_linear_fe_mesh()`, evaluate field variables given as keyword arguments in the mesh vertices and create a dictionary of output data usable by Mesh.write().

  Parameters:
    nurbs igakit.nurbs.NURBS instance

      The NURBS object.

    pars sequence of array, optional

      The values of parameters in each parametric dimension. If not given, the values are set so that the resulting mesh has the same number of vertices as the number of control points/basis functions of the NURBS object.

    **kwargs kwargs

      The field variables as keyword arguments. Their names serve as keys in the output dictionary.

  Returns:
    mesh Mesh instance

      The finite element mesh.

    out dict

      The output dictionary.

sfepy.discrete.iga.utils.save_basis(nurbs, pars)

  Save a NURBS object basis on a FE mesh corresponding to the given parametrization in VTK files.

  Parameters:
    nurbs igakit.nurbs.NURBS instance

      The NURBS object.

    pars sequence of array, optional

      The values of parameters in each parametric dimension.