def restrict_hcurl(element, domain, take_closure): restricted = restrict(element.wrappee, domain, take_closure) if restricted is null_element: return null_element else: if isinstance(restricted, finat.EnrichedElement): return finat.EnrichedElement( finat.HCurlElement(e) for e in restricted.elements) else: return finat.HCurlElement(restricted)
def hcurl_element(cell): if cell == "tet": return finat.Nedelec(FIAT.reference_element.UFCTetrahedron(), 3, variant="integral(3)") elif cell == "quad": interval = FIAT.reference_element.UFCInterval() return finat.FlattenedDimensions( finat.EnrichedElement([ finat.HCurlElement( finat.TensorProductElement([ finat.GaussLobattoLegendre(interval, 3), finat.GaussLegendre(interval, 3) ])), finat.HCurlElement( finat.TensorProductElement([ finat.GaussLegendre(interval, 3), finat.GaussLobattoLegendre(interval, 3) ])) ]))
def convert_hcurlelement(element, **kwargs): finat_elem, deps = _create_element(element._element, **kwargs) return finat.HCurlElement(finat_elem), deps