def restrict_fiat(element, domain, take_closure): try: return FiatElement( FIAT.RestrictedElement(element._element, restriction_domain=domain)) except ValueError: return null_element
def fiat_compat(element): from tsfc.fiatinterface import create_element from finat.fiat_elements import FiatElement assert element.cell().is_simplex() return FiatElement(create_element(element))