]> https://gitweb.dealii.org/ - dealii.git/commitdiff
SymmetricTensor: don't call DEAL_II_CONSTEXPR from constexpr.
authorDavid Wells <drwells@email.unc.edu>
Sat, 11 Nov 2023 17:18:35 +0000 (12:18 -0500)
committerDavid Wells <drwells@email.unc.edu>
Sun, 12 Nov 2023 13:28:08 +0000 (08:28 -0500)
This isn't guaranteed to work.

include/deal.II/base/symmetric_tensor.h

index 33265eff9e9d7dc94036f1339e93db91fd375f56..5bf97c94b55159899b2fa227e097e4d9c135f287 100644 (file)
@@ -2055,8 +2055,9 @@ namespace internal
               if (indices[0] == indices[1])
                 return indices[0];
 
-              TableIndices<2> sorted_indices(indices);
-              sorted_indices.sort();
+              const TableIndices<2> sorted_indices(
+                std::min(indices[0], indices[1]),
+                std::max(indices[0], indices[1]));
 
               for (unsigned int d = 0, c = 0; d < dim; ++d)
                 for (unsigned int e = d + 1; e < dim; ++e, ++c)

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.