Skip to content

Commit

Permalink
remove singledispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrubeck committed Nov 22, 2023
1 parent 0b537f3 commit c4e3b58
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions finat/fiat_elements.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import numpy as np
import sympy as sp
from functools import singledispatch

import FIAT

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit c4e3b58

Please sign in to comment.