From 7bc74dc176d2843aa7f83449c6cb521cd8952387 Mon Sep 17 00:00:00 2001 From: Lionel GUEZ <guez@lmd.ens.fr> Date: Fri, 30 Sep 2022 11:31:00 +0200 Subject: [PATCH] Define named constant `min_inters` Instead of using a literal constant. --- Overlap/overlap.f90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Overlap/overlap.f90 b/Overlap/overlap.f90 index 03f7cbac..3ad34899 100644 --- a/Overlap/overlap.f90 +++ b/Overlap/overlap.f90 @@ -47,6 +47,7 @@ contains integer l, n_select type(polyline) polyline_1, polyline_2 type(polygon) res_pol + real, parameter:: min_inters = 0.25 ! minimum intersection between contours integer, allocatable:: selection(:) ! identifying numbers of a selection of extrema @@ -111,7 +112,7 @@ contains if (res_pol%nparts /= 0) then ! polyline_1 and polyline_2 overlap - if (spher_polygon_area(res_pol) >= 0.25 & + if (spher_polygon_area(res_pol) >= min_inters & * min(abs(spher_polyline_area(polyline_1)), & abs(spher_polyline_area(polyline_2)))) then write(unit_edge, fmt = *) (k - delta) * e_overestim + i1, & -- GitLab