From 5bac9d0c4fa7b77e85d4488ca60b50cca6657f95 Mon Sep 17 00:00:00 2001 From: Ilham Variansyah Date: Sun, 18 Aug 2024 08:57:01 +0700 Subject: [PATCH] make it GPU-compatible --- mcdc/kernel.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mcdc/kernel.py b/mcdc/kernel.py index 15cc108d..5edd487d 100644 --- a/mcdc/kernel.py +++ b/mcdc/kernel.py @@ -1618,7 +1618,9 @@ def get_particle_material(P, mcdc): # Apply translation if cell["fill_translated"]: - P["translation"] += cell["translation"] + P["translation"][0] += cell["translation"][0] + P["translation"][1] += cell["translation"][1] + P["translation"][2] += cell["translation"][2] P["translated"] = True if cell["fill_type"] == FILL_LATTICE: @@ -2645,7 +2647,9 @@ def distance_to_boundary(P, mcdc): # Apply translation if cell["fill_translated"]: - P["translation"] += cell["translation"] + P["translation"][0] += cell["translation"][0] + P["translation"][1] += cell["translation"][1] + P["translation"][2] += cell["translation"][2] P["translated"] = True if cell["fill_type"] == FILL_LATTICE: