]> https://gitweb.dealii.org/ - dealii.git/commitdiff
cell_weight: updated tests.
authorMarc Fehling <mafehling.git@gmail.com>
Sat, 12 Mar 2022 03:19:39 +0000 (20:19 -0700)
committerMarc Fehling <mafehling.git@gmail.com>
Sat, 12 Mar 2022 03:28:05 +0000 (20:28 -0700)
16 files changed:
tests/mpi/cell_weights_01.cc
tests/mpi/cell_weights_02.cc
tests/mpi/cell_weights_03.cc
tests/mpi/cell_weights_03.mpirun=5.with_p4est=true.output
tests/mpi/cell_weights_04.cc
tests/mpi/cell_weights_04.mpirun=5.with_p4est=true.output
tests/mpi/cell_weights_05.cc
tests/mpi/cell_weights_05.mpirun=3.with_p4est=true.output
tests/mpi/cell_weights_05.mpirun=5.with_p4est=true.output
tests/mpi/cell_weights_06.cc
tests/mpi/cell_weights_06.mpirun=3.with_p4est=true.output
tests/mpi/hp_cell_weights_01.cc
tests/mpi/hp_cell_weights_01.with_p4est=true.mpirun=2.output
tests/mpi/hp_cell_weights_02.cc
tests/mpi/hp_cell_weights_03.cc
tests/mpi/hp_cell_weights_04.cc

index 4053eecbebff7de397c3df40be30d889a45edf54..981f5c3a00028d53e5cf48fc1986e2ecf9896985 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2009 - 2020 by the deal.II authors
+// Copyright (C) 2009 - 2022 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -56,7 +56,7 @@ test()
   const auto n_locally_owned_active_cells_per_processor =
     Utilities::MPI::all_gather(tr.get_communicator(),
                                tr.n_locally_owned_active_cells());
-  if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
+  if (myid == 0)
     for (unsigned int p = 0; p < numproc; ++p)
       deallog << "processor " << p << ": "
               << n_locally_owned_active_cells_per_processor[p]
index 8a83f72f7af351f964468bb9536cc1407a65d1f8..e2e0700a662a43a0a9a54c1ad6e25ded97ba2915 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2009 - 2020 by the deal.II authors
+// Copyright (C) 2009 - 2022 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -40,7 +40,7 @@ cell_weight(
   const typename parallel::distributed::Triangulation<dim>::cell_iterator &cell,
   const typename parallel::distributed::Triangulation<dim>::CellStatus status)
 {
-  return 100;
+  return 1;
 }
 
 template <int dim>
@@ -55,14 +55,13 @@ test()
 
   GridGenerator::subdivided_hyper_cube(tr, 16);
 
-  tr.signals.cell_weight.connect(
-    std::bind(&cell_weight<dim>, std::placeholders::_1, std::placeholders::_2));
+  tr.signals.cell_weight.connect(&cell_weight<dim>);
   tr.refine_global(1);
 
   const auto n_locally_owned_active_cells_per_processor =
     Utilities::MPI::all_gather(tr.get_communicator(),
                                tr.n_locally_owned_active_cells());
-  if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
+  if (myid == 0)
     for (unsigned int p = 0; p < numproc; ++p)
       deallog << "processor " << p << ": "
               << n_locally_owned_active_cells_per_processor[p]
index 2c134206927ca505ec9412486bb8e6626dd1affc..54082fd8886762a55aaa3e47a43424d4577be44b 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2009 - 2020 by the deal.II authors
+// Copyright (C) 2009 - 2022 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -25,6 +25,7 @@
 
 #include <deal.II/distributed/tria.h>
 
+#include <deal.II/grid/filtered_iterator.h>
 #include <deal.II/grid/grid_generator.h>
 #include <deal.II/grid/grid_out.h>
 #include <deal.II/grid/tria.h>
@@ -41,7 +42,7 @@ cell_weight(
   const typename parallel::distributed::Triangulation<dim>::CellStatus status)
 {
   const unsigned int cell_weight =
-    (cell->center()[0] < 0.5 || cell->center()[1] < 0.5 ? 0 : 3 * 1000);
+    (cell->center()[0] < 0.5 || cell->center()[1] < 0.5 ? 1 : 4);
 
   return cell_weight;
 }
