From 1ff2c8edf934e15ec41d0cc819b7bbefc026b3f4 Mon Sep 17 00:00:00 2001 From: Matthew Scroggs Date: Wed, 6 Sep 2023 17:40:31 +0100 Subject: [PATCH] Add test that wcoeffs are orthonormal --- test/test_wcoeffs.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test_wcoeffs.py b/test/test_wcoeffs.py index bd11dfd36..9efad3f52 100644 --- a/test/test_wcoeffs.py +++ b/test/test_wcoeffs.py @@ -52,12 +52,16 @@ @pytest.mark.parametrize("variant", variants) def test_create_element(cell, degree, family, variant): """Check that either the element is created or a RuntimeError is thrown.""" + print(cell, degree, family, variant) try: element = basix.create_element(family, cell, degree, *variant) except RuntimeError: pytest.xfail("Element not supported") wcoeffs = element.wcoeffs + print(wcoeffs) + for i, rowi in enumerate(wcoeffs): + print([np.dot(rowi, rowj) for j, rowj in enumerate(wcoeffs)]) for i, rowi in enumerate(wcoeffs): for j, rowj in enumerate(wcoeffs): assert np.isclose(np.dot(rowi, rowj), int(i == j))