From d34031454cf8dc946f0be9f4aa6030506daa6c84 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 29 Jun 2024 11:32:11 +0200 Subject: [PATCH] fixed incorrectly shown error in hybrid get_shift --- nonisotropic.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nonisotropic.cpp b/nonisotropic.cpp index 53dedaeb..fd786011 100644 --- a/nonisotropic.cpp +++ b/nonisotropic.cpp @@ -1380,13 +1380,14 @@ EX namespace hybrid { } if(candidates.size() == 2 && candidates[0] != candidates[1]) { - if(!quotient) println(hlog, "two candidates in shift : ", candidates); + bool over_closed = in_underlying([] { return quotient || sphere || closed_manifold; }); + if(!over_closed) println(hlog, "two candidates in shift : ", candidates); int val = candidates[0] - candidates[1]; int old_disc_quotient = disc_quotient; if(disc_quotient == 0) disc_quotient = val; disc_quotient = gcd(val, disc_quotient); if(disc_quotient < 0) disc_quotient = -disc_quotient; - if(old_disc_quotient != disc_quotient && !in_underlying([] { return quotient || sphere; })) + if(old_disc_quotient != disc_quotient && !over_closed) addMessage(XLAT("ERROR: failed to solve the twist values, the map will be incorrect", its(disc_quotient))); }