Skip to content

Commit

Permalink
fix scale
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrubeck committed Oct 24, 2024
1 parent f1a5629 commit c723d50
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions FIAT/hellan_herrmann_johnson.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ def __init__(self, ref_el, degree, variant):
phis = P.tabulate(Q.get_points())[(0,)*(sd-1)]
for entity in sorted(top[sd-1]):
cur = len(nodes)
n = ref_el.compute_scaled_normal(entity)
comp = n[:, None] * n[None, :]
Q_mapped = FacetQuadratureRule(ref_el, sd-1, entity, Q)
detJ = Q_mapped.jacobian_determinant()
n = ref_el.compute_scaled_normal(entity)
comp = (n[:, None] * n[None, :]) / detJ
nodes.extend(FrobeniusIntegralMoment(ref_el, Q_mapped,
comp[:, :, None] * phi[None, None, :])
for phi in phis)
Expand Down
3 changes: 2 additions & 1 deletion FIAT/regge.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ def __init__(self, ref_el, degree, variant):
for entity in sorted(top[dim]):
cur = len(nodes)
tangents = ref_el.compute_face_edge_tangents(dim, entity)
basis = [t[:, None] * t[None, :] for t in tangents]
Q_mapped = FacetQuadratureRule(ref_el, dim, entity, Q)
detJ = Q_mapped.jacobian_determinant()
basis = [(t[:, None] * t[None, :]) / detJ for t in tangents]
nodes.extend(FrobeniusIntegralMoment(ref_el, Q_mapped,
comp[:, :, None] * phi[None, None, :])
for phi in phis for comp in basis)
Expand Down

0 comments on commit c723d50

Please sign in to comment.