UFCTetrahedron.compute_normal() is bigger by factor two

Issue #26 new
Jan Blechta created an issue

UFCTetrahedron.compute_normal() gives a facet normal of length two. Unfortunately it is not easy to fix this as it propagates down to the definition of Raviart-Thomas elements, which have by convention fixed basis/dual basis in FEniCS (users are saving data to files, etc.).

As a result the definition of facet nodes of Raviart-Thomas on UFCTetrahedron has unusual factor two.

import FIAT

T = FIAT.ufc_simplex(2)
H = FIAT.ufc_simplex(3)

print([T.volume_of_subcomplex(1, i) for i in range(3)])
print([H.volume_of_subcomplex(2, i) for i in range(4)])

print([T.compute_normal(i) for i in range(3)])
print([H.compute_normal(i) for i in range(4)])  # factor 2!

print([T.compute_scaled_normal(i) for i in range(3)])
print([H.compute_scaled_normal(i) for i in range(4)])  # factor 2!

print([f.get_point_dict() for f in FIAT.RaviartThomas(T, 1).dual_basis()])
print([f.get_point_dict() for f in FIAT.RaviartThomas(H, 1).dual_basis()])  # factor 2!

The bug introduced as a "temporary" fix in 2010 c07341c0ff5f40333b3640ee53e26d661177c336.

Comments (0)

  1. Log in to comment