Skip to content

Commit

Permalink
Merge pull request #60 from firedrakeproject/rckirby/fixxg
Browse files Browse the repository at this point in the history
Fix what table gets imported
  • Loading branch information
rckirby authored Dec 13, 2023
2 parents 501504d + b25c2c2 commit a306799
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions FIAT/quadrature_schemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@
# NumPy
import numpy

from FIAT.quadrature import (QuadratureRule, make_quadrature,
make_tensor_product_quadrature, map_quadrature)
# FIAT
from FIAT.reference_element import QUADRILATERAL, HEXAHEDRON, TENSORPRODUCT, TRIANGLE, TETRAHEDRON, UFCTriangle, UFCTetrahedron, default_simplex
from FIAT.quadrature import QuadratureRule, make_quadrature, make_tensor_product_quadrature, map_quadrature
from FIAT.reference_element import (HEXAHEDRON, QUADRILATERAL, TENSORPRODUCT,
TETRAHEDRON, TRIANGLE, UFCTetrahedron,
UFCTriangle, default_simplex)


def create_quadrature(ref_el, degree, scheme="default"):
Expand Down Expand Up @@ -337,8 +340,10 @@ def xg_scheme(ref_el, degree):
http://dx.doi.org/10.1016/j.camwa.2009.10.027
"""
dim = ref_el.get_spatial_dimension()
if dim == 2 or dim == 3:
if dim == 2:
from FIAT.xg_quad_data import triangle_table as table
elif dim == 3:
from FIAT.xg_quad_data import tetrahedron_table as table
else:
raise ValueError(f"Xiao-Gambutas rule not availale for {dim} dimensions.")
try:
Expand Down

0 comments on commit a306799

Please sign in to comment.