Skip to content

Commit

Permalink
Bugfix (wrong N)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeingold committed Dec 2, 2024
1 parent 7789cfb commit 73da696
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/integral.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ function _integral(
N = Meshes.paramdim(geometry)

# Get Gauss-Legendre nodes and weights of type FP for a region [-1,1]ᴺ
xs, ws = FastGaussQuadrature.gausslegendre(N)
weights = Iterators.product(ntuple(Returns(FP.(ws)), N)...)
nodes = Iterators.product(ntuple(Returns(FP.(xs)), N)...)
xs, ws = FastGaussQuadrature.gausslegendre(rule.N)
weights = Iterators.product(ntuple(Returns(FP.(ws)), N)...) # TODO Iterators
nodes = Iterators.product(ntuple(Returns(FP.(xs)), N)...) # TODO Iterators

# Domain transformation: x [-1,1] ↦ t [0,1]
t(x) = (1 // 2) * x + (1 // 2)

function integrand((weights, nodes))
ts = t.(nodes)
ts = t.(nodes) # TODO Iterators
prod(weights) * f(geometry(ts...)) * differential(geometry, ts, diff_method)
end

Expand Down

0 comments on commit 73da696

Please sign in to comment.