salvus.fem.derivatives
salvus.fem.derivatives salvus fem derivatives Functions to compute derivatives of nodal fields.
Functions
compute_gradient()
compute_gradient()def compute_gradient(
nodes: _ElementNodes | npt.NDArray, nodal_fields: dict[str, npt.NDArray]
) -> dict[str, npt.NDArray]: ...Compute the gradient of a field defined at the GLL points.
This function computes the derivatives of the N + 1 Lagrange polynomials (N being the polynomial order) to compute the derivative of a field that is defined at the GLL points.
Parameters
nodes_ElementNodes | npt.NDArray — Element nodes at which the gradient should be computed.nodal_fieldsdict[str, npt.NDArray] — The fields defined at the element nodes for which the gradient should be computed.
Returns dict[str, npt.NDArray] — Dict containing the derivatives of the fields with respect to each dimension. Each derivative has the same shape as the input field.