]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fixed: tests/mpi/hp_constraints_consistent* 8635/head
authormarcfehling <marc.fehling@gmx.net>
Mon, 26 Aug 2019 13:55:51 +0000 (15:55 +0200)
committerMarc Fehling <marc.fehling@gmx.net>
Mon, 26 Aug 2019 22:17:25 +0000 (00:17 +0200)
tests/mpi/hp_constraints_consistent_01.cc
tests/mpi/hp_constraints_consistent_02.cc
tests/mpi/hp_constraints_consistent_03.cc

index 068f45d1a389e2e76731db906f3b8ea6ca84e571..5770e1b1e4d90ac4a0922a4a070a10751fdf8202 100644 (file)
@@ -81,23 +81,23 @@ test(const unsigned int degree_center,
   // prepare DoFHandler
   hp::DoFHandler<dim> dh(tria);
 
-  const auto &center = dh.begin_active();
-  if (center->is_locally_owned() &&
-      center->id().to_string() == "0_0:") // center cell has ID 0
-    {
-      center->set_active_fe_index(1);
+  for (const auto &cell : dh.active_cell_iterators())
+    if (cell->is_locally_owned() && cell->id().to_string() == "1_0:")
+      {
+        // set different fe on center cell
+        cell->set_active_fe_index(1);
 
 #ifdef DEBUG
-      // verify that our scenario is initialized correctly
-      // by checking the number of neighbors of the center cell
-      unsigned int n_neighbors = 0;
-      for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
-        if (static_cast<unsigned int>(center->neighbor_index(i)) !=
-            numbers::invalid_unsigned_int)
-          ++n_neighbors;
-      Assert(n_neighbors == 3, ExcInternalError());
+        // verify that our scenario is initialized correctly
+        // by checking the number of neighbors of the center cell
+        unsigned int n_neighbors = 0;
+        for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+          if (static_cast<unsigned int>(cell->neighbor_index(i)) !=
+              numbers::invalid_unsigned_int)
+            ++n_neighbors;
+        Assert(n_neighbors == 3, ExcInternalError());
 #endif
-    }
+      }
 
   dh.distribute_dofs(fe_collection);
 
index 6c29c129a993e54bb8f122357437bca4cee55cb4..908ccf52e88e4326c320743d11a35ad7a19409c7 100644 (file)
@@ -81,23 +81,23 @@ test(const unsigned int degree_center,
   // prepare DoFHandler
   hp::DoFHandler<dim> dh(tria);
 
-  const auto &center = dh.begin_active();
-  if (center->is_locally_owned() &&
-      center->id().to_string() == "0_0:") // center cell has ID 0
-    {
-      center->set_active_fe_index(1);
+  for (const auto &cell : dh.active_cell_iterators())
+    if (cell->is_locally_owned() && cell->id().to_string() == "1_0:")
+      {
+        // set different fe on center cell
+        cell->set_active_fe_index(1);
 
 #ifdef DEBUG
-      // verify that our scenario is initialized correctly
-      // by checking the number of neighbors of the center cell
-      unsigned int n_neighbors = 0;
-      for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
-        if (static_cast<unsigned int>(center->neighbor_index(i)) !=
-            numbers::invalid_unsigned_int)
-          ++n_neighbors;
-      Assert(n_neighbors == 3, ExcInternalError());
+        // verify that our scenario is initialized correctly
+        // by checking the number of neighbors of the center cell
+        unsigned int n_neighbors = 0;
+        for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+          if (static_cast<unsigned int>(cell->neighbor_index(i)) !=
+              numbers::invalid_unsigned_int)
+            ++n_neighbors;
+        Assert(n_neighbors == 3, ExcInternalError());
 #endif
-    }
+      }
 
   dh.distribute_dofs(fe_collection);
 
index c067f032e80a993c08ed491573489381fb85514b..a8057367e2e2e901cbede805417e9833f99723ca 100644 (file)
@@ -84,7 +84,7 @@ test(const unsigned int degree_center,
   for (const auto &cell : dh.active_cell_iterators())
     if (cell->is_locally_owned())
       {
-        if (cell->id().to_string() == "0_0:") // center cell has ID 0
+        if (cell->id().to_string() == "1_0:")
           {
             // set different fe on center cell
             cell->set_active_fe_index(1);
@@ -100,7 +100,7 @@ test(const unsigned int degree_center,
             Assert(n_neighbors == 3, ExcInternalError());
 #endif
           }
-        else if (cell->id().to_string() == "1_0:")
+        else if (cell->id().to_string() == "0_0:")
           {
             // set different boundary id on leftmost cell
             for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)

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.