Equana

Docs/Finite Element (MFEM)/mfem.gridfunction.getDivergence
Back to Finite Element (MFEM)

mfem.gridfunction.getDivergence

Computes the divergence of a vector grid function at a point within an element.

Syntax

mfem.gridfunction.getDivergence(gf, elemIdx, ip)

Description

Computes the divergence of a vector grid function at a point within an element. The divergence is computed in physical coordinates: div(F) = ∂Fx/∂x + ∂Fy/∂y + ∂Fz/∂z This is typically used with H(div) finite element spaces (Raviart-Thomas elements).

Parameters

NameDescription
gf- Vector GridFunction (e.g., from H(div) space)
elemIdx- Index of the element containing the point (0-based)
ip- Integration point in reference coordinates

Returns

number