Skip to content

Commit

Permalink
Fix ups for 2d problem and surface distance evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
shac170 committed Dec 20, 2023
1 parent 7d84f17 commit 7bed157
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mcdc/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1636,6 +1636,10 @@ def surface_distance(P, surface, trans, mcdc):
t_max = surface["t"][idx + 1]
d_max = (t_max - P["t"]) * v

if (
G * ux + H * uy + I_ * uz + J1 / v
) == 0:
J1=1e-25
distance = -surface_evaluate(P, surface, trans) / (
G * ux + H * uy + I_ * uz + J1 / v
)
Expand Down Expand Up @@ -1775,7 +1779,10 @@ def mesh_get_angular_index(P, mesh):
uz = P["uz"]

P_mu = uz
P_azi = math.acos(ux / math.sqrt(ux * ux + uy * uy))
if ux + uy != 0:
P_azi = math.acos(ux / math.sqrt(ux * ux + uy * uy))
else:
P_azi = 0
if uy < 0.0:
P_azi *= -1

Expand Down

0 comments on commit 7bed157

Please sign in to comment.