From 58a9fda37b49ae1cbda9b15b77cad3b8f4393074 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 22 Nov 2024 18:12:27 -0700 Subject: [PATCH] Explain an otherwise unreadable condition. --- include/deal.II/fe/mapping_q_internal.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/deal.II/fe/mapping_q_internal.h b/include/deal.II/fe/mapping_q_internal.h index bc4e2e4fe9..e4299356bc 100644 --- a/include/deal.II/fe/mapping_q_internal.h +++ b/include/deal.II/fe/mapping_q_internal.h @@ -571,7 +571,13 @@ namespace internal for (unsigned int e = 0; e < dim; ++e) df[d][e] = p_real.second[e][d]; - // check determinand(df) > 0 on all SIMD lanes + // Check determinant(df) > 0 on all SIMD lanes. The + // condition here is unreadable (but really corresponds to + // asking whether det(df) > 0 for all elements of the + // vector) because VectorizedArray does not have a member + // that can be used to check that all vector elements are + // positive. But VectorizedArray has a std::min() function, + // and operator==(). if (!(std::min(determinant(df), Number(std::numeric_limits::min())) == Number(std::numeric_limits::min()))) -- 2.39.5