From 5ace684c5c68761f54449a9b5ed1e92ba7b1d0ce Mon Sep 17 00:00:00 2001 From: Sam Pasmann Date: Mon, 15 Jan 2024 10:56:46 -0700 Subject: [PATCH] if directions==0 bug fix --- mcdc/constant.py | 2 +- mcdc/kernel.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mcdc/constant.py b/mcdc/constant.py index 29447f6f..20b217ae 100644 --- a/mcdc/constant.py +++ b/mcdc/constant.py @@ -34,7 +34,7 @@ INF = 1e10 PI = math.acos(-1.0) SHIFT = 1e-10 # To ensure lattice, surface, and mesh crossings -PREC = 1.0 + 1e-8 # Precision factor to determine if a distance is smaller +PREC = 1.0 + 1e-5 # Precision factor to determine if a distance is smaller BANKMAX = 100 # Default maximum active bank # Domain Decomp mesh crossing flags diff --git a/mcdc/kernel.py b/mcdc/kernel.py index 28190420..d395f293 100644 --- a/mcdc/kernel.py +++ b/mcdc/kernel.py @@ -28,6 +28,8 @@ def domain_crossing(P, mcdc): mesh = mcdc["technique"]["domain_mesh"] # Determine which dimension is crossed x, y, z, t, directions = mesh_crossing_evaluate(P, mesh) + if len(directions) == 0: + return flag = directions[0] if len(directions) > 1: