Skip to content

Commit

Permalink
Apply suggestions from JuliaFormatter code review [skip ci]
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
mikeingold and github-actions[bot] authored Sep 26, 2024
1 parent c385dea commit 46f6955
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 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 All @@ -49,9 +49,9 @@ end
box4d = Box(Point(fill(0.0f0u"m", 4)...), Point(fill(1.0f0u"m", 4)...))

# Check alias functions for accuracy
@test lineintegral(f, box1d, GaussLegendre(100), FP=Float32)1.0f0u"m" atol=0.01f0u"m"
@test surfaceintegral(f, box2d, GaussLegendre(100), FP=Float32)1.0f0u"m^2" atol=0.02f0u"m^2"
@test volumeintegral(f, box3d, GaussLegendre(100), FP=Float32)1.0f0u"m^3" atol=0.03f0u"m^3"
@test lineintegral(f, box1d, GaussLegendre(100), FP = Float32)1.0f0u"m" atol=0.01f0u"m"
@test surfaceintegral(f, box2d, GaussLegendre(100), FP = Float32)1.0f0u"m^2" atol=0.02f0u"m^2"
@test volumeintegral(f, box3d, GaussLegendre(100), FP = Float32)1.0f0u"m^3" atol=0.03f0u"m^3"

# Check for unsupported use of alias functions
@test_throws "not supported" lineintegral(f, box4d, HAdaptiveCubature(), FP=Float32)
Expand Down

0 comments on commit 46f6955

Please sign in to comment.