]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify a computation. 11663/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 3 Feb 2021 03:44:44 +0000 (20:44 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 3 Feb 2021 03:45:06 +0000 (20:45 -0700)
include/deal.II/grid/reference_cell.h

index 892fec8364f245441de5235c3a55f09673f9f8c5..be338585b1223f0a11f0581f0fdcc23e8bdb15bd 100644 (file)
@@ -698,13 +698,8 @@ namespace ReferenceCell
       {
         Assert(*this == Tri, ExcInternalError());
 
-        const auto tangential = unit_tangential_vectors<dim>(face_no, 0);
-
-        Tensor<1, dim> result;
-        result[0] = tangential[1];
-        result[1] = -tangential[0];
-
-        return result;
+        // Return the rotated vector
+        return cross_product_2d(unit_tangential_vectors<dim>(face_no, 0));
       }
     else if (dim == 3)
       {

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.