Version:

salvus.fem.integrals

salvus.fem.integrals salvus fem integrals
Functions to compute volume integrals of mesh fields.

Functions

compute_integral()

Compute the integral of a field over the mesh.
This function computes the volume integrals of the passed fields defined as elemental fields or elemental nodal fields.
SIGNATURE
def compute_integral(
    nodes: _ElementNodes | npt.NDArray, fields: dict[str, npt.NDArray]
) -> dict[str, float]: ...
ARGUMENTS
Required
nodes
Type:_ElementNodes | npt.NDArray
Description:
Element nodes or numpy array of which the field is defined. If a Numpy array is passed, it should be of shape (nelem, n_nodes_per_element, ndim).
Required
fields
Type:dict[str, npt.NDArray]
Description:
The fields which the gradient should be computed, shaped either as (nelem, n_nodes_per_element) or (nelem,).
RETURNS
Return type: dict[str, float]
Dictionary containing the volume integrals of the fields with respect to each dimension. Each intergral is a float.
PAGE CONTENTS