From c4e3b58c2cd82becda3ae36ccfcd1fe353bdebb1 Mon Sep 17 00:00:00 2001 From: Pablo Brubeck Date: Wed, 22 Nov 2023 10:19:01 +0000 Subject: [PATCH] remove singledispatch --- finat/fiat_elements.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/finat/fiat_elements.py b/finat/fiat_elements.py index cff77b223..ea63a1e9d 100644 --- a/finat/fiat_elements.py +++ b/finat/fiat_elements.py @@ -1,6 +1,5 @@ import numpy as np import sympy as sp -from functools import singledispatch import FIAT @@ -175,7 +174,6 @@ def point_evaluation(self, order, refcoords, entity=None): esd = self.cell.construct_subelement(entity_dim).get_spatial_dimension() assert isinstance(refcoords, gem.Node) and refcoords.shape == (esd,) - # Dispatch on FIAT element class return point_evaluation(self._element, order, refcoords, (entity_dim, entity_i)) @cached_property @@ -267,13 +265,7 @@ def mapping(self): return result -@singledispatch def point_evaluation(fiat_element, order, refcoords, entity): - raise AssertionError("FIAT element expected!") - - -@point_evaluation.register(FIAT.FiniteElement) -def point_evaluation_generic(fiat_element, order, refcoords, entity): # Coordinates on the reference entity (SymPy) esd, = refcoords.shape Xi = sp.symbols('X Y Z')[:esd]