utils#
- axi_grad(r, v)[source]#
- Axisymmetric gradient in cylindrical coordinate \((\boldsymbol{e}_r, \boldsymbol{e}_{\theta}, \boldsymbol{e}_z)\) for:
a scalar \(v(r, z)\)
a 2d-vector \((v_r(r,z), v_z(r, z))\)
a 3d-vector \((v_r(r,z), 0, v_z(r, z))\)
- deformation_gradient(g, dim=3)[source]#
Return deformation gradient \(\boldsymbol{F}\) components in vector form.
- nonsymmetric_tensor_to_vector(T, T22=0)[source]#
Return nonsymmetric tensor components in vector form notation following MFront conventions T22 can be specified when T is only (2,2)
- project(original_field, target_field: Function, dx: Measure = Measure('cell', subdomain_id='everywhere'), bcs=[], smooth=None, entity_maps=None)[source]#
Performs a manual projection of an original function onto a target space.
- Parameters:
original_field (fem.Function/fem.Expression) – Original function/expression to project.
target_field (fem.Function) – Receiver function.
dx (ufl.Measure, optional) – Volume measure used for projection, by default ufl.dx
bcs (list, optional) – Boundary conditions, by default []
smooth (float, optional) – Performs a smoothed projection with a Helmholtz filter of size smooth
entity_maps (dict) – Entity maps in case of mixed subdomains