From 77f28c64577dc9e12b9b35b3b50860cfc73f9a5c Mon Sep 17 00:00:00 2001 From: Martin Heida <122048469+martinheida@users.noreply.github.com> Date: Wed, 6 Dec 2023 14:25:56 +0100 Subject: [PATCH] new tests see file --- test/runtests.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index ecbc504..4920d47 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -52,6 +52,10 @@ using SparseArrays println("-----------------------------------------------------------------") println("testing Voronoi Data and related stuff") println("-----------------------------------------------------------------") + function test_fast_poly() + VG = VoronoiGeometry(VoronoiNodes(rand(4,500)),cuboid(4,periodic=[]),integrator=HighVoronoi.VI_FAST_POLYGON,silence=true,integrate=true,integrand=x->[x[1],x[2]^2]) + return abs(0.5-sum(VG.Integrator.Integral.bulk_integral)[1])<0.05 + end function test_2000() # the following is necessary since unbounded domains can lead to a crash in very rare events #try @@ -81,7 +85,7 @@ using SparseArrays return true end @test test_2000() - + @test test_fast_poly() println("-----------------------------------------------------------------") println("testing Heuristic integrator in high dimensions") println("-----------------------------------------------------------------")