Skip to content

Commit

Permalink
Single source of truth
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrubeck committed Dec 14, 2024
1 parent 11dc133 commit aacda66
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 13 deletions.
26 changes: 13 additions & 13 deletions FIAT/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
from FIAT.mixed import MixedElement # noqa: F401
from FIAT.restricted import RestrictedElement # noqa: F401
from FIAT.quadrature_element import QuadratureElement # noqa: F401
from FIAT.tensor_product import TensorProductElement # noqa: F401
from FIAT.enriched import EnrichedElement # noqa: F401
from FIAT.nodal_enriched import NodalEnrichedElement # noqa: F401
from FIAT.discontinuous import DiscontinuousElement # noqa: F401

# Import finite element classes
from FIAT.argyris import Argyris
Expand All @@ -24,9 +28,9 @@
from FIAT.christiansen_hu import ChristiansenHu
from FIAT.johnson_mercier import JohnsonMercier
from FIAT.brezzi_douglas_marini import BrezziDouglasMarini
from FIAT.Sminus import TrimmedSerendipityEdge, TrimmedSerendipityFace # noqa: F401
from FIAT.SminusDiv import TrimmedSerendipityDiv # noqa: F401
from FIAT.SminusCurl import TrimmedSerendipityCurl # noqa: F401
from FIAT.Sminus import TrimmedSerendipityEdge, TrimmedSerendipityFace
from FIAT.SminusDiv import TrimmedSerendipityDiv
from FIAT.SminusCurl import TrimmedSerendipityCurl
from FIAT.brezzi_douglas_fortin_marini import BrezziDouglasFortinMarini
from FIAT.discontinuous_lagrange import DiscontinuousLagrange
from FIAT.discontinuous_taylor import DiscontinuousTaylor
Expand Down Expand Up @@ -56,10 +60,6 @@
from FIAT.hu_zhang import HuZhang
from FIAT.mardal_tai_winther import MardalTaiWinther
from FIAT.bubble import Bubble, FacetBubble
from FIAT.tensor_product import TensorProductElement
from FIAT.enriched import EnrichedElement
from FIAT.nodal_enriched import NodalEnrichedElement
from FIAT.discontinuous import DiscontinuousElement
from FIAT.hdiv_trace import HDivTrace
from FIAT.kong_mulder_veldhuizen import KongMulderVeldhuizen
from FIAT.fdm_element import FDMLagrange, FDMDiscontinuousLagrange, FDMQuadrature, FDMBrokenH1, FDMBrokenL2, FDMHermite # noqa: F401
Expand All @@ -76,13 +76,19 @@
"Crouzeix-Raviart": CrouzeixRaviart,
"Discontinuous Lagrange": DiscontinuousLagrange,
"S": Serendipity,
"SminusF": TrimmedSerendipityFace,
"SminusDiv": TrimmedSerendipityDiv,
"SminusE": TrimmedSerendipityEdge,
"SminusCurl": TrimmedSerendipityCurl,
"Brezzi-Douglas-Marini Cube Face": BrezziDouglasMariniCubeFace,
"Brezzi-Douglas-Marini Cube Edge": BrezziDouglasMariniCubeEdge,
"DPC": DPC,
"Discontinuous Taylor": DiscontinuousTaylor,
"Discontinuous Raviart-Thomas": DiscontinuousRaviartThomas,
"Hermite": CubicHermite,
"Hsieh-Clough-Tocher": HsiehCloughTocher,
"QuadraticPowellSabin6": QuadraticPowellSabin6,
"QuadraticPowellSabin12": QuadraticPowellSabin12,
"Alfeld-Sorokina": AlfeldSorokina,
"Arnold-Qin": ArnoldQin,
"Christiansen-Hu": ChristiansenHu,
Expand All @@ -102,12 +108,6 @@
"Nedelec 2nd kind H(curl)": NedelecSecondKind,
"Raviart-Thomas": RaviartThomas,
"Regge": Regge,
"EnrichedElement": EnrichedElement,
"NodalEnrichedElement": NodalEnrichedElement,
"QuadraticPowellSabin6": QuadraticPowellSabin6,
"QuadraticPowellSabin12": QuadraticPowellSabin12,
"TensorProductElement": TensorProductElement,
"BrokenElement": DiscontinuousElement,
"HDiv Trace": HDivTrace,
"Hellan-Herrmann-Johnson": HellanHerrmannJohnson,
"Gopalakrishnan-Lederer-Schoberl 1st kind": GopalakrishnanLedererSchoberlFirstKind,
Expand Down
58 changes: 58 additions & 0 deletions finat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,61 @@
from .runtime_tabulated import RuntimeTabulated # noqa: F401
from . import quadrature # noqa: F401
from . import cell_tools # noqa: F401