@@ -62,33 +63,29 @@ test()
 
   tr.refine_global(1);
 
-  tr.signals.cell_weight.connect(
-    std::bind(&cell_weight<dim>, std::placeholders::_1, std::placeholders::_2));
+  tr.signals.cell_weight.connect(&cell_weight<dim>);
 
   tr.repartition();
 
   const auto n_locally_owned_active_cells_per_processor =
     Utilities::MPI::all_gather(tr.get_communicator(),
                                tr.n_locally_owned_active_cells());
-  if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
+  if (myid == 0)
     for (unsigned int p = 0; p < numproc; ++p)
       deallog << "processor " << p << ": "
               << n_locally_owned_active_cells_per_processor[p]
               << " locally owned active cells" << std::endl;
 
   // let each processor sum up its weights
-  std::vector<double> integrated_weights(numproc, 0.0);
-  for (typename Triangulation<dim>::active_cell_iterator cell =
-         tr.begin_active();
-       cell != tr.end();
-       ++cell)
-    if (cell->is_locally_owned())
-      integrated_weights[myid] +=
-        1000 + cell_weight<dim>(
-                 cell, parallel::distributed::Triangulation<dim>::CELL_PERSIST);
+  std::vector<unsigned int> integrated_weights(numproc, 0);
+  for (const auto &cell :
+       tr.active_cell_iterators() | IteratorFilters::LocallyOwnedCell())
+    integrated_weights[myid] +=
+      cell_weight<dim>(cell,
+                       parallel::distributed::Triangulation<dim>::CELL_PERSIST);
 
   Utilities::MPI::sum(integrated_weights, MPI_COMM_WORLD, integrated_weights);
-  if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
+  if (myid == 0)
     for (unsigned int p = 0; p < numproc; ++p)
       deallog << "processor " << p << ": " << integrated_weights[p] << " weight"
               << std::endl;
index fcc3677b8fb478b2fb8d9ffbcdf584f1e4264dcb..4d9b075ec923446b1e5d2eac49255cc8426c28a7 100644 (file)
@@ -4,18 +4,18 @@ DEAL:2d::processor 1: 356 locally owned active cells
 DEAL:2d::processor 2: 128 locally owned active cells
 DEAL:2d::processor 3: 92 locally owned active cells
 DEAL:2d::processor 4: 88 locally owned active cells
-DEAL:2d::processor 0: 360000. weight
-DEAL:2d::processor 1: 356000. weight
-DEAL:2d::processor 2: 356000. weight
-DEAL:2d::processor 3: 368000. weight
-DEAL:2d::processor 4: 352000. weight
+DEAL:2d::processor 0: 360 weight
+DEAL:2d::processor 1: 356 weight
+DEAL:2d::processor 2: 356 weight
+DEAL:2d::processor 3: 368 weight
+DEAL:2d::processor 4: 352 weight
 DEAL:3d::processor 0: 11472 locally owned active cells
 DEAL:3d::processor 1: 3480 locally owned active cells
 DEAL:3d::processor 2: 7168 locally owned active cells
 DEAL:3d::processor 3: 7784 locally owned active cells
 DEAL:3d::processor 4: 2864 locally owned active cells
-DEAL:3d::processor 0: 1.14720e+07 weight
-DEAL:3d::processor 1: 1.14720e+07 weight
-DEAL:3d::processor 2: 1.14640e+07 weight
-DEAL:3d::processor 3: 1.14800e+07 weight
-DEAL:3d::processor 4: 1.14560e+07 weight
+DEAL:3d::processor 0: 11472 weight
+DEAL:3d::processor 1: 11472 weight
+DEAL:3d::processor 2: 11464 weight
+DEAL:3d::processor 3: 11480 weight
+DEAL:3d::processor 4: 11456 weight
index af670fd12ff079e3fd807bef38bcffe2c173d0eb..65c505e4f9715a2f7b488a4bccda670ae295bf7c 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2009 - 2020 by the deal.II authors
+// Copyright (C) 2009 - 2022 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -23,6 +23,7 @@
 
 #include <deal.II/distributed/tria.h>
 
+#include <deal.II/grid/filtered_iterator.h>
 #include <deal.II/grid/grid_generator.h>
 #include <deal.II/grid/grid_out.h>
 #include <deal.II/grid/tria.h>
