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 = []