From e7c689bcc217f0b113921ebf6dac5b8014360098 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Sat, 10 Aug 2024 18:38:33 +0200 Subject: [PATCH] Remove static_cast --- tests/mpi/extract_constant_modes_01.cc | 6 ++++-- tests/mpi/extract_constant_modes_02.cc | 6 ++++-- tests/mpi/extract_constant_modes_03.cc | 6 ++++-- tests/mpi/extract_constant_modes_04.cc | 6 ++++-- tests/mpi/mg_ghost_layer_periodic.cc | 7 ++----- tests/mpi/p4est_2d_renumber_02.cc | 6 ++++-- 6 files changed, 22 insertions(+), 15 deletions(-) diff --git a/tests/mpi/extract_constant_modes_01.cc b/tests/mpi/extract_constant_modes_01.cc index 89b0deb807..eea5ec9b2e 100644 --- a/tests/mpi/extract_constant_modes_01.cc +++ b/tests/mpi/extract_constant_modes_01.cc @@ -49,8 +49,10 @@ test() std::vector sub(2); sub[0] = Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD); sub[1] = 1; - GridGenerator::subdivided_hyper_rectangle( - static_cast &>(tr), sub, Point<2>(0, 0), Point<2>(1, 1)); + GridGenerator::subdivided_hyper_rectangle(tr, + sub, + Point<2>(0, 0), + Point<2>(1, 1)); FESystem fe(FE_Q(1), 2, FE_DGQ(0), 1); DoFHandler dofh(tr); diff --git a/tests/mpi/extract_constant_modes_02.cc b/tests/mpi/extract_constant_modes_02.cc index 999c5dceeb..d115ac54d0 100644 --- a/tests/mpi/extract_constant_modes_02.cc +++ b/tests/mpi/extract_constant_modes_02.cc @@ -47,8 +47,10 @@ test() std::vector sub(2); sub[0] = Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD); sub[1] = 1; - GridGenerator::subdivided_hyper_rectangle( - static_cast &>(tr), sub, Point<2>(0, 0), Point<2>(1, 1)); + GridGenerator::subdivided_hyper_rectangle(tr, + sub, + Point<2>(0, 0), + Point<2>(1, 1)); FE_Q_DG0 fe(1); DoFHandler dofh(tr); diff --git a/tests/mpi/extract_constant_modes_03.cc b/tests/mpi/extract_constant_modes_03.cc index 0eaee97e95..432fe34c41 100644 --- a/tests/mpi/extract_constant_modes_03.cc +++ b/tests/mpi/extract_constant_modes_03.cc @@ -51,8 +51,10 @@ test(unsigned int fe_nothing_index) std::vector sub(2); sub[0] = 2 * Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD); sub[1] = 1; - GridGenerator::subdivided_hyper_rectangle( - static_cast &>(tr), sub, Point<2>(0, 0), Point<2>(1, 1)); + GridGenerator::subdivided_hyper_rectangle(tr, + sub, + Point<2>(0, 0), + Point<2>(1, 1)); DoFHandler dofh(tr); diff --git a/tests/mpi/extract_constant_modes_04.cc b/tests/mpi/extract_constant_modes_04.cc index 87d860e409..80fdd790ee 100644 --- a/tests/mpi/extract_constant_modes_04.cc +++ b/tests/mpi/extract_constant_modes_04.cc @@ -53,8 +53,10 @@ test() std::vector sub(2); sub[0] = Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD); sub[1] = 1; - GridGenerator::subdivided_hyper_rectangle( - static_cast &>(tr), sub, Point<2>(0, 0), Point<2>(1, 1)); + GridGenerator::subdivided_hyper_rectangle(tr, + sub, + Point<2>(0, 0), + Point<2>(1, 1)); FESystem fe(FE_Q(1), 2, FE_DGQ(0), 1); DoFHandler dofh(tr); diff --git a/tests/mpi/mg_ghost_layer_periodic.cc b/tests/mpi/mg_ghost_layer_periodic.cc index c40aff2f8b..3d590256b4 100644 --- a/tests/mpi/mg_ghost_layer_periodic.cc +++ b/tests/mpi/mg_ghost_layer_periodic.cc @@ -49,11 +49,8 @@ test() GridTools::PeriodicFacePair::cell_iterator>> periodic_faces; for (unsigned int d = 0; d < dim; ++d) - GridTools::collect_periodic_faces(static_cast &>(tria), - 2 * d, - 2 * d + 1, - d, - periodic_faces); + GridTools::collect_periodic_faces( + tria, 2 * d, 2 * d + 1, d, periodic_faces); tria.add_periodicity(periodic_faces); diff --git a/tests/mpi/p4est_2d_renumber_02.cc b/tests/mpi/p4est_2d_renumber_02.cc index b9390bea91..98a74a2e95 100644 --- a/tests/mpi/p4est_2d_renumber_02.cc +++ b/tests/mpi/p4est_2d_renumber_02.cc @@ -53,8 +53,10 @@ test() std::vector sub(2); sub[0] = Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD); sub[1] = 1; - GridGenerator::subdivided_hyper_rectangle( - static_cast &>(tr), sub, Point<2>(0, 0), Point<2>(1, 1)); + GridGenerator::subdivided_hyper_rectangle(tr, + sub, + Point<2>(0, 0), + Point<2>(1, 1)); const FE_Q fe_q(1); FESystem fe(fe_q, 2); -- 2.39.5