From 6ccaa14d83911609e4b56740cbbca40bf4509675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Schartum=20Dokken?= Date: Tue, 10 Dec 2024 16:49:20 +0100 Subject: [PATCH] API fixes related to `dolfinx.fem.FiniteElement` (#146) * API fixes related to: https://github.com/FEniCS/dolfinx/pull/3552 and the regression in https://github.com/FEniCS/dolfinx/blob/main/python/dolfinx/wrappers/fem.cpp#L183 * Ruff formatting --- tests/conftest.py | 6 ++---- tests/test_original_checkpoint.py | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 0e16ddb..19c745f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -25,8 +25,7 @@ def _write_function(mesh, el, f, dtype, name="uh", append: bool = False) -> str: uh.interpolate(f) uh.name = name el_hash = ( - V.element.signature() - .replace(" ", "") + V.element.signature.replace(" ", "") .replace(",", "") .replace("(", "") .replace(")", "") @@ -98,8 +97,7 @@ def _write_function_time_dep(mesh, el, f0, f1, t0, t1, dtype) -> str: uh = dolfinx.fem.Function(V, dtype=dtype) uh.interpolate(f0) el_hash = ( - V.element.signature() - .replace(" ", "") + V.element.signature.replace(" ", "") .replace(",", "") .replace("(", "") .replace(")", "") diff --git a/tests/test_original_checkpoint.py b/tests/test_original_checkpoint.py index 609e33f..425431b 100644 --- a/tests/test_original_checkpoint.py +++ b/tests/test_original_checkpoint.py @@ -128,8 +128,7 @@ def write_function_original( uh.interpolate(f) uh.name = name el_hash = ( - V.element.signature() - .replace(" ", "") + V.element.signature.replace(" ", "") .replace(",", "") .replace("(", "") .replace(")", "") @@ -219,8 +218,7 @@ def write_function_vector( uh.interpolate(f) uh.name = name el_hash = ( - V.element.signature() - .replace(" ", "") + V.element.signature.replace(" ", "") .replace(",", "") .replace("(", "") .replace(")", "")