Skip to content

Commit

Permalink
Merge branch 'tests' of github.com:JuliaGeometry/MeshIntegrals.jl int…
Browse files Browse the repository at this point in the history
…o tests
  • Loading branch information
mikeingold committed Dec 5, 2024
2 parents 43edac0 + 452278b commit 4b9157e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/combinations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,16 @@ end
ux = ustrip(p.coords.x)
(1 / sqrt(1 + cos(ux)^2)) * u"Ω"
end
solution = 2π * u"Ω*m"
fv(p) = fill(f(p), 3)
sol = 2π * u"Ω*m"
vsol = fill(sol, 3)

# Scalar integrand
@test integral(f, curve, GaussLegendre(100))sol rtol=0.5e-2
@test integral(f, curve, GaussKronrod())sol rtol=0.5e-2
@test integral(f, curve, HAdaptiveCubature())sol rtol=0.5e-2

# Vector integrand
vsol = fill(sol, 3)
@test integral(fv, curve, GaussLegendre(100))vsol rtol=0.5e-2
@test integral(fv, curve, GaussKronrod())vsol rtol=0.5e-2
@test integral(fv, curve, HAdaptiveCubature())vsol rtol=0.5e-2
Expand All @@ -179,8 +180,8 @@ end
sqrt(a^2 - t^2) * u"Ω"
end
fv(p) = fill(f(p), 3)
solution = π * a^2 / 4 * u"Ω*m"
vsol = fill(solution, 3)
sol = π * a^2 / 4 * u"Ω*m"
vsol = fill(sol, 3)

# Scalar integrand
@test integral(f, box, GaussLegendre(100))sol rtol=1e-6
Expand Down

0 comments on commit 4b9157e

Please sign in to comment.