Skip to content

Commit

Permalink
imex: style
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrubeck committed Dec 14, 2024
1 parent f7848ff commit 5c24928
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions irksome/imex.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,18 @@ def riia_explicit_coeffs(k):
of a RadauIIA-IMEX method."""
U = FIAT.ufc_simplex(1)
L = FIAT.GaussRadau(U, k - 1)
Q = FIAT.make_quadrature(L.ref_el, 2*k)
c = np.asarray([list(ell.pt_dict.keys())[0][0]
for ell in L.dual.nodes])

Q = FIAT.make_quadrature(L.ref_el, 2*k)
qpts = Q.get_points()
qwts = Q.get_weights()

A = np.zeros((k, k))
for i in range(k):
qpts_i = 1 + qpts * c[i]
qwts_i = qwts * c[i]
Lvals_i = L.tabulate(0, qpts_i)[0, ]
for i, ell in enumerate(L.dual.nodes):
pt, = ell.pt_dict
ci, = pt
qpts_i = 1 + qpts * ci
qwts_i = qwts * ci
Lvals_i = L.tabulate(0, qpts_i)[(0,)]
A[i, :] = Lvals_i @ qwts_i

return A
Expand Down

0 comments on commit 5c24928

Please sign in to comment.