# List of supported elements and mapping to element classes
supported_elements = {"Argyris": Argyris,
"Bell": Bell,
"Bernardi-Raugel": BernardiRaugel,
"Bernstein": Bernstein,
"Brezzi-Douglas-Marini": BrezziDouglasMarini,
"Brezzi-Douglas-Fortin-Marini": BrezziDouglasFortinMarini,
"Bubble": Bubble,
"FacetBubble": FacetBubble,
"Crouzeix-Raviart": CrouzeixRaviart,
"Discontinuous Lagrange": DiscontinuousLagrange,
"S": Serendipity,
"SminusF": TrimmedSerendipityFace,
"SminusDiv": TrimmedSerendipityDiv,
"SminusE": TrimmedSerendipityEdge,
"SminusCurl": TrimmedSerendipityCurl,
"Brezzi-Douglas-Marini Cube Face": BrezziDouglasMariniCubeFace,
"Brezzi-Douglas-Marini Cube Edge": BrezziDouglasMariniCubeEdge,
"DPC": DPC,
"DPC L2": DPC,
"Discontinuous Lagrange L2": DiscontinuousLagrange,
"Discontinuous Taylor": DiscontinuousTaylor,
"Discontinuous Raviart-Thomas": lambda *args: DiscontinuousElement(RaviartThomas(*args)),
"Hermite": Hermite,
"Hsieh-Clough-Tocher": HsiehCloughTocher,
"Reduced-Hsieh-Clough-Tocher": ReducedHsiehCloughTocher,
"QuadraticPowellSabin6": QuadraticPowellSabin6,
"QuadraticPowellSabin12": QuadraticPowellSabin12,
"Alfeld-Sorokina": AlfeldSorokina,
"Arnold-Qin": ArnoldQin,
"Reduced-Arnold-Qin": ReducedArnoldQin,
"Christiansen-Hu": ChristiansenHu,
"Guzman-Neilan 1st kind H1": GuzmanNeilanFirstKindH1,
"Guzman-Neilan 2nd kind H1": GuzmanNeilanSecondKindH1,
"Guzman-Neilan H1(div)": GuzmanNeilanH1div,
"Guzman-Neilan Bubble": GuzmanNeilanBubble,
"Johnson-Mercier": JohnsonMercier,
"Lagrange": Lagrange,
"Kong-Mulder-Veldhuizen": KongMulderVeldhuizen,
"Gauss-Lobatto-Legendre": GaussLobattoLegendre,
"Gauss-Legendre": GaussLegendre,
"Gauss-Legendre L2": GaussLegendre,
"Legendre": Legendre,
"Integrated Legendre": IntegratedLegendre,
"Morley": Morley,
"Nedelec 1st kind H(curl)": Nedelec,
"Nedelec 2nd kind H(curl)": NedelecSecondKind,
"Raviart-Thomas": RaviartThomas,
"Regge": Regge,
"HDiv Trace": HDivTrace,
"Hellan-Herrmann-Johnson": HellanHerrmannJohnson,
"Gopalakrishnan-Lederer-Schoberl 1st kind": GopalakrishnanLedererSchoberlFirstKind,
"Gopalakrishnan-Lederer-Schoberl 2nd kind": GopalakrishnanLedererSchoberlSecondKind,
"Conforming Arnold-Winther": ArnoldWinther,
"Nonconforming Arnold-Winther": ArnoldWintherNC,
"Hu-Zhang": HuZhang,
"Mardal-Tai-Winther": MardalTaiWinther}

0 comments on commit aacda66

Please sign in to comment.