Skip to content

Commit c7b9bcd

Browse files
committed
debug numba wrinkle
1 parent 36488e6 commit c7b9bcd

4 files changed

Lines changed: 9 additions & 22 deletions

File tree

mcdc/constant.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,13 @@
7474
# Geometry events
7575
EVENT_SURFACE_CROSSING = 1 << 1
7676
EVENT_LATTICE_CROSSING = 1 << 2
77-
EVENT_DOMAIN_CROSSING = 1 << 3
78-
EVENT_LOST = 1 << 4
77+
EVENT_LOST = 1 << 3
7978
# Collision/reaction events
80-
EVENT_COLLISION = 1 << 5
79+
EVENT_COLLISION = 1 << 4
8180
# Miscellanies
82-
EVENT_TIME_CENSUS = 1 << 6
83-
EVENT_TIME_BOUNDARY = 1 << 7
84-
EVENT_IQMC_MESH = 1 << 8
81+
EVENT_TIME_CENSUS = 1 << 5
82+
EVENT_TIME_BOUNDARY = 1 << 6
83+
EVENT_IQMC_MESH = 1 << 7
8584

8685
# Materials
8786
MATERIAL = 0

mcdc/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,10 @@ def visualize(
453453
plt.ylabel(second_key + " [cm]")
454454
plt.title(reference_key + " = %.2f cm" % reference + ", time = %.2f s" % t)
455455
if save_as is not None:
456-
plt.savefig(save_as + ".png")
456+
if len(time) > 1:
457+
plt.savefig(f"{save_as}_{t:03}.png")
458+
else:
459+
plt.savefig(save_as + ".png")
457460
plt.clf()
458461
else:
459462
plt.show()

mcdc/transport/kernel.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,6 @@ def move_to_event(P_arr, mcdc, data):
504504

505505
# Distance to domain
506506
speed = physics.particle_speed(P_arr, mcdc, data)
507-
d_domain = INF
508507

509508
# Distance to time boundary
510509
d_time_boundary = speed * (settings["time_boundary"] - P["t"])
@@ -525,14 +524,6 @@ def move_to_event(P_arr, mcdc, data):
525524

526525
distance = d_boundary
527526

528-
# Check distance to domain
529-
if d_domain < distance - COINCIDENCE_TOLERANCE:
530-
distance = d_domain
531-
P["event"] = EVENT_DOMAIN_CROSSING
532-
P["surface_ID"] = -1
533-
elif geometry.check_coincidence(d_domain, distance):
534-
P["event"] += EVENT_DOMAIN_CROSSING
535-
536527
# Check distance to collision
537528
if d_collision < distance - COINCIDENCE_TOLERANCE:
538529
distance = d_collision

mcdc/transport/simulation.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -483,12 +483,6 @@ def step_particle(P_arr, prog, data):
483483
# Surface and domain crossing
484484
if P["event"] & EVENT_SURFACE_CROSSING:
485485
geometry.surface_crossing(P_arr, prog, data)
486-
if P["event"] & EVENT_DOMAIN_CROSSING:
487-
if mcdc["surfaces"][P["surface_ID"]]["boundary_condition"] == BC_NONE:
488-
kernel.domain_crossing(P_arr, prog)
489-
490-
elif P["event"] & EVENT_DOMAIN_CROSSING:
491-
kernel.domain_crossing(P_arr, prog)
492486

493487
# Census time crossing
494488
if P["event"] & EVENT_TIME_CENSUS:

0 commit comments

Comments
 (0)