sfepy.discrete.iga.utils module

Utility functions based on igakit.

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

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

Parameters:
nurbsigakit.nurbs.NURBS instance

The NURBS object.

parssequence 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:
coorsarray

The coordinates of mesh vertices.

connarray

The vertex connectivity array.

descstr

The cell kind.

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

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:
nurbsigakit.nurbs.NURBS instance

The NURBS object.

parssequence 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.

**kwargskwargs

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

Returns:
meshMesh instance

The finite element mesh.

outdict

The output dictionary.

sfepy.discrete.iga.utils.save_basis(nurbs, pars)[source]

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

Parameters:
nurbsigakit.nurbs.NURBS instance

The NURBS object.

parssequence of array, optional

The values of parameters in each parametric dimension.