From: Wolfgang Bangerth Date: Sat, 23 Nov 2024 01:12:27 +0000 (-0700) Subject: Explain an otherwise unreadable condition. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58a9fda37b49ae1cbda9b15b77cad3b8f4393074;p=dealii.git Explain an otherwise unreadable condition. --- 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())))