Skip to content

Commit

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

# Get Gauss-Legendre nodes and weights of type FP for a region [-1,1]ᴺ
xs, ws = FastGaussQuadrature.gausslegendre(rule.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) # TODO Iterators
# Transforms nodes/xs, store in an NTuple
ts = ntuple(i -> t(nodes[i]), length(nodes))
# Integrand function
prod(weights) * f(geometry(ts...)) * differential(geometry, ts, diff_method)
end

Expand Down

0 comments on commit f6d2c10

Please sign in to comment.