Function opensn::FaceTraceConstant

Function Documentation

double opensn::FaceTraceConstant(const CellMapping &cell_mapping, const Cell &cell, unsigned int f, const DenseMatrix<double> &stiffness, CoordinateSystemType coord_sys = CoordinateSystemType::CARTESIAN)

Trace constant \(C_{grad} = h_f \max_v \|\partial_n v\|_f^2 / \|\nabla v\|_K^2\) of the basis of cell_mapping on face f of cell, from the cell stiffness matrix stiffness ( \(\int_K \nabla b_i \cdot \nabla b_j\)) and the face’s normal-derivative mass matrix, with \(h_f\) = FaceOrthogonalLength.

Exactly 3 for linear functions on a tetrahedron. Both norms carry the spatial weight of coord_sys (r in RZ); stiffness must be computed with the same weight (ComputeUnitCellIntegrals with coord_sys).