Skip to content

Commit

Permalink
Merge branch 'fp2kwarg' of github.com:mikeingold/MeshIntegrals.jl int…
Browse files Browse the repository at this point in the history
…o fp2kwarg
  • Loading branch information
mikeingold committed Sep 26, 2024
2 parents e4cb985 + 46f6955 commit da5efce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/floating_point_types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@ end
box3d = Box(Point(fill(zero(FP) * u"m", 3)...), Point(fill(one(FP) * u"m", 3)...))

# Check HCubature integrals (same method invoked for all dimensions)
int_HC = integral(f, box1d, HAdaptiveCubature(); FP=FP)
int_HC = integral(f, box1d, HAdaptiveCubature(); FP = FP)
@test int_HCone(FP) * u"m" atol=baseatol[FP] * u"m"
@test typeof(int_HC.val)==FP broken=(FP == Float32)

# Check Gauss-Legendre integral in 1D
int_GL_1D = integral(f, box1d, GaussLegendre(100); FP=FP)
int_GL_1D = integral(f, box1d, GaussLegendre(100); FP = FP)
@test int_GL_1Done(FP) * u"m" atol=baseatol[FP] * u"m"
@test typeof(int_GL_1D.val)==FP broken=(FP == Float32)

# Check Gauss-Legendre integral in 2D
int_GL_2D = integral(f, box2d, GaussLegendre(100); FP=FP)
int_GL_2D = integral(f, box2d, GaussLegendre(100); FP = FP)
@test int_GL_2Done(FP) * u"m^2" atol=2baseatol[FP] * u"m^2"
@test typeof(int_GL_2D.val)==FP broken=(FP == Float32)

# Check Gauss-Legendre integral in 3D
int_GL_3D = integral(f, box3d, GaussLegendre(100); FP=FP)
int_GL_3D = integral(f, box3d, GaussLegendre(100); FP = FP)
@test int_GL_3Done(FP) * u"m^3" atol=3baseatol[FP] * u"m^3"
@test typeof(int_GL_3D.val)==FP broken=(FP == Float32)
end
Expand Down

0 comments on commit da5efce

Please sign in to comment.