Skip to content

Commit

Permalink
Use more trials in constrained Delaunay fuzzer
Browse files Browse the repository at this point in the history
  • Loading branch information
danshapero committed Dec 1, 2024
1 parent faca9bb commit 308ec22
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/delaunay_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,7 @@ def test_constrained_delaunay_basic():
assert num_iterations > 0


def test_constrained_delaunay_fuzz():
rng = np.random.default_rng(seed=112358)

def constrained_delaunay_trial(rng: np.random.Generator):
num_points = 40
poisson_disk = scipy.stats.qmc.PoissonDisk(2, radius=0.05, seed=rng)
points = poisson_disk.random(num_points)
Expand All @@ -342,3 +340,10 @@ def test_constrained_delaunay_fuzz():
d_0, d_1, d_2 = polytopal.from_simplicial(constrained_simplices)
for edge in edges:
assert (np.count_nonzero(d_1[edge, :], axis=0) == 2).any()


def test_constrained_delaunay_fuzz():
rng = np.random.default_rng(seed=112358)
num_trials = 20
for trial in range(num_trials):
constrained_delaunay_trial(rng)

0 comments on commit 308ec22

Please sign in to comment.