From b2b97ac14427e703306d303be67324480b42f7a7 Mon Sep 17 00:00:00 2001 From: Marc Fehling Date: Fri, 11 Mar 2022 20:19:39 -0700 Subject: [PATCH] cell_weight: updated tests. --- tests/mpi/cell_weights_01.cc | 4 +- tests/mpi/cell_weights_02.cc | 9 ++-- tests/mpi/cell_weights_03.cc | 27 ++++++------ ...weights_03.mpirun=5.with_p4est=true.output | 20 ++++----- tests/mpi/cell_weights_04.cc | 27 ++++++------ ...weights_04.mpirun=5.with_p4est=true.output | 20 ++++----- tests/mpi/cell_weights_05.cc | 41 +++++++++---------- ...weights_05.mpirun=3.with_p4est=true.output | 20 ++++----- ...weights_05.mpirun=5.with_p4est=true.output | 24 +++++------ tests/mpi/cell_weights_06.cc | 41 +++++++++---------- ...weights_06.mpirun=3.with_p4est=true.output | 12 +++--- tests/mpi/hp_cell_weights_01.cc | 6 +-- ...weights_01.with_p4est=true.mpirun=2.output | 8 ++-- tests/mpi/hp_cell_weights_02.cc | 6 +-- tests/mpi/hp_cell_weights_03.cc | 6 +-- tests/mpi/hp_cell_weights_04.cc | 6 +-- 16 files changed, 130 insertions(+), 147 deletions(-) diff --git a/tests/mpi/cell_weights_01.cc b/tests/mpi/cell_weights_01.cc index 4053eecbeb..981f5c3a00 100644 --- a/tests/mpi/cell_weights_01.cc +++ b/tests/mpi/cell_weights_01.cc @@ -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] diff --git a/tests/mpi/cell_weights_02.cc b/tests/mpi/cell_weights_02.cc index 8a83f72f7a..e2e0700a66 100644 --- a/tests/mpi/cell_weights_02.cc +++ b/tests/mpi/cell_weights_02.cc @@ -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::cell_iterator &cell, const typename parallel::distributed::Triangulation::CellStatus status) { - return 100; + return 1; } template @@ -55,14 +55,13 @@ test() GridGenerator::subdivided_hyper_cube(tr, 16); - tr.signals.cell_weight.connect( - std::bind(&cell_weight, std::placeholders::_1, std::placeholders::_2)); + tr.signals.cell_weight.connect(&cell_weight); 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] diff --git a/tests/mpi/cell_weights_03.cc b/tests/mpi/cell_weights_03.cc index 2c13420692..54082fd888 100644 --- a/tests/mpi/cell_weights_03.cc +++ b/tests/mpi/cell_weights_03.cc @@ -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 +#include #include #include #include @@ -41,7 +42,7 @@ cell_weight( const typename parallel::distributed::Triangulation::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, std::placeholders::_1, std::placeholders::_2)); + tr.signals.cell_weight.connect(&cell_weight); 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 integrated_weights(numproc, 0.0); - for (typename Triangulation::active_cell_iterator cell = - tr.begin_active(); - cell != tr.end(); - ++cell) - if (cell->is_locally_owned()) - integrated_weights[myid] += - 1000 + cell_weight( - cell, parallel::distributed::Triangulation::CELL_PERSIST); + std::vector integrated_weights(numproc, 0); + for (const auto &cell : + tr.active_cell_iterators() | IteratorFilters::LocallyOwnedCell()) + integrated_weights[myid] += + cell_weight(cell, + parallel::distributed::Triangulation::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; diff --git a/tests/mpi/cell_weights_03.mpirun=5.with_p4est=true.output b/tests/mpi/cell_weights_03.mpirun=5.with_p4est=true.output index fcc3677b8f..4d9b075ec9 100644 --- a/tests/mpi/cell_weights_03.mpirun=5.with_p4est=true.output +++ b/tests/mpi/cell_weights_03.mpirun=5.with_p4est=true.output @@ -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 diff --git a/tests/mpi/cell_weights_04.cc b/tests/mpi/cell_weights_04.cc index af670fd12f..65c505e4f9 100644 --- a/tests/mpi/cell_weights_04.cc +++ b/tests/mpi/cell_weights_04.cc @@ -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 +#include #include #include #include @@ -39,7 +40,7 @@ cell_weight( const typename parallel::distributed::Triangulation::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, std::placeholders::_1, std::placeholders::_2)); + tr.signals.cell_weight.connect(&cell_weight); 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 integrated_weights(numproc, 0.0); - for (typename Triangulation::active_cell_iterator cell = - tr.begin_active(); - cell != tr.end(); - ++cell) - if (cell->is_locally_owned()) - integrated_weights[myid] += - 1000 + cell_weight( - cell, parallel::distributed::Triangulation::CELL_PERSIST); + std::vector integrated_weights(numproc, 0); + for (const auto &cell : + tr.active_cell_iterators() | IteratorFilters::LocallyOwnedCell()) + integrated_weights[myid] += + cell_weight(cell, + parallel::distributed::Triangulation::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; diff --git a/tests/mpi/cell_weights_04.mpirun=5.with_p4est=true.output b/tests/mpi/cell_weights_04.mpirun=5.with_p4est=true.output index 3f31c752d0..3a03af864b 100644 --- a/tests/mpi/cell_weights_04.mpirun=5.with_p4est=true.output +++ b/tests/mpi/cell_weights_04.mpirun=5.with_p4est=true.output @@ -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 diff --git a/tests/mpi/cell_weights_05.cc b/tests/mpi/cell_weights_05.cc index 3fafaa76d8..823eaec3e3 100644 --- a/tests/mpi/cell_weights_05.cc +++ b/tests/mpi/cell_weights_05.cc @@ -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 +#include #include #include #include @@ -49,13 +50,14 @@ cell_weight( const typename parallel::distributed::Triangulation::cell_iterator &cell, const typename parallel::distributed::Triangulation::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 @@ -75,32 +77,29 @@ test() // repartition the mesh; attach different weights to all cells - tr.signals.cell_weight.connect( - std::bind(&cell_weight, std::placeholders::_1, std::placeholders::_2)); + tr.signals.cell_weight.connect(&cell_weight); 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 integrated_weights(numproc, 0.0); - for (typename Triangulation::active_cell_iterator cell = - tr.begin_active(); - cell != tr.end(); - ++cell) - if (cell->is_locally_owned()) - integrated_weights[myid] += - 1000 + cell_weight( - cell, parallel::distributed::Triangulation::CELL_PERSIST); + std::vector integrated_weights(numproc, 0); + for (const auto &cell : + tr.active_cell_iterators() | IteratorFilters::LocallyOwnedCell()) + integrated_weights[myid] += + cell_weight(cell, + parallel::distributed::Triangulation::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; diff --git a/tests/mpi/cell_weights_05.mpirun=3.with_p4est=true.output b/tests/mpi/cell_weights_05.mpirun=3.with_p4est=true.output index f632605bea..c4b3f85057 100644 --- a/tests/mpi/cell_weights_05.mpirun=3.with_p4est=true.output +++ b/tests/mpi/cell_weights_05.mpirun=3.with_p4est=true.output @@ -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 diff --git a/tests/mpi/cell_weights_05.mpirun=5.with_p4est=true.output b/tests/mpi/cell_weights_05.mpirun=5.with_p4est=true.output index 71f6fc4d7a..67c9c70cc0 100644 --- a/tests/mpi/cell_weights_05.mpirun=5.with_p4est=true.output +++ b/tests/mpi/cell_weights_05.mpirun=5.with_p4est=true.output @@ -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 diff --git a/tests/mpi/cell_weights_06.cc b/tests/mpi/cell_weights_06.cc index 8e83534ff5..ded8471d68 100644 --- a/tests/mpi/cell_weights_06.cc +++ b/tests/mpi/cell_weights_06.cc @@ -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 +#include #include #include #include @@ -48,13 +49,14 @@ cell_weight( const typename parallel::distributed::Triangulation::cell_iterator &cell, const typename parallel::distributed::Triangulation::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 @@ -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, std::placeholders::_1, std::placeholders::_2)); + tr.signals.cell_weight.connect(&cell_weight); 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 integrated_weights(numproc, 0.0); - for (typename Triangulation::active_cell_iterator cell = - tr.begin_active(); - cell != tr.end(); - ++cell) - if (cell->is_locally_owned()) - integrated_weights[myid] += - 1000 + cell_weight( - cell, parallel::distributed::Triangulation::CELL_PERSIST); + std::vector integrated_weights(numproc, 0); + for (const auto &cell : + tr.active_cell_iterators() | IteratorFilters::LocallyOwnedCell()) + integrated_weights[myid] += + cell_weight(cell, + parallel::distributed::Triangulation::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; diff --git a/tests/mpi/cell_weights_06.mpirun=3.with_p4est=true.output b/tests/mpi/cell_weights_06.mpirun=3.with_p4est=true.output index acb4d52333..4cf86f1702 100644 --- a/tests/mpi/cell_weights_06.mpirun=3.with_p4est=true.output +++ b/tests/mpi/cell_weights_06.mpirun=3.with_p4est=true.output @@ -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 diff --git a/tests/mpi/hp_cell_weights_01.cc b/tests/mpi/hp_cell_weights_01.cc index 60cd0d3010..fd1f2445ec 100644 --- a/tests/mpi/hp_cell_weights_01.cc +++ b/tests/mpi/hp_cell_weights_01.cc @@ -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 cell_weights( - dh, parallel::CellWeights::ndofs_weighting({100000, 1})); + dh, parallel::CellWeights::ndofs_weighting({1, 1})); tria.repartition(); diff --git a/tests/mpi/hp_cell_weights_01.with_p4est=true.mpirun=2.output b/tests/mpi/hp_cell_weights_01.with_p4est=true.mpirun=2.output index fd3ed1b81c..226966a046 100644 --- a/tests/mpi/hp_cell_weights_01.with_p4est=true.mpirun=2.output +++ b/tests/mpi/hp_cell_weights_01.with_p4est=true.mpirun=2.output @@ -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 diff --git a/tests/mpi/hp_cell_weights_02.cc b/tests/mpi/hp_cell_weights_02.cc index 1806cd5e4d..9b6223660d 100644 --- a/tests/mpi/hp_cell_weights_02.cc +++ b/tests/mpi/hp_cell_weights_02.cc @@ -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 cell_weights( - dh, parallel::CellWeights::ndofs_weighting({100000, 1})); + dh, parallel::CellWeights::ndofs_weighting({1, 1})); tria.repartition(); diff --git a/tests/mpi/hp_cell_weights_03.cc b/tests/mpi/hp_cell_weights_03.cc index 414668cddc..83492ee580 100644 --- a/tests/mpi/hp_cell_weights_03.cc +++ b/tests/mpi/hp_cell_weights_03.cc @@ -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 cell_weights( - dh, parallel::CellWeights::ndofs_weighting({100000, 1})); + dh, parallel::CellWeights::ndofs_weighting({1, 1})); // we didn't mark any cells, but we want to repartition our domain tria.execute_coarsening_and_refinement(); diff --git a/tests/mpi/hp_cell_weights_04.cc b/tests/mpi/hp_cell_weights_04.cc index a9eb1f4b25..e03fd8a603 100644 --- a/tests/mpi/hp_cell_weights_04.cc +++ b/tests/mpi/hp_cell_weights_04.cc @@ -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 cell_weights( - dh, parallel::CellWeights::ndofs_weighting({100000, 1})); + dh, parallel::CellWeights::ndofs_weighting({1, 1})); // we didn't mark any cells, but we want to repartition our domain tria.execute_coarsening_and_refinement(); -- 2.39.5