示例#1
0
def restrict_hdiv(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.HDivElement(e) for e in restricted.elements)
        else:
            return finat.HDivElement(restricted)
示例#2
0
def hdiv_element(cell):
    if cell == "tet":
        return finat.RaviartThomas(FIAT.reference_element.UFCTetrahedron(),
                                   3,
                                   variant="integral(3)")
    elif cell == "quad":
        interval = FIAT.reference_element.UFCInterval()
        return finat.FlattenedDimensions(
            finat.EnrichedElement([
                finat.HDivElement(
                    finat.TensorProductElement([
                        finat.GaussLobattoLegendre(interval, 3),
                        finat.GaussLegendre(interval, 3)
                    ])),
                finat.HDivElement(
                    finat.TensorProductElement([
                        finat.GaussLegendre(interval, 3),
                        finat.GaussLobattoLegendre(interval, 3)
                    ]))
            ]))
示例#3
0
def convert_hdivelement(element, **kwargs):
    finat_elem, deps = _create_element(element._element, **kwargs)
    return finat.HDivElement(finat_elem), deps