From 0e30cbc353341da6df5eb9e97cc61d85e48de934 Mon Sep 17 00:00:00 2001 From: Umberto Zerbinati Date: Mon, 30 Oct 2023 15:36:44 +0000 Subject: [PATCH] Fixing FIAT element used. Correction by Pablo --- ngsPETSc/utils/firedrake.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ngsPETSc/utils/firedrake.py b/ngsPETSc/utils/firedrake.py index 24cc3f3..3bb649f 100644 --- a/ngsPETSc/utils/firedrake.py +++ b/ngsPETSc/utils/firedrake.py @@ -5,9 +5,11 @@ ''' try: import firedrake as fd + import FIAT import ufl except ImportError: fd = None + FIAT = None ufl = None import warnings @@ -71,6 +73,8 @@ def curveField(self, order): #Computing reference points using fiat fiat_element = newFunctionCoordinates.function_space().finat_element.fiat_equivalent + if isinstance(fiat_element, FIAT.DiscontinuousElement): + fiat_element = fiat_element._element entity_ids = fiat_element.entity_dofs() nodes = fiat_element.dual_basis() refPts = []