Skip to content

Commit 13c081e

Browse files
committed
WIP: Remove fracture tips as mesh size points in 2d domains
Implementation must be cleaned up
1 parent acf4191 commit 13c081e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/porepy/fracs/fracture_network_2d.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -564,9 +564,11 @@ def _set_mesh_size_fields(
564564
extra_points = (
565565
np.array([d[0] for d in info]).T if len(info) > 0 else np.empty((3, 0))
566566
)
567+
if extra_points.size == 0:
568+
continue
567569

568570
points, _, ind_map = pp.array_operations.uniquify_point_set(
569-
np.hstack((end_points, extra_points)), tol=tol
571+
extra_points, tol=tol
570572
)
571573
# Distance to other objects for each point, as computed previously. Assign
572574
# h_frac or h_bound to the endpoints, depending on whether the line is a
@@ -578,7 +580,7 @@ def _set_mesh_size_fields(
578580

579581
other_object_distances_all = np.hstack(
580582
(
581-
np.array([h_end, h_end]),
583+
# np.array([h_end, h_end]),
582584
np.array(
583585
[
584586
d[1] if d[1] > 0 else mesh_size_computer.h_frac()
@@ -595,7 +597,7 @@ def _set_mesh_size_fields(
595597
min_dist = np.min(other_object_distances_all[inds])
596598
other_object_distances.append(min_dist)
597599

598-
if points.shape[1] > 0:
600+
if points.size > 0:
599601
# If there is more than one point in addition to the end points, we can
600602
# compute the point-point distances in pairs along this line.
601603
point_point_distances = pp.distances.pointset(points, max_diag=True)

0 commit comments

Comments
 (0)