Skip to content
Snippets Groups Projects
Commit 065b6e57 authored by Florian Atteneder's avatar Florian Atteneder
Browse files

fix lgl mass_matrix_exact (!191)

parent 54071f65
No related branches found
No related tags found
1 merge request!191fix lgl mass_matrix_exact
Pipeline #7092 passed
......@@ -82,10 +82,10 @@ function mass_matrix_exact(n_pts)
aux_z, aux_w = rule(n_pts+2)
L(i, x) = lagrange_poly(i, x, z)
M = zeros(n_pts, n_pts)
for i=1:Npts, j=1:Npts
li = L.(i, z)
for i=1:n_pts, j=1:n_pts
li = L.(i, aux_z)
for j = i:n_pts
lj = L.(j, z)
lj = L.(j, aux_z)
M[i,j] = integrate(aux_w, li, lj)
if (i != j)
M[j,i] = M[i,j]
......@@ -129,7 +129,7 @@ end
"""
L_ij = (P_i, P_j)
Analogon to mass matrix of Lagrange polynomials, expresses the linear dependency
of the numerical representation of the Legendre basis.
of the numerical representation of the Legendre basis.
x ... GLGL nodes
w ... GLGL weights
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment