]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Explain an otherwise unreadable condition. 17882/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sat, 23 Nov 2024 01:12:27 +0000 (18:12 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sat, 23 Nov 2024 01:12:27 +0000 (18:12 -0700)
include/deal.II/fe/mapping_q_internal.h

index bc4e2e4fe959a97794143c190a57ea8f6ff0a293..e4299356bcfe8d17f9b7448312aa5b6bb4b582be 100644 (file)
@@ -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<double>::min())) ==
                 Number(std::numeric_limits<double>::min())))

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.