@@ -39,7 +40,7 @@ cell_weight(
   const typename parallel::distributed::Triangulation<dim>::CellStatus status)
 {
   const unsigned int cell_weight =
-    (cell->center()[0] < 0.5 || cell->center()[1] < 0.5 ? 0 : 999 * 1000);
+    (cell->center()[0] < 0.5 || cell->center()[1] < 0.5 ? 1 : 1000);
 
   return cell_weight;
 }
@@ -56,33 +57,29 @@ test()
 
   GridGenerator::subdivided_hyper_cube(tr, 16);
 
-  tr.signals.cell_weight.connect(
-    std::bind(&cell_weight<dim>, std::placeholders::_1, std::placeholders::_2));
+  tr.signals.cell_weight.connect(&cell_weight<dim>);
 
   tr.refine_global(1);
 
   const auto n_locally_owned_active_cells_per_processor =
     Utilities::MPI::all_gather(tr.get_communicator(),
                                tr.n_locally_owned_active_cells());
-  if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
+  if (myid == 0)
     for (unsigned int p = 0; p < numproc; ++p)
       deallog << "processor " << p << ": "
               << n_locally_owned_active_cells_per_processor[p]
               << " locally owned active cells" << std::endl;
 
   // let each processor sum up its weights
-  std::vector<double> integrated_weights(numproc, 0.0);
-  for (typename Triangulation<dim>::active_cell_iterator cell =
-         tr.begin_active();
-       cell != tr.end();
-       ++cell)
-    if (cell->is_locally_owned())
-      integrated_weights[myid] +=
-        1000 + cell_weight<dim>(
-                 cell, parallel::distributed::Triangulation<dim>::CELL_PERSIST);
+  std::vector<unsigned int> integrated_weights(numproc, 0);
+  for (const auto &cell :
+       tr.active_cell_iterators() | IteratorFilters::LocallyOwnedCell())
+    integrated_weights[myid] +=
+      cell_weight<dim>(cell,
+                       parallel::distributed::Triangulation<dim>::CELL_PERSIST);
 
   Utilities::MPI::sum(integrated_weights, MPI_COMM_WORLD, integrated_weights);
-  if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
+  if (myid == 0)
     for (unsigned int p = 0; p < numproc; ++p)
       deallog << "processor " << p << ": " << integrated_weights[p] << " weight"
               << std::endl;
index 3f31c752d03b4a5194235bd622d35c56ae9531b9..3a03af864bc4900de36ccc24acd31f841f18f544 100644 (file)
@@ -4,18 +4,18 @@ DEAL:2d::processor 1: 52 locally owned active cells
 DEAL:2d::processor 2: 52 locally owned active cells
 DEAL:2d::processor 3: 48 locally owned active cells
 DEAL:2d::processor 4: 52 locally owned active cells
-DEAL:2d::processor 0: 5.27680e+07 weight
-DEAL:2d::processor 1: 5.20000e+07 weight
-DEAL:2d::processor 2: 5.20000e+07 weight
-DEAL:2d::processor 3: 4.80000e+07 weight
-DEAL:2d::processor 4: 5.20000e+07 weight
+DEAL:2d::processor 0: 52768 weight
+DEAL:2d::processor 1: 52000 weight
+DEAL:2d::processor 2: 52000 weight
+DEAL:2d::processor 3: 48000 weight
+DEAL:2d::processor 4: 52000 weight
 DEAL:3d::processor 0: 13920 locally owned active cells
 DEAL:3d::processor 1: 1640 locally owned active cells
 DEAL:3d::processor 2: 13920 locally owned active cells
 DEAL:3d::processor 3: 1648 locally owned active cells
 DEAL:3d::processor 4: 1640 locally owned active cells
-DEAL:3d::processor 0: 1.64429e+09 weight
-DEAL:3d::processor 1: 1.64000e+09 weight
-DEAL:3d::processor 2: 1.64429e+09 weight
-DEAL:3d::processor 3: 1.64800e+09 weight
-DEAL:3d::processor 4: 1.64000e+09 weight
+DEAL:3d::processor 0: 1644288 weight
+DEAL:3d::processor 1: 1640000 weight
+DEAL:3d::processor 2: 1644288 weight
+DEAL:3d::processor 3: 1648000 weight
+DEAL:3d::processor 4: 1640000 weight
index 3fafaa76d8d749b66a9a83edb4621e36501cb222..823eaec3e3d9e4a8ee2388b39e530f52130c00a5 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2009 - 2020 by the deal.II authors
+// Copyright (C) 2009 - 2022 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -34,6 +34,7 @@
 
 #include <deal.II/distributed/tria.h>
 
