sfepy.discrete.fem.fields_nodal module

Notes

Important attributes of continuous (order > 0) Field and SurfaceField instances:

  • vertex_remap : econn[:, :n_vertex] = vertex_remap[conn]

  • vertex_remap_i : conn = vertex_remap_i[econn[:, :n_vertex]]

where conn is the mesh vertex connectivity, econn is the region-local field connectivity.

class sfepy.discrete.fem.fields_nodal.GlobalNodalLikeBasis(**kwargs)[source]
get_surface_basis(region)[source]

Get basis for projections to region’s facets.

Notes

Cannot be uses for all fields because IGA does not support surface mappings.

class sfepy.discrete.fem.fields_nodal.H1DiscontinuousField(name, dtype, shape, region, approx_order=1)[source]

The C0 constant-per-cell approximation.

average_to_vertices(dofs)[source]

Average DOFs of the discontinuous field into the field region vertices.

extend_dofs(dofs, fill_value=None)[source]

Extend DOFs to the whole domain using the fill_value, or the smallest value in dofs if fill_value is None.

family_name = 'volume_H1_lagrange_discontinuous'
remove_extra_dofs(dofs)[source]

Remove DOFs defined in higher order nodes (order > 1).

class sfepy.discrete.fem.fields_nodal.H1NodalMixin(**kwargs)[source]
create_basis_context()[source]

Create the context required for evaluating the field basis.

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

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

class sfepy.discrete.fem.fields_nodal.H1NodalSurfaceField(name, dtype, shape, region, approx_order=1)[source]

A field defined on a surface region.

family_name = 'surface_H1_lagrange'
interp_v_vals_to_n_vals(vec)[source]

Interpolate a function defined by vertex DOF values using the FE surface geometry base (P1 or Q1) into the extra nodes, i.e. define the extra DOF values.

class sfepy.discrete.fem.fields_nodal.H1NodalVolumeField(name, dtype, shape, region, approx_order=1)[source]

Lagrange basis nodal approximation.

family_name = 'volume_H1_lagrange'
interp_v_vals_to_n_vals(vec)[source]

Interpolate a function defined by vertex DOF values using the FE geometry base (P1 or Q1) into the extra nodes, i.e. define the extra DOF values.

class sfepy.discrete.fem.fields_nodal.H1SEMSurfaceField(name, dtype, shape, region, approx_order=1)[source]
family_name = 'surface_H1_sem'
class sfepy.discrete.fem.fields_nodal.H1SEMVolumeField(name, dtype, shape, region, approx_order=1)[source]

Spectral element method approximation.

Uses the Lagrange basis with Legendre-Gauss-Lobatto nodes and quadrature.

create_basis_context()[source]

Create the context required for evaluating the field basis.

family_name = 'volume_H1_sem'
class sfepy.discrete.fem.fields_nodal.H1SNodalSurfaceField(name, dtype, shape, region, approx_order=1)[source]
family_name = 'surface_H1_serendipity'
class sfepy.discrete.fem.fields_nodal.H1SNodalVolumeField(name, dtype, shape, region, approx_order=1)[source]

Lagrange basis nodal serendipity approximation with order <= 3.

create_basis_context()[source]

Create the context required for evaluating the field basis.

family_name = 'volume_H1_serendipity'