コード例 #1
0
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)
コード例 #2
0
ファイル: test_restriction.py プロジェクト: jmv2009/FInAT
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)
                    ]))
            ]))
コード例 #3
0
def convert_hcurlelement(element, **kwargs):
    finat_elem, deps = _create_element(element._element, **kwargs)
    return finat.HCurlElement(finat_elem), deps