]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Pyramid/wedge: diverse fixes 11419/head
authorPeter Munch <peterrmuench@gmail.com>
Fri, 25 Dec 2020 12:10:54 +0000 (13:10 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Fri, 25 Dec 2020 12:10:54 +0000 (13:10 +0100)
include/deal.II/grid/reference_cell.h
source/base/qprojector.cc
source/fe/mapping_fe.cc
source/simplex/fe_lib.cc
tests/simplex/poisson_01.mpirun=1.with_trilinos=true.with_simplex_support=on.output
tests/simplex/poisson_01.mpirun=4.with_trilinos=true.with_simplex_support=on.output

index 28a314d2b4700d04775374dfdfb22707bb39559d..b9c2816f7c644f1a9c3b08f32f150155b9b9f28a 100644 (file)
@@ -887,8 +887,14 @@ namespace ReferenceCell
         standard_line_to_face_and_line_index(
           const unsigned int line) const override
         {
-          static const std::array<unsigned int, 2> table[6] = {
-            {{0, 0}}, {{0, 1}}, {{0, 2}}, {{1, 1}}, {{1, 2}}, {{2, 1}}};
+          static const std::array<unsigned int, 2> table[8] = {{{0, 0}},
+                                                               {{0, 1}},
+                                                               {{0, 2}},
+                                                               {{0, 3}},
+                                                               {{1, 2}},
+                                                               {{2, 1}},
+                                                               {{1, 1}},
+                                                               {{2, 2}}};
 
           return table[line];
         }
index b0cd657d780b6a9d0512ce5b68a5068eb9eb0f8c..3a33573303f5b165e916473b572e99d6486f9363 100644 (file)
@@ -693,7 +693,7 @@ QProjector<3>::project_to_all_faces(
       }
   };
 
