diff --git a/demo/python/demo_custom_element.py b/demo/python/demo_custom_element.py index ccd338099..0570cc82c 100644 --- a/demo/python/demo_custom_element.py +++ b/demo/python/demo_custom_element.py @@ -9,7 +9,7 @@ import basix import numpy as np -from basix import CellType, MapType, PolynomialType, LatticeType, SobolevSpace, PolysetType +from basix import CellType, MapType, PolynomialType, LatticeType, SobolevSpace # Lagrange element with bubble # ============================ @@ -67,7 +67,7 @@ # We compute these integrals using a degree 4 quadrature rule (this is the largest degree # that the integrand will be, so these integrals will be exact). -pts, wts = basix.make_quadrature(CellType.quadrilateral, PolysetType.standard, 4) +pts, wts = basix.quadrature.make_quadrature(CellType.quadrilateral, 4) poly = basix.tabulate_polynomials(PolynomialType.legendre, CellType.quadrilateral, 2, pts) x = pts[:, 0] y = pts[:, 1] @@ -188,7 +188,7 @@ wcoeffs[0, 0] = 1 wcoeffs[1, 3] = 1 -pts, wts = basix.make_quadrature(CellType.triangle, PolysetType.standard, 2) +pts, wts = basix.quadrature.make_quadrature(CellType.triangle, 2) poly = basix.tabulate_polynomials(PolynomialType.legendre, CellType.triangle, 1, pts) x = pts[:, 0] y = pts[:, 1] @@ -203,7 +203,7 @@ # the element are integrals. We begin by defining a degree 1 quadrature rule on an interval. # This quadrature rule will be used to integrate on the edges of the triangle. -pts, wts = basix.make_quadrature(CellType.interval, PolysetType.standard, 1) +pts, wts = basix.quadrature.make_quadrature(CellType.interval, 1) # The points associated with each edge are calculated by mapping the quadrature points to each edge. diff --git a/demo/python/demo_custom_element_conforming_cr.py b/demo/python/demo_custom_element_conforming_cr.py index a367815c4..ba6b2ff29 100644 --- a/demo/python/demo_custom_element_conforming_cr.py +++ b/demo/python/demo_custom_element_conforming_cr.py @@ -62,7 +62,7 @@ def create_ccr_triangle(degree): wcoeffs[dof_n, dof_n] = 1 dof_n += 1 - pts, wts = basix.make_quadrature(CellType.triangle, PolysetType.standard, 2 * (degree + 1)) + pts, wts = basix.quadrature.make_quadrature(CellType.triangle, 2 * (degree + 1)) poly = basix.tabulate_polynomials(PolynomialType.legendre, CellType.triangle, degree + 1, pts) for i in range(1, degree): x = pts[:, 0] diff --git a/demo/python/demo_facet_integral.py b/demo/python/demo_facet_integral.py index 5f5bee215..70a279f09 100644 --- a/demo/python/demo_facet_integral.py +++ b/demo/python/demo_facet_integral.py @@ -15,7 +15,7 @@ import basix import numpy as np -from basix import ElementFamily, CellType, LagrangeVariant, PolysetType +from basix import ElementFamily, CellType, LagrangeVariant # We define a degree 3 Lagrange space on a tetrahedron. @@ -26,7 +26,7 @@ # rule on a triangle. We use an order 3 rule so that we can integrate the # basis functions in our space exactly. -points, weights = basix.make_quadrature(CellType.triangle, PolysetType.standard, 3) +points, weights = basix.quadrature.make_quadrature(CellType.triangle, 3) # Next, we must map the quadrature points to our facet. We use the function # `geometry` to get the coordinates of the vertices of the tetrahedron, and diff --git a/demo/python/demo_quadrature.py b/demo/python/demo_quadrature.py index a645e54f5..1ccc50cb3 100644 --- a/demo/python/demo_quadrature.py +++ b/demo/python/demo_quadrature.py @@ -28,14 +28,14 @@ # `make_quadrature` returns two values: the points and the weights of the # quadrature rule. -points, weights = basix.make_quadrature(CellType.triangle, PolysetType.standard, 4) +points, weights = basix.quadrature.make_quadrature(CellType.triangle, 4) # If we want to control the type of quadrature used, we can pass in three # inputs to `make_quadrautre`. For example, the following code would force basix # to use a Gauss-Jacobi quadrature rule: -points, weights = basix.make_quadrature( - basix.QuadratureType.gauss_jacobi, CellType.triangle, PolysetType.standard, 4) +points, weights = basix.quadrature.make_quadrature( + CellType.triangle, 4, rule=basix.QuadratureType.gauss_jacobi) # We now use this quadrature rule to integrate the functions :math:`f(x,y)=x^3y` # and :math:`g(x,y)=x^3y^2` over the triangle. The exact values of these integrals