Skip to content
Snippets Groups Projects
Commit 8c7f93dc authored by Lionel GUEZ's avatar Lionel GUEZ Committed by GUEZ Lionel
Browse files

Test `closed` instead of `n_points`

This is equivalent for a return value of `good_contour`. It is a
little faster to test a logical value, maybe.
parent bcf53862
No related branches found
No related tags found
No related merge requests found
......@@ -107,7 +107,7 @@ contains
ssh, innermost_level_2, coord_extr_proj, outside_points_proj), &
corner_whole, step)
test_n_points: if (cont_list(1)%n_points == 0) then
test_n_points: if (.not. cont_list(1)%closed) then
out_cont = null_ssh_contour()
else test_n_points
n_cont = 1
......@@ -121,7 +121,7 @@ contains
ssh, level_try, coord_extr_proj, outside_points_proj), &
corner_whole, step)
if (cont_list(2)%n_points /= 0) then
if (cont_list(2)%closed) then
! This can only happen if there are degenerate extrema
! everywhere around the path of contour. So it should
! probably never happen.
......@@ -138,7 +138,7 @@ contains
level_try, coord_extr_proj, outside_points_proj), &
corner_whole, step)
if (cont_list(n_cont + 1)%n_points /= 0) then
if (cont_list(n_cont + 1)%closed) then
cont_list(n_cont + 1)%ssh = level_try
if (n_cont == n_max_cont - 1) then
......@@ -153,9 +153,10 @@ contains
level_bad = level_try
end if
! Assertion: cont_list(n_cont)%polyline == good_contour(. . .,
! level_good) and cont_list(n_cont)%%n_points /= 0 and
! no good contour at level_bad
! Assertion: cont_list(n_cont)%polyline ==
! good_contour(. . ., level_good) and
! cont_list(n_cont)%closed and no good contour at
! level_bad
end do
! Assertion: n_cont <= n_max_cont - 1
end if
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment