Skip to content

Commit

Permalink
Simplify Box constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeingold committed Oct 2, 2024
1 parent 4d9d673 commit 6d6ed69
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/floating_point_types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ end

# Rectangular volume with unit integrand
f = p -> one(FP)
box1d = Box(Point(fill(zero(FP) * u"m", 1)...), Point(fill(one(FP) * u"m", 1)...))
box2d = Box(Point(fill(zero(FP) * u"m", 2)...), Point(fill(one(FP) * u"m", 2)...))
box3d = Box(Point(fill(zero(FP) * u"m", 3)...), Point(fill(one(FP) * u"m", 3)...))
a = zero(FP) * u"m"
b = one(FP) * u"m"
box1d = Box(Point(a), Point(b))
box2d = Box(Point(a, a), Point(b, b))
box3d = Box(Point(a, a, a), Point(b, b, b))

# Check HCubature integrals (same method invoked for all dimensions)
int_HC = integral(f, box1d, HAdaptiveCubature(); FP = FP)
Expand Down

0 comments on commit 6d6ed69

Please sign in to comment.