Skip to content

Commit 2ecf1fb

Browse files
committed
adjust epsilon in unit test
1 parent b050c20 commit 2ecf1fb

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

test/runtests.jl

+10-10
Original file line numberDiff line numberDiff line change
@@ -1342,27 +1342,27 @@ validation_potential = validation_system.potential[1,:]
13421342
system3 = generate_gravitational(seed, n_bodies; radius_factor=0.1)
13431343
fmm.fmm!(system3; expansion_order=expansion_order, n_per_branch=n_per_branch, multipole_acceptance_criterion=multipole_acceptance_criterion, nearfield=true, farfield=true, unsort_bodies=true)
13441344
potential3 = system3.potential[1,:]
1345-
@test isapprox(maximum(abs.(potential3 - validation_potential)), 0.0; atol=1e-10)
1345+
@test isapprox(maximum(abs.(potential3 - validation_potential)), 0.0; atol=1e-9)
13461346

13471347
system4 = generate_gravitational(seed, n_bodies; radius_factor=0.1)
13481348
fmm.fmm!((system4,); expansion_order=expansion_order, n_per_branch=n_per_branch, multipole_acceptance_criterion=multipole_acceptance_criterion, nearfield=true, farfield=true, unsort_bodies=true)
13491349
potential4 = system4.potential[1,:]
1350-
@test isapprox(maximum(abs.(potential4 - validation_potential)), 0.0; atol=1e-10)
1350+
@test isapprox(maximum(abs.(potential4 - validation_potential)), 0.0; atol=1e-9)
13511351

13521352
system5 = generate_gravitational(seed, n_bodies; radius_factor=0.1)
13531353
fmm.fmm!(system5, system5; expansion_order=expansion_order, n_per_branch_source=n_per_branch, n_per_branch_target=n_per_branch, multipole_acceptance_criterion=multipole_acceptance_criterion, nearfield=true, farfield=true, unsort_source_bodies=true, unsort_target_bodies=true)
13541354
potential5 = system5.potential[1,:]
1355-
@test isapprox(maximum(abs.(potential5 - validation_potential)), 0.0; atol=1e-10)
1355+
@test isapprox(maximum(abs.(potential5 - validation_potential)), 0.0; atol=1e-9)
13561356

13571357
system6 = generate_gravitational(seed, n_bodies; radius_factor=0.1)
13581358
fmm.fmm!((system6,), system6; expansion_order=expansion_order, n_per_branch_source=n_per_branch, n_per_branch_target=n_per_branch, multipole_acceptance_criterion=multipole_acceptance_criterion, nearfield=true, farfield=true, unsort_source_bodies=true, unsort_target_bodies=true)
13591359
potential6 = system6.potential[1,:]
1360-
@test isapprox(maximum(abs.(potential6 - validation_potential)), 0.0; atol=1e-10)
1360+
@test isapprox(maximum(abs.(potential6 - validation_potential)), 0.0; atol=1e-9)
13611361

13621362
system7 = generate_gravitational(seed, n_bodies; radius_factor=0.1)
13631363
fmm.fmm!((system7,), (system7,); expansion_order=expansion_order, n_per_branch_source=n_per_branch, n_per_branch_target=n_per_branch, multipole_acceptance_criterion=multipole_acceptance_criterion, nearfield=true, farfield=true, unsort_source_bodies=true, unsort_target_bodies=true)
13641364
potential7 = system7.potential[1,:]
1365-
@test isapprox(maximum(abs.(potential7 - validation_potential)), 0.0; atol=1e-10)
1365+
@test isapprox(maximum(abs.(potential7 - validation_potential)), 0.0; atol=1e-9)
13661366

13671367
end
13681368

@@ -1379,27 +1379,27 @@ validation_potential = validation_system.potential[1,:]
13791379
system8 = fmm.SortWrapper(generate_gravitational(seed, n_bodies; radius_factor=0.1))
13801380
fmm.fmm!(system8; expansion_order=expansion_order, n_per_branch=n_per_branch, multipole_acceptance_criterion=multipole_acceptance_criterion, nearfield=true, farfield=true, unsort_bodies=true)
13811381
potential8 = system8.system.potential[1,:]
1382-
@test isapprox(maximum(abs.(potential8 - validation_potential)), 0.0; atol=1e-10)
1382+
@test isapprox(maximum(abs.(potential8 - validation_potential)), 0.0; atol=1e-9)
13831383

13841384
system9 = fmm.SortWrapper(generate_gravitational(seed, n_bodies; radius_factor=0.1))
13851385
fmm.fmm!((system9,); expansion_order=expansion_order, n_per_branch=n_per_branch, multipole_acceptance_criterion=multipole_acceptance_criterion, nearfield=true, farfield=true, unsort_bodies=true)
13861386
potential9 = system9.system.potential[1,:]
1387-
@test isapprox(maximum(abs.(potential9 - validation_potential)), 0.0; atol=1e-10)
1387+
@test isapprox(maximum(abs.(potential9 - validation_potential)), 0.0; atol=1e-9)
13881388

13891389
system10 = fmm.SortWrapper(generate_gravitational(seed, n_bodies; radius_factor=0.1))
13901390
fmm.fmm!(system10, system10; expansion_order=expansion_order, n_per_branch_source=n_per_branch, n_per_branch_target=n_per_branch, multipole_acceptance_criterion=multipole_acceptance_criterion, nearfield=true, farfield=true, unsort_source_bodies=true, unsort_target_bodies=true)
13911391
potential10 = system10.system.potential[1,:]
1392-
@test isapprox(maximum(abs.(potential10 - validation_potential)), 0.0; atol=1e-10)
1392+
@test isapprox(maximum(abs.(potential10 - validation_potential)), 0.0; atol=1e-9)
13931393

13941394
system11 = fmm.SortWrapper(generate_gravitational(seed, n_bodies; radius_factor=0.1))
13951395
fmm.fmm!((system11,), system11; expansion_order=expansion_order, n_per_branch_source=n_per_branch, n_per_branch_target=n_per_branch, multipole_acceptance_criterion=multipole_acceptance_criterion, nearfield=true, farfield=true, unsort_source_bodies=true, unsort_target_bodies=true)
13961396
potential11 = system11.system.potential[1,:]
1397-
@test isapprox(maximum(abs.(potential11 - validation_potential)), 0.0; atol=1e-10)
1397+
@test isapprox(maximum(abs.(potential11 - validation_potential)), 0.0; atol=1e-9)
13981398

13991399
system12 = fmm.SortWrapper(generate_gravitational(seed, n_bodies; radius_factor=0.1))
14001400
fmm.fmm!((system12,), (system12,); expansion_order=expansion_order, n_per_branch_source=n_per_branch, n_per_branch_target=n_per_branch, multipole_acceptance_criterion=multipole_acceptance_criterion, nearfield=true, farfield=true, unsort_source_bodies=true, unsort_target_bodies=true)
14011401
potential12 = system12.system.potential[1,:]
1402-
@test isapprox(maximum(abs.(potential12 - validation_potential)), 0.0; atol=1e-10)
1402+
@test isapprox(maximum(abs.(potential12 - validation_potential)), 0.0; atol=1e-9)
14031403

14041404
end
14051405

0 commit comments

Comments
 (0)