+#include <deal.II/grid/filtered_iterator.h>
 #include <deal.II/grid/grid_generator.h>
 #include <deal.II/grid/grid_out.h>
 #include <deal.II/grid/tria.h>
@@ -49,13 +50,14 @@ cell_weight(
   const typename parallel::distributed::Triangulation<dim>::cell_iterator &cell,
   const typename parallel::distributed::Triangulation<dim>::CellStatus status)
 {
-  return (
-    // bottom left corner
-    (cell->center()[0] < 1) && (cell->center()[1] < 1) &&
-        (dim == 3 ? (cell->center()[2] < 1) : true) ?
-      // one cell has more weight than all others together
-      Utilities::pow(16, dim) * 1000 :
-      0);
+  unsigned int weight = 1;
+
+  // one cell in bottom left corner has more weight than all others together
+  if ((cell->center()[0] < 1) && (cell->center()[1] < 1) &&
+      (dim == 3 ? (cell->center()[2] < 1) : true))
+    weight += Utilities::pow(16, dim);
+
+  return weight;
 }
 
 template <int dim>
@@ -75,32 +77,29 @@ test()
 
 
   // repartition the mesh; attach different weights to all cells
-  tr.signals.cell_weight.connect(
-    std::bind(&cell_weight<dim>, std::placeholders::_1, std::placeholders::_2));
+  tr.signals.cell_weight.connect(&cell_weight<dim>);
 
   tr.repartition();
 
   const auto n_locally_owned_active_cells_per_processor =
     Utilities::MPI::all_gather(tr.get_communicator(),
                                tr.n_locally_owned_active_cells());
-  if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
+  if (myid == 0)
     for (unsigned int p = 0; p < numproc; ++p)
       deallog << "processor " << p << ": "
               << n_locally_owned_active_cells_per_processor[p]
               << " locally owned active cells" << std::endl;
 
   // let each processor sum up its weights
-  std::vector<double> integrated_weights(numproc, 0.0);
-  for (typename Triangulation<dim>::active_cell_iterator cell =
-         tr.begin_active();
-       cell != tr.end();
-       ++cell)
-    if (cell->is_locally_owned())
-      integrated_weights[myid] +=
-        1000 + cell_weight<dim>(
-                 cell, parallel::distributed::Triangulation<dim>::CELL_PERSIST);
+  std::vector<unsigned int> integrated_weights(numproc, 0);
+  for (const auto &cell :
+       tr.active_cell_iterators() | IteratorFilters::LocallyOwnedCell())
+    integrated_weights[myid] +=
+      cell_weight<dim>(cell,
+                       parallel::distributed::Triangulation<dim>::CELL_PERSIST);
+
   Utilities::MPI::sum(integrated_weights, MPI_COMM_WORLD, integrated_weights);
-  if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
+  if (myid == 0)
     for (unsigned int p = 0; p < numproc; ++p)
       deallog << "processor " << p << ": " << integrated_weights[p] << " weight"
               << std::endl;
index f632605bea2ea33934f8cbfb39275fdc4c2ff6b3..c4b3f85057d3ea10ee909d0d7ab96cf02212b5a7 100644 (file)
@@ -1,13 +1,13 @@
 
 DEAL:2d::processor 0: 1 locally owned active cells
-DEAL:2d::processor 1: 85 locally owned active cells
-DEAL:2d::processor 2: 170 locally owned active cells
-DEAL:2d::processor 0: 257000. weight
-DEAL:2d::processor 1: 85000.0 weight
-DEAL:2d::processor 2: 170000. weight
+DEAL:2d::processor 1: 84 locally owned active cells
+DEAL:2d::processor 2: 171 locally owned active cells
+DEAL:2d::processor 0: 257 weight
+DEAL:2d::processor 1: 84 weight
+DEAL:2d::processor 2: 171 weight
 DEAL:3d::processor 0: 1 locally owned active cells
