Skip to content

Commit

Permalink
Fix fracture intersection finder for boundary points.
Browse files Browse the repository at this point in the history
When the new polygon segment intersection algorithm was used, points on
the boundary were found by the method aimed at internal points. Missing
information the segment is on the boundary, the further meshing
algorithm failed.
  • Loading branch information
keileg committed Oct 22, 2017
1 parent 58d95b6 commit e6d5d8b
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/porepy/fracs/fractures.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,14 @@ def intersects(self, other, tol, check_point_contact=True):
# segment of the other.

# Compute intersections, with both polygons as first argument
isect_self_other = cg.polygon_segment_intersect(self.p, other.p, tol=tol)
isect_other_self = cg.polygon_segment_intersect(other.p, self.p, tol=tol)
# Do not include boundary points of the polygons here, these will be
# processed later
isect_self_other = cg.polygon_segment_intersect(self.p, other.p,
tol=tol,
include_bound_pt=False)
isect_other_self = cg.polygon_segment_intersect(other.p, self.p,
tol=tol,
include_bound_pt=False)

# Process data
if isect_self_other is not None:
Expand Down Expand Up @@ -397,8 +403,8 @@ def intersects(self, other, tol, check_point_contact=True):
# There at at the most two intersection points between the fractures
# (assuming convexity). If two interior points are found, we can simply
# cut it short here.
if int_points.shape[1] == 2:
return int_points, on_boundary_self, on_boundary_other
# if int_points.shape[1] == 2:
# return int_points, on_boundary_self, on_boundary_other

####
# Next, check for intersections between the polygon boundaries
Expand Down Expand Up @@ -1861,7 +1867,7 @@ def dist_p(a, b):
else:
isect_f.append(i.first.index)

# Assuming the fracture is convex, the closest point for
# Assuming the fracture is convex, the closest point for
dist, cp = cg.dist_points_segments(i.coord, f.p,
np.roll(f.p, 1, axis=1))
# Insert a (candidate) point only at the segment closest to the
Expand Down

0 comments on commit e6d5d8b

Please sign in to comment.