quadrature_map#

class QuadratureMap(mesh, deg, material, cells=None)[source]#

Bases: object

Abstract data structure to handle a user-defined material in a form.

gradients#

dictionary of gradients represented by Quadrature functions

Type:

dict

fluxes#

dictionary of fluxes represented by Quadrature functions

Type:

dict

internal_state_variables#

dictionary of internal state variables represented by Quadrature functions

Type:

dict

external_state_variables#

dictionary of internal state variables represented by Quadrature functions

Type:

dict

dx#

ufl.Measure defined with consistent quadrature degree

Type:

ufl.Measure

Parameters:
  • mesh (dolfinx.mesh) – The underlying Mesh object

  • deg (int) – Degree of quadrature space

  • material (dolfinx_materials.Material) – A user-defined material object

  • cells (list, np.ndarray) – List of cells affected by the material. If None (default), acts on all cells of the domain.

advance()[source]#

Advance in time by copying current state dictionary in old state. Must be used only after having converged globally.

derivative(F, u, du)[source]#

Computes derivative of non-linear form F

eval_quadrature(ufl_expr, fem_func)[source]#

Evaluates an expression at quadrature points and updates the corresponding function.

project_on(name, interp)[source]#

Computes a projection onto standard FE space.

Parameters:
  • name (str) – Name of the field to project

  • interp (tuple) – Tuple of interpolation space info to project on, e.g. (“DG”, 0). Shape is automatically deduced.

register_external_state_variable(name, ext_state_var)[source]#

Registers a UFL expression as an external state variable.

Parameters:
  • name (str) – Name of the external state variable field

  • ext_state_var (float, np.ndarray, UFL expression) – Constant or UFL expression to register, e.g. fem.Function(V, name=”Temperature”)

register_gradient(name, gradient)[source]#

Registers a UFL expression as a gradient.

Parameters:
  • name (str) – Name of the gradient field

  • gradient (UFL expression) – UFL expression to register, e.g. ufl.grad(u)

update()[source]#

Perform constitutive update call.

update_external_state_variables()[source]#

Update material external state variables with dolfinx values.

update_initial_state(field_name, value=None)[source]#

Update a material field with corresponding dolfinx object.

update_material_properties()[source]#

Update material properties from provided values.

update_material_rotation_matrix()[source]#

Update material rotation matrix with dolfinx values.