-DEAL:3d::processor 1: 1365 locally owned active cells
-DEAL:3d::processor 2: 2730 locally owned active cells
-DEAL:3d::processor 0: 4.09700e+06 weight
-DEAL:3d::processor 1: 1.36500e+06 weight
-DEAL:3d::processor 2: 2.73000e+06 weight
+DEAL:3d::processor 1: 1364 locally owned active cells
+DEAL:3d::processor 2: 2731 locally owned active cells
+DEAL:3d::processor 0: 4097 weight
+DEAL:3d::processor 1: 1364 weight
+DEAL:3d::processor 2: 2731 weight
index 71f6fc4d7a3629ffe19675be6505e8b6377e16ad..67c9c70cc0ebfb00dc2029ef11dd5fcb75010c8a 100644 (file)
@@ -1,21 +1,21 @@
 
 DEAL:2d::processor 0: 1 locally owned active cells
 DEAL:2d::processor 1: 0 locally owned active cells
-DEAL:2d::processor 2: 51 locally owned active cells
+DEAL:2d::processor 2: 50 locally owned active cells
 DEAL:2d::processor 3: 102 locally owned active cells
-DEAL:2d::processor 4: 102 locally owned active cells
-DEAL:2d::processor 0: 257000. weight
+DEAL:2d::processor 4: 103 locally owned active cells
+DEAL:2d::processor 0: 257 weight
 DEAL:2d::processor 1: 0 weight
-DEAL:2d::processor 2: 51000.0 weight
-DEAL:2d::processor 3: 102000. weight
-DEAL:2d::processor 4: 102000. weight
+DEAL:2d::processor 2: 50 weight
+DEAL:2d::processor 3: 102 weight
+DEAL:2d::processor 4: 103 weight
 DEAL:3d::processor 0: 1 locally owned active cells
 DEAL:3d::processor 1: 0 locally owned active cells
-DEAL:3d::processor 2: 819 locally owned active cells
+DEAL:3d::processor 2: 818 locally owned active cells
 DEAL:3d::processor 3: 1638 locally owned active cells
-DEAL:3d::processor 4: 1638 locally owned active cells
-DEAL:3d::processor 0: 4.09700e+06 weight
+DEAL:3d::processor 4: 1639 locally owned active cells
+DEAL:3d::processor 0: 4097 weight
 DEAL:3d::processor 1: 0 weight
-DEAL:3d::processor 2: 819000. weight
-DEAL:3d::processor 3: 1.63800e+06 weight
-DEAL:3d::processor 4: 1.63800e+06 weight
+DEAL:3d::processor 2: 818 weight
+DEAL:3d::processor 3: 1638 weight
+DEAL:3d::processor 4: 1639 weight
index 8e83534ff5cc0e7491fb6d787afd986be38b9dbb..ded8471d68c74d76a3af0de47fa06cc9f864dc5d 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2009 - 2020 by the deal.II authors
+// Copyright (C) 2009 - 2022 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -31,6 +31,7 @@
 
 #include <deal.II/distributed/tria.h>
 
+#include <deal.II/grid/filtered_iterator.h>
 #include <deal.II/grid/grid_generator.h>
 #include <deal.II/grid/grid_out.h>
 #include <deal.II/grid/tria.h>
@@ -48,13 +49,14 @@ cell_weight(
   const typename parallel::distributed::Triangulation<dim>::cell_iterator &cell,
   const typename parallel::distributed::Triangulation<dim>::CellStatus status)
 {
-  return (
-    // bottom left corner
-    (cell->center()[0] < 1) && (cell->center()[1] < 1) &&
-        (dim == 3 ? (cell->center()[2] < 1) : true) ?
-      // one cell has more weight than all others together
-      n_global_active_cells * 1000 :
-      0);
+  unsigned int weight = 1;
+
+  // one cell in bottom left corner has more weight than all others together
+  if ((cell->center()[0] < 1) && (cell->center()[1] < 1) &&
+      (dim == 3 ? (cell->center()[2] < 1) : true))
+    weight += n_global_active_cells;
+
+  return weight;
 }
 
 template <int dim>
@@ -75,31 +77,28 @@ test()
 
   // repartition the mesh; attach different weights to all cells
   n_global_active_cells = tr.n_global_active_cells();