-  const auto process = [&](const auto faces) {
+  const auto process = [&](const auto &faces) {
     // new (projected) quadrature points and weights
     std::vector<Point<3>> points;
     std::vector<double>   weights;
@@ -825,14 +825,19 @@ QProjector<3>::project_to_all_faces(
   else if (reference_cell_type == ReferenceCell::Type::Wedge)
     {
       const std::vector<std::pair<std::vector<Point<3>>, double>> faces = {
-        {{{{Point<3>(0.0, 1.0, 0.0),
-            Point<3>(1.0, 0.0, 0.0),
-            Point<3>(0.0, 0.0, 0.0)}},
+        {{{{Point<3>(1.0, 0.0, 0.0),
+            Point<3>(0.0, 0.0, 0.0),
+            Point<3>(0.0, 1.0, 0.0)}},
           0.5},
-         {{{Point<3>(1.0, 0.0, 1.0),
-            Point<3>(0.0, 1.0, 1.0),
-            Point<3>(0.0, 0.0, 1.0)}},
+         {{{Point<3>(0.0, 0.0, 1.0),
+            Point<3>(1.0, 0.0, 1.0),
+            Point<3>(0.0, 1.0, 1.0)}},
           0.5},
+         {{{Point<3>(0.0, 0.0, 0.0),
+            Point<3>(1.0, 0.0, 0.0),
+            Point<3>(0.0, 0.0, 1.0),
+            Point<3>(1.0, 0.0, 1.0)}},
+          1.0},
          {{{Point<3>(1.0, 0.0, 0.0),
             Point<3>(0.0, 1.0, 0.0),
             Point<3>(1.0, 0.0, 1.0),
@@ -842,11 +847,6 @@ QProjector<3>::project_to_all_faces(
             Point<3>(0.0, 0.0, 0.0),
             Point<3>(0.0, 1.0, 1.0),
             Point<3>(0.0, 0.0, 1.0)}},
-          1.0},
-         {{{Point<3>(0.0, 0.0, 0.0),
-            Point<3>(1.0, 0.0, 0.0),
-            Point<3>(0.0, 0.0, 1.0),
-            Point<3>(1.0, 0.0, 1.0)}},
           1.0}}};
 
       return process(faces);
index 169f944bf561a0cc6e018656f64299311451647a..7921ebfd074fff0fd34be600cbfbd7e0ce0ec110 100644 (file)
@@ -282,8 +282,8 @@ MappingFE<dim, spacedim>::InternalData::initialize_face(
             unit_tangentials[6].emplace_back(t1);
 
           // face 2
-          t1[d0] = -1 / std::sqrt(2.0);
-          t1[d1] = +1 / std::sqrt(2.0);
+          t1[d0] = 1;
+          t1[d1] = 0;
           t1[d2] = 0;
           for (unsigned int i = 0; i < n_original_q_points; i++)
             unit_tangentials[2].emplace_back(t1);
@@ -296,30 +296,30 @@ MappingFE<dim, spacedim>::InternalData::initialize_face(
             unit_tangentials[7].emplace_back(t1);
 
           // face 3
-          t1[d0] = +0;
-          t1[d1] = +0;
-          t1[d2] = +1;
+          t1[d0] = -1 / std::sqrt(2.0);
+          t1[d1] = +1 / std::sqrt(2.0);
+          t1[d2] = 0;
           for (unsigned int i = 0; i < n_original_q_points; i++)
             unit_tangentials[3].emplace_back(t1);
 
           // face 3
-          t1[d0] = +0;
-          t1[d1] = +1;
-          t1[d2] = +0;
+          t1[d0] = 0;
+          t1[d1] = 0;
+          t1[d2] = 1;
           for (unsigned int i = 0; i < n_original_q_points; i++)
             unit_tangentials[8].emplace_back(t1);
 
           // face 4
-          t1[d0] = 1;
-          t1[d1] = 0;
-          t1[d2] = 0;
+          t1[d0] = +0;
+          t1[d1] = +0;
+          t1[d2] = +1;
           for (unsigned int i = 0; i < n_original_q_points; i++)
             unit_tangentials[4].emplace_back(t1);
 
           // face 4
-          t1[d0] = 0;
-          t1[d1] = 0;
-          t1[d2] = 1;
+          t1[d0] = +0;
+          t1[d1] = +1;
+          t1[d2] = +0;
           for (unsigned int i = 0; i < n_original_q_points; i++)
             unit_tangentials[9].emplace_back(t1);
         }
index 91dbf2e260061ac5e7685437064849bc5a7124c5..587b91e83c5ad1ef765f655ccffce4c26d90d555 100644 (file)
@@ -511,12 +511,12 @@ namespace Simplex
 
     if (degree == 1)
       {
+        this->unit_support_points.emplace_back(0.0, 0.0, 0.0);
         this->unit_support_points.emplace_back(1.0, 0.0, 0.0);
         this->unit_support_points.emplace_back(0.0, 1.0, 0.0);
-        this->unit_support_points.emplace_back(0.0, 0.0, 0.0);
+        this->unit_support_points.emplace_back(0.0, 0.0, 1.0);
         this->unit_support_points.emplace_back(1.0, 0.0, 1.0);
         this->unit_support_points.emplace_back(0.0, 1.0, 1.0);
-        this->unit_support_points.emplace_back(0.0, 0.0, 1.0);
       }
   }
 
index 1df99dcc927b94a9a568934e453e6a3cd1307f25..afde6fa7c6a308c2f7fc145b3642ecd33a585891 100644 (file)
@@ -25,9 +25,9 @@ DEAL::   with 134 CG iterations needed to obtain convergence
 DEAL::
 DEAL::Solve problem on WEDGE mesh:
 DEAL::   on parallel::fullydistributed::Triangulation
-DEAL:cg::Starting value 0.0561953
-DEAL:cg::Convergence step 197 value 8.61398e-13
-DEAL::   with 197 CG iterations needed to obtain convergence
+DEAL:cg::Starting value 0.0576447
+DEAL:cg::Convergence step 196 value 8.95502e-13
+DEAL::   with 196 CG iterations needed to obtain convergence
 DEAL::
 DEAL::Solve problem on PYRAMID mesh:
 DEAL::   on parallel::fullydistributed::Triangulation
index 6c0ab9a4a121705efac77969cc460450dd57ccf2..18ba5d01584322d8b4380f0ac5ef8e08972654a9 100644 (file)
@@ -25,9 +25,9 @@ DEAL::   with 134 CG iterations needed to obtain convergence
 DEAL::
 DEAL::Solve problem on WEDGE mesh:
 DEAL::   on parallel::fullydistributed::Triangulation
-DEAL:cg::Starting value 0.0561953
-DEAL:cg::Convergence step 197 value 8.60684e-13
-DEAL::   with 197 CG iterations needed to obtain convergence
+DEAL:cg::Starting value 0.0576447
+DEAL:cg::Convergence step 196 value 8.89749e-13
+DEAL::   with 196 CG iterations needed to obtain convergence
 DEAL::
 DEAL::Solve problem on PYRAMID mesh:
 DEAL::   on parallel::fullydistributed::Triangulation

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.