Skip to content

Commit 1d41f1f

Browse files
authored
Update demo_tnt-elements.py
1 parent 482317e commit 1d41f1f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

python/demo/demo_tnt-elements.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,15 @@ def create_tnt_quad(degree):
221221
pts, wts = basix.make_quadrature(basix.CellType.quadrilateral, 2 * degree)
222222
u = pts[:, 0]
223223
v = pts[:, 1]
224-
pol0 = basix.polynomials.tabulate_polynomial_set(
224+
pol_set = basix.polynomials.tabulate_polynomial_set(
225225
basix.CellType.quadrilateral, basix.PolynomialType.legendre, degree-2, 2, pts
226226
)
227227
# this assumes the conventional [0 to 1][0 to 1] domain of the reference element,
228228
# and takes the Laplacian of (1-u)*u*(1-v)*v*poly,
229229
# cf https://github.com/mscroggs/symfem/blob/main/symfem/elements/tnt.py
230-
poly = (pol0[5]+pol0[3])*(u-1)*u*(v-1)*v+ \
231-
2*(pol0[2]*(u-1)*u*(2*v-1)+pol0[1]*(v-1)*v*(2*u-1)+pol0[0]*((u-1)*u+(v-1)*v))
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))
232233
face_ndofs = poly.shape[0]
233234
x[2].append(pts)
234235
mat = np.zeros((face_ndofs, 1, len(pts), 1))

0 commit comments

Comments
 (0)