-  tr.signals.cell_weight.connect(
-    std::bind(&cell_weight<dim>, std::placeholders::_1, std::placeholders::_2));
+  tr.signals.cell_weight.connect(&cell_weight<dim>);
   tr.repartition();
 
   const auto n_locally_owned_active_cells_per_processor =
     Utilities::MPI::all_gather(tr.get_communicator(),
                                tr.n_locally_owned_active_cells());
-  if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
+  if (myid == 0)
     for (unsigned int p = 0; p < numproc; ++p)
       deallog << "processor " << p << ": "
               << n_locally_owned_active_cells_per_processor[p]
               << " locally owned active cells" << std::endl;
 
   // let each processor sum up its weights
-  std::vector<double> integrated_weights(numproc, 0.0);
-  for (typename Triangulation<dim>::active_cell_iterator cell =
-         tr.begin_active();
-       cell != tr.end();
-       ++cell)
-    if (cell->is_locally_owned())
-      integrated_weights[myid] +=
-        1000 + cell_weight<dim>(
-                 cell, parallel::distributed::Triangulation<dim>::CELL_PERSIST);
+  std::vector<unsigned int> integrated_weights(numproc, 0);
+  for (const auto &cell :
+       tr.active_cell_iterators() | IteratorFilters::LocallyOwnedCell())
+    integrated_weights[myid] +=
+      cell_weight<dim>(cell,
+                       parallel::distributed::Triangulation<dim>::CELL_PERSIST);
+
   Utilities::MPI::sum(integrated_weights, MPI_COMM_WORLD, integrated_weights);
-  if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
+  if (myid == 0)
     for (unsigned int p = 0; p < numproc; ++p)
       deallog << "processor " << p << ": " << integrated_weights[p] << " weight"
               << std::endl;
index acb4d5233366d794c2221bf95356ff1e7b9a21d5..4cf86f170211717847cfa5ffd1df30d5fe62d3f6 100644 (file)
@@ -1,13 +1,13 @@
 
 DEAL:2d::processor 0: 0 locally owned active cells
-DEAL:2d::processor 1: 88 locally owned active cells
-DEAL:2d::processor 2: 168 locally owned active cells
+DEAL:2d::processor 1: 84 locally owned active cells
+DEAL:2d::processor 2: 172 locally owned active cells
 DEAL:2d::processor 0: 0 weight
-DEAL:2d::processor 1: 344000. weight
-DEAL:2d::processor 2: 168000. weight
+DEAL:2d::processor 1: 340 weight
+DEAL:2d::processor 2: 172 weight
 DEAL:3d::processor 0: 0 locally owned active cells
 DEAL:3d::processor 1: 1368 locally owned active cells
 DEAL:3d::processor 2: 2728 locally owned active cells
 DEAL:3d::processor 0: 0 weight
-DEAL:3d::processor 1: 5.46400e+06 weight
-DEAL:3d::processor 2: 2.72800e+06 weight
+DEAL:3d::processor 1: 5464 weight
+DEAL:3d::processor 2: 2728 weight
index 60cd0d3010f1ebeb8fc93b2ed604b067ef830f8d..fd1f2445ecc56cc085617bb699b455a7a34dcf76 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2018 - 2021 by the deal.II authors
+// Copyright (C) 2018 - 2022 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -24,8 +24,6 @@
 // repartitioning the triangulation. The expected accumulated weight on
 // each processor should correlate to the sum of all degrees of
 // freedom on all cells of the corresponding subdomain.
-// We employ a large proportionality factor on our weighting function
-// to neglect the standard weight of '1000' per cell.
 //
 // This test works on a parallel::distributed::Triangulation.
 
@@ -78,7 +76,7 @@ test()
 
 
   const parallel::CellWeights<dim> cell_weights(
-    dh, parallel::CellWeights<dim>::ndofs_weighting({100000, 1}));
+    dh, parallel::CellWeights<dim>::ndofs_weighting({1, 1}));
 
   tria.repartition();
 
