From: Daniel Arndt Date: Thu, 6 Aug 2020 20:02:38 +0000 (-0400) Subject: Replace deprecated parallel::Triangulation X-Git-Tag: v9.3.0-rc1~1197^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d921dc3c6d9cd448adc04a60554bdb86461db04a;p=dealii.git Replace deprecated parallel::Triangulation --- diff --git a/examples/step-64/step-64.cu b/examples/step-64/step-64.cu index 66e9e69e51..a1b4a8a516 100644 --- a/examples/step-64/step-64.cu +++ b/examples/step-64/step-64.cu @@ -256,8 +256,8 @@ namespace Step64 // We can ask the parallel triangulation for the number of active, locally // owned cells but only have a DoFHandler object at hand. Since // DoFHandler::get_triangulation() returns a Triangulation object, not a - // parallel::Triangulation object, we have to downcast the return value. This - // is safe to do here because we know that the triangulation is a + // parallel::TriangulationBase object, we have to downcast the return value. + // This is safe to do here because we know that the triangulation is a // parallel:distributed::Triangulation object in fact. template HelmholtzOperator::HelmholtzOperator( @@ -275,7 +275,7 @@ namespace Step64 const unsigned int n_owned_cells = - dynamic_cast *>( + dynamic_cast *>( &dof_handler.get_triangulation()) ->n_locally_owned_active_cells(); coef.reinit(Utilities::pow(fe_degree + 1, dim) * n_owned_cells); diff --git a/source/particles/generators.cc b/source/particles/generators.cc index 331b2aa38e..02ec692d11 100644 --- a/source/particles/generators.cc +++ b/source/particles/generators.cc @@ -120,7 +120,7 @@ namespace Particles #ifdef DEAL_II_WITH_MPI if (const auto tria = - dynamic_cast *>( + dynamic_cast *>( &triangulation)) { const types::particle_index n_particles_to_generate = @@ -236,7 +236,7 @@ namespace Particles { unsigned int combined_seed = random_number_seed; if (const auto tria = - dynamic_cast *>( + dynamic_cast *>( &triangulation)) { const unsigned int my_rank = @@ -264,7 +264,7 @@ namespace Particles double global_weight_integral; if (const auto tria = - dynamic_cast *>( + dynamic_cast *>( &triangulation)) { global_weight_integral = @@ -292,7 +292,7 @@ namespace Particles #ifdef DEAL_II_WITH_MPI if (const auto tria = - dynamic_cast *>( + dynamic_cast *>( &triangulation)) { MPI_Exscan(&local_weight_integral, diff --git a/source/particles/particle_handler.cc b/source/particles/particle_handler.cc index dfc2f4143a..b609d26b87 100644 --- a/source/particles/particle_handler.cc +++ b/source/particles/particle_handler.cc @@ -195,7 +195,7 @@ namespace Particles } if (const auto parallel_triangulation = - dynamic_cast *>( + dynamic_cast *>( &*triangulation)) { global_number_of_particles = dealii::Utilities::MPI::sum( @@ -439,7 +439,7 @@ namespace Particles #ifdef DEAL_II_WITH_MPI if (const auto parallel_triangulation = - dynamic_cast *>( + dynamic_cast *>( &*triangulation)) { types::particle_index particles_to_add_locally = positions.size(); @@ -1003,7 +1003,7 @@ namespace Particles std::set ghost_owners; if (const auto parallel_triangulation = - dynamic_cast *>( + dynamic_cast *>( &*triangulation)) ghost_owners = parallel_triangulation->ghost_owners(); @@ -1152,7 +1152,7 @@ namespace Particles // Exchange particles between processors if we have more than one process #ifdef DEAL_II_WITH_MPI if (const auto parallel_triangulation = - dynamic_cast *>( + dynamic_cast *>( &*triangulation)) { if (dealii::Utilities::MPI::n_mpi_processes( @@ -1181,7 +1181,7 @@ namespace Particles { // Nothing to do in serial computations const auto parallel_triangulation = - dynamic_cast *>( + dynamic_cast *>( &*triangulation); if (parallel_triangulation != nullptr) { @@ -1266,12 +1266,12 @@ namespace Particles &send_cells) { const auto parallel_triangulation = - dynamic_cast *>( + dynamic_cast *>( &*triangulation); Assert( parallel_triangulation, ExcMessage( - "This function is only implemented for parallel::Triangulation objects.")); + "This function is only implemented for parallel::TriangulationBase objects.")); // Determine the communication pattern const std::set ghost_owners =