99from FIAT .reference_element import LINE , QUADRILATERAL , TENSORPRODUCT
1010from gem .utils import safe_repr
1111
12- from finat .point_set import GaussLegendrePointSet , KMVPointSet , PointSet , TensorPointSet
12+ from finat .point_set import (GaussLegendrePointSet , GaussLobattoLegendrePointSet ,
13+ KMVPointSet , PointSet , TensorPointSet )
1314
1415
1516def make_quadrature (ref_el , degree , scheme = "default" ):
@@ -43,7 +44,13 @@ def make_quadrature(ref_el, degree, scheme="default"):
4344 if degree < 0 :
4445 raise ValueError ("Need positive degree, not %d" % degree )
4546
46- if ref_el .get_shape () == LINE and not ref_el .is_macrocell ():
47+ if scheme .lower () in {"kmv" , "lump" }:
48+ fiat_rule = fiat_scheme (ref_el , degree , "KMV" )
49+ if ref_el .get_shape () == LINE :
50+ point_set = GaussLobattoLegendrePointSet (fiat_rule .get_points ())
51+ else :
52+ point_set = KMVPointSet (fiat_rule .get_points ())
53+ elif ref_el .get_shape () == LINE and not ref_el .is_macrocell ():
4754 # FIAT uses Gauss-Legendre line quadature, however, since we
4855 # symbolically label it as such, we wish not to risk attaching
4956 # the wrong label in case FIAT changes. So we explicitly ask
@@ -53,10 +60,7 @@ def make_quadrature(ref_el, degree, scheme="default"):
5360 point_set = GaussLegendrePointSet (fiat_rule .get_points ())
5461 else :
5562 fiat_rule = fiat_scheme (ref_el , degree , scheme )
56- if scheme .lower () == "kmv" :
57- point_set = KMVPointSet (fiat_rule .get_points ())
58- else :
59- point_set = PointSet (fiat_rule .get_points ())
63+ point_set = PointSet (fiat_rule .get_points ())
6064
6165 return QuadratureRule (point_set , fiat_rule .get_weights (), ref_el = ref_el , io_ornt_map_tuple = fiat_rule ._intrinsic_orientation_permutation_map_tuple )
6266
0 commit comments