index fd3ed1b81c7a88468b35eeb374900f23857c1edd..226966a04657a00d798be469cc62af156b27e5fb 100644 (file)
@@ -7,8 +7,8 @@ DEAL:0:2d::ExcMessage("Triangulation associated with the DoFHandler has changed!
 DEAL:0:2d::OK
 DEAL:0:3d::Number of cells before repartitioning: 32
 DEAL:0:3d::  Cumulative dofs per cell: 464
-DEAL:0:3d::Number of cells after repartitioning: 24
-DEAL:0:3d::  Cumulative dofs per cell: 400
+DEAL:0:3d::Number of cells after repartitioning: 16
+DEAL:0:3d::  Cumulative dofs per cell: 336
 DEAL:0:3d::ExcMessage("Triangulation associated with the DoFHandler has changed!")
 DEAL:0:3d::OK
 
@@ -20,8 +20,8 @@ DEAL:1:2d::ExcMessage("Triangulation associated with the DoFHandler has changed!
 DEAL:1:2d::OK
 DEAL:1:3d::Number of cells before repartitioning: 32
 DEAL:1:3d::  Cumulative dofs per cell: 256
-DEAL:1:3d::Number of cells after repartitioning: 40
-DEAL:1:3d::  Cumulative dofs per cell: 320
+DEAL:1:3d::Number of cells after repartitioning: 48
+DEAL:1:3d::  Cumulative dofs per cell: 384
 DEAL:1:3d::ExcMessage("Triangulation associated with the DoFHandler has changed!")
 DEAL:1:3d::OK
 
index 1806cd5e4d9e6157ec6169fd8a29a4b54bb92200..9b6223660d258a92f91260fe00b8a7a338436842 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2018 - 2021 by the deal.II authors
+// Copyright (C) 2018 - 2022 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -24,8 +24,6 @@
 // repartitioning the triangulation. The expected accumulated weight on
 // each processor should correlate to the sum of all degrees of
 // freedom on all cells of the corresponding subdomain.
-// We employ a large proportionality factor on our weighting function
-// to neglect the standard weight of '1000' per cell.
 //
 // This test works on a parallel::distributed::Triangulation.
 //
@@ -84,7 +82,7 @@ test()
 
 
   const parallel::CellWeights<dim> cell_weights(
-    dh, parallel::CellWeights<dim>::ndofs_weighting({100000, 1}));
+    dh, parallel::CellWeights<dim>::ndofs_weighting({1, 1}));
 
   tria.repartition();
 
index 414668cddce7075d34b663a681e6aebdfd9d4ad1..83492ee5808a4447f7b8dc8b067183a96158c317 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2018 - 2021 by the deal.II authors
+// Copyright (C) 2018 - 2022 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -24,8 +24,6 @@
 // repartitioning the triangulation. The expected accumulated weight on
 // each processor should correlate to the sum of all degrees of
 // freedom on all cells of the corresponding subdomain.
-// We employ a large proportionality factor on our weighting function
-// to neglect the standard weight of '1000' per cell.
 //
 // This test works on a parallel::shared::Triangulation with METIS
 // as a partitioner. Cell weighting with ZOLTAN was not available
@@ -84,7 +82,7 @@ test()
 
 
   const parallel::CellWeights<dim> cell_weights(
-    dh, parallel::CellWeights<dim>::ndofs_weighting({100000, 1}));
+    dh, parallel::CellWeights<dim>::ndofs_weighting({1, 1}));
 
   // we didn't mark any cells, but we want to repartition our domain
   tria.execute_coarsening_and_refinement();
index a9eb1f4b25554f0595bdc8ca39499690e1268b3e..e03fd8a603a7ae674dc43cc4a852e6e75fc98602 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2019 - 2021 by the deal.II authors
+// Copyright (C) 2019 - 2022 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -24,8 +24,6 @@
 // repartitioning the triangulation. The expected accumulated weight on
 // each processor should correlate to the sum of all degrees of
 // freedom on all cells of the corresponding subdomain.
-// We employ a large proportionality factor on our weighting function
-// to neglect the standard weight of '1000' per cell.
 //
 // This test works on a parallel::shared::Triangulation with METIS
 // as a partitioner. Cell weighting with ZOLTAN was not available
@@ -86,7 +84,7 @@ test()
 
 
   const parallel::CellWeights<dim> cell_weights(
-    dh, parallel::CellWeights<dim>::ndofs_weighting({100000, 1}));
+    dh, parallel::CellWeights<dim>::ndofs_weighting({1, 1}));
 
   // we didn't mark any cells, but we want to repartition our domain
   tria.execute_coarsening_and_refinement();

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.