Skip to content

Commit

Permalink
fix: improvements in modified scalar field
Browse files Browse the repository at this point in the history
mid points between min and max thresholds, instead of isovalue 0.
  • Loading branch information
Fer071989 committed Feb 25, 2022
1 parent 51bbf5e commit d1de75d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions LoopStructural/modelling/intrusions/intrusion_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def evaluate_value(self, points):
indicator_fxS = indicator_fxS_boolean.astype("int64")

if simulation_g_data is None:
print("No simultion for vertical extent")
print("No simulation for vertical extent")
else:
# containers for thresholds
print("Assigning vertical thresholds")
Expand Down Expand Up @@ -180,6 +180,8 @@ def evaluate_value(self, points):
# Transform the scalar fields given by the frame coordinates, using the thresholds.
# This aims to generate a scalar field with its isovalue = 0 on the intrusion contact

mid_point = g_minside_threshold + ((g_maxside_threshold - g_minside_threshold)/2)

a = intrusion_coord2_pts >= s_maxside_threshold
b = intrusion_coord2_pts <= s_minside_threshold
c = (
Expand All @@ -195,13 +197,13 @@ def evaluate_value(self, points):
e = (
(s_minside_threshold < intrusion_coord2_pts)
* (intrusion_coord2_pts < s_maxside_threshold)
* (0 >= intrusion_coord0_pts)
* (mid_point >= intrusion_coord0_pts)
* (intrusion_coord0_pts > g_minside_threshold)
)
f = (
(s_minside_threshold < intrusion_coord2_pts)
* (intrusion_coord2_pts < s_maxside_threshold)
* (0 < intrusion_coord0_pts)
* (mid_point < intrusion_coord0_pts)
* (intrusion_coord0_pts < g_maxside_threshold)
)

Expand Down

0 comments on commit d1de75d

Please sign in to comment.