5.10. Primitive operators and wrappers¶
mirgecom.operators
provides helper functions for composing DG operators.
- mirgecom.operators.grad_operator(dcoll, dd_vol, dd_allfaces, u, flux)[source]¶
Compute a DG gradient for the input u with flux given by flux.
- Parameters:
dcoll (grudge.discretization.DiscretizationCollection) – the discretization collection to use
dd_vol (grudge.dof_desc.DOFDesc) – the degree-of-freedom tag associated with the volume discretization. This determines the type of quadrature to be used.
dd_allfaces (grudge.dof_desc.DOFDesc) – the degree-of-freedom tag associated with the surface discretization. This determines the type of quadrature to be used.
u (meshmode.dof_array.DOFArray or numpy.ndarray) – the function (or container of functions) for which gradient is to be calculated
flux (numpy.ndarray) – the boundary flux across the faces of the element for each component of u
- Returns:
the dg gradient operator applied to u
- Return type:
- mirgecom.operators.div_operator(dcoll, dd_vol, dd_allfaces, v, flux)[source]¶
Compute DG divergence of vector-valued func v with flux given by flux.
- Parameters:
dcoll (grudge.discretization.DiscretizationCollection) – the discretization collection to use
dd_vol (grudge.dof_desc.DOFDesc) – the degree-of-freedom tag associated with the volume discretization. This determines the type of quadrature to be used.
dd_allfaces (grudge.dof_desc.DOFDesc) – the degree-of-freedom tag associated with the surface discretization. This determines the type of quadrature to be used.
v (numpy.ndarray) – obj array of
DOFArray
(or container of such) representing the vector-valued functions for which divergence is to be calculatedflux (numpy.ndarray) – the boundary flux for each function in v
- Returns:
the dg divergence operator applied to vector-valued function(s) v.
- Return type: