From 065b6e5714fe874f2a589646eec3fb1d37dab3ed Mon Sep 17 00:00:00 2001 From: Florian Atteneder <florian.atteneder@uni-jena.de> Date: Mon, 5 Aug 2024 07:49:04 +0000 Subject: [PATCH] fix lgl mass_matrix_exact (https://git.tpi.uni-jena.de/dg/dg1d.jl/-/merge_requests/191) --- src/lgl.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lgl.jl b/src/lgl.jl index 0b220611..4c009eac 100644 --- a/src/lgl.jl +++ b/src/lgl.jl @@ -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 """ -- GitLab