Skip to content

Commit

Permalink
Simplify to address inaccurate results
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeingold committed Dec 2, 2024
1 parent 4365973 commit 7789cfb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/integral.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,8 @@ function _integral(

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

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

0 comments on commit 7789cfb

Please sign in to comment.