@@ -218,10 +218,18 @@ def create_tnt_quad(degree):
218
218
x [2 ].append (np .zeros ([0 , 2 ]))
219
219
M [2 ].append (np .zeros ([0 , 1 , 0 , 1 ]))
220
220
else :
221
- pts , wts = basix .make_quadrature (basix .CellType .quadrilateral , 2 * degree - 1 )
222
- poly = basix .tabulate_polynomials (
223
- basix .PolynomialType .legendre , basix .CellType .quadrilateral , degree - 2 , pts
221
+ pts , wts = basix .make_quadrature (basix .CellType .quadrilateral , 2 * degree )
222
+ u = pts [:, 0 ]
223
+ v = pts [:, 1 ]
224
+ pol_set = basix .polynomials .tabulate_polynomial_set (
225
+ basix .CellType .quadrilateral , basix .PolynomialType .legendre , degree - 2 , 2 , pts
224
226
)
227
+ # this assumes the conventional [0 to 1][0 to 1] domain of the reference element,
228
+ # and takes the Laplacian of (1-u)*u*(1-v)*v*poly,
229
+ # cf https://github.com/mscroggs/symfem/blob/main/symfem/elements/tnt.py
230
+ poly = (pol_set [5 ]+ pol_set [3 ])* (u - 1 )* u * (v - 1 )* v + \
231
+ 2 * (pol_set [2 ]* (u - 1 )* u * (2 * v - 1 )+ pol_set [1 ]* (v - 1 )* v * (2 * u - 1 )+ \
232
+ pol_set [0 ]* ((u - 1 )* u + (v - 1 )* v ))
225
233
face_ndofs = poly .shape [0 ]
226
234
x [2 ].append (pts )
227
235
mat = np .zeros ((face_ndofs , 1 , len (pts ), 1 ))
0 commit comments