Skip to content
Snippets Groups Projects
Commit 57756e64 authored by Stephan Hilb's avatar Stephan Hilb
Browse files

improve lagrange point generator

should maybe do an explicit enumeration instead of filtering
parent 65804157
No related branches found
No related tags found
No related merge requests found
......@@ -127,8 +127,8 @@ function quadrature_composite_lagrange_midpoint(p)
points = Matrix{Float64}(undef, 2, n)
k = 0
for I in Iterators.product(ntuple(_ -> 0:p, d_ + 1)...)
I[1] + I[2] + I[3] != p && continue
for I in Iterators.product(ntuple(_ -> 0:p, d_)...)
sum(Tuple(I)) > p && continue
k += 1
weights[k] = 1 / n
points[1, k] = I[1] / p
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment