From 31147260e7f7b82829a72a91b2a00b40f1016d00 Mon Sep 17 00:00:00 2001 From: Lionel GUEZ <guez@lmd.ens.fr> Date: Thu, 20 Jun 2024 06:34:16 +0200 Subject: [PATCH] Do not orient nor compute the area Do not orient nor compute the area of `cont_list(n_cont)`. When the area is too small, then we have one more copy than before, of `cont_list(n_cont)` to `out_cont`, but, on the other hand, we have one less call to `ccw_orient` than before. So this change should not impact performance. Note that the orientation and area of `cont_list(n_cont)` were not used after `get_1_outerm`. Preparing to keep `cont_list` in projection coordinates. --- Inst_eddies/get_1_outerm.f90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Inst_eddies/get_1_outerm.f90 b/Inst_eddies/get_1_outerm.f90 index 0ce7af78..c3e3a3e3 100644 --- a/Inst_eddies/get_1_outerm.f90 +++ b/Inst_eddies/get_1_outerm.f90 @@ -158,14 +158,14 @@ contains ! Assertion: n_cont <= n_max_cont - 1 end if - cont_list(n_cont)%area = spher_polyline_area(cont_list(n_cont)%polyline) - call ccw_orient(cont_list(n_cont)) + out_cont = cont_list(n_cont) + out_cont%area = spher_polyline_area(out_cont%polyline) - if (cont_list(n_cont)%area < min_area) then + if (abs(out_cont%area) < min_area) then out_cont = null_ssh_contour() n_cont = 0 else - out_cont = cont_list(n_cont) + call ccw_orient(out_cont) end if end if test_n_points -- GitLab