Back to Finite Element (MFEM)
mfem.mesh.getSurfaceTangents
Gets the tangent vectors at a point on a boundary element.
Syntax
mfem.mesh.getSurfaceTangents(mesh, bdrIndex, refPoint?, normalize?)
Description
Gets the tangent vectors at a point on a boundary element. The tangent vectors are extracted directly from the Jacobian matrix columns. For a 1D boundary element (edge), returns 1 tangent vector. For a 2D boundary element (face), returns 2 tangent vectors. The tangent vectors are NOT normalized - they represent the actual differential change in physical coordinates per unit change in reference coordinates. Use this for computing surface metrics, arc lengths, or areas.
Parameters
| Name | Description |
|---|---|
| mesh | - The mesh containing the boundary element |
| bdrIndex | - Zero-based boundary element index |
| refPoint(optional) | - Optional reference coordinates on the boundary element. If not provided, uses the element centroid. |
| normalize(optional) | - If true, normalize the tangent vectors to unit length. Default is false. |
Returns
number[][]