sfepy.discrete.iga.fields module

Fields for isogeometric analysis.

class sfepy.discrete.iga.fields.IGField(name, dtype, shape, region, approx_order=None, **kwargs)[source]

Bezier extraction based NURBS field for isogeometric analysis.

Notes

The field has to cover the whole IGA domain. The field’s NURBS basis can have higher degree than the domain NURBS basis.

create_mapping(ig, region, integral, integration)[source]

Create a new reference mapping.

create_output(dofs, var_name, dof_names=None, key=None, **kwargs)[source]

Convert the DOFs corresponding to the field to a dictionary of output data usable by Mesh.write().

Parameters:

dofs : array, shape (n_nod, n_component)

The array of DOFs reshaped so that each column corresponds to one component.

var_name : str

The variable name corresponding to dofs.

dof_names : tuple of str

The names of DOF components.

key : str, optional

The key to be used in the output dictionary instead of the variable name.

Returns:

out : dict

The output dictionary.

family_name = 'volume_H1_iga'
get_data_shape(ig, integral, integration='volume', region_name=None)[source]

Get element data dimensions.

Parameters:

ig : int

The element group index.

integral : Integral instance

The integral describing used numerical quadrature.

integration : ‘volume’, ‘plate’, ‘surface’, ‘surface_extra’ or ‘point’

The term integration type.

region_name : str

The name of surface region, required when shape_kind is ‘surface’.

Returns:

data_shape : 4 ints

The (n_el, n_qp, dim, n_en) for volume shape kind.

Notes

  • n_el = number of elements
  • n_qp = number of quadrature points per element/facet
  • dim = spatial dimension
  • n_en = number of element nodes
get_dofs_in_region_group(region, ig, merge=True)[source]

Return indices of DOFs that belong to the given region and group.

Notes

ig, merge are not used.

get_econn(conn_type, region, ig, is_trace=False, integration=None)[source]

Get DOF connectivity of the given type in the given region.

get_true_order()[source]
is_higher_order()[source]

Return True, if the field’s approximation order is greater than one.

set_dofs(fun=0.0, region=None, dpn=None, warn=None)[source]

Set the values of DOFs given by the region using a function of space coordinates or value fun.

If fun is a function, the l2 projection that is global for all region facets is used to set the DOFs.

If dpn > 1, and fun is a function, it has to return the values DOF-by-DOF, i.e. a single one-dimensional vector with all values of the first component, then of the second one etc. concatenated together.

Parameters:

fun : float or array of length dpn or callable

The DOF values.

region : Region

The region containing the DOFs.

dpn : int, optional

The DOF-per-node count. If not given, the number of field components is used.

warn : str, optional

The warning message printed when the region selects no DOFs.

Returns:

nods : array, shape (n_dof,)

The field DOFs (or node indices) given by the region.

vals : array, shape (dpn, n_dof)

The values of the DOFs, DOF-by-DOF when raveled in C (row-major) order.

setup_extra_data(geometry, info, is_trace)[source]
sfepy.discrete.iga.fields.parse_approx_order(approx_order)[source]