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_basis_context(self)[source]

Create the context required for evaluating the field basis.

create_eval_mesh(self)[source]

Create a mesh with the original NURBS connectivity for evaluating the field. The mesh coordinates are the NURBS control points.

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

Create a new reference mapping.

create_mesh(self, extra_nodes=True)[source]

Create a mesh corresponding to the field region. For IGA fields, this is directly the topological mesh. The extra_nodes argument is ignored.

create_output(self, 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
dofsarray, shape (n_nod, n_component)

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

var_namestr

The variable name corresponding to dofs.

dof_namestuple of str

The names of DOF components.

keystr, optional

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

Returns
outdict

The output dictionary.

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

Get element data dimensions.

Parameters
integralIntegral instance

The integral describing used numerical quadrature.

integration‘volume’

The term integration type. Only ‘volume’ type is implemented.

region_namestr

The name of the region of the integral.

Returns
data_shape4 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(self, region, merge=True)[source]

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

Notes

merge is not used.

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

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

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

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

set_dofs(self, 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
funfloat or array of length dpn or callable

The DOF values.

regionRegion

The region containing the DOFs.

dpnint, optional

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

warnstr, optional

The warning message printed when the region selects no DOFs.

Returns
nodsarray, shape (n_dof,)

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

valsarray, shape (dpn, n_dof)

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

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