Skip to content

Commit

Permalink
Merge pull request firedrakeproject#117 from FInAT/pbrubeck/variants
Browse files Browse the repository at this point in the history
Support Lagrange/IntegratedLegendre variants
  • Loading branch information
dham authored Feb 7, 2024
2 parents a7080b1 + 3de9323 commit ecf345a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions finat/fiat_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ def __init__(self, cell, degree):


class Lagrange(ScalarFiatElement):
def __init__(self, cell, degree):
super(Lagrange, self).__init__(FIAT.Lagrange(cell, degree))
def __init__(self, cell, degree, variant=None):
super(Lagrange, self).__init__(FIAT.Lagrange(cell, degree, variant=variant))


class KongMulderVeldhuizen(ScalarFiatElement):
Expand Down
8 changes: 4 additions & 4 deletions finat/spectral.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,18 @@ def basis_evaluation(self, order, ps, entity=None, coordinate_mapping=None):


class Legendre(ScalarFiatElement):
"""1D DG element with Legendre polynomials."""
"""DG element with Legendre polynomials."""

def __init__(self, cell, degree):
fiat_element = FIAT.Legendre(cell, degree)
super(Legendre, self).__init__(fiat_element)


class IntegratedLegendre(ScalarFiatElement):
"""1D CG element with integrated Legendre polynomials."""
"""CG element with integrated Legendre polynomials."""

def __init__(self, cell, degree):
fiat_element = FIAT.IntegratedLegendre(cell, degree)
def __init__(self, cell, degree, variant=None):
fiat_element = FIAT.IntegratedLegendre(cell, degree, variant=variant)
super(IntegratedLegendre, self).__init__(fiat_element)


Expand Down

0 comments on commit ecf345a

Please sign in to comment.