From: Peter Munch Date: Mon, 19 Aug 2019 06:33:59 +0000 (+0200) Subject: Rename parallel::Triangulation to parallel::TriangulationBase X-Git-Tag: v9.2.0-rc1~1220^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a29b09a41c3aad41ef13ba6280eb19132d86d01;p=dealii.git Rename parallel::Triangulation to parallel::TriangulationBase --- diff --git a/doc/news/changes/incompatibilities/20190819PeterMunch b/doc/news/changes/incompatibilities/20190819PeterMunch new file mode 100644 index 0000000000..1eed9031b8 --- /dev/null +++ b/doc/news/changes/incompatibilities/20190819PeterMunch @@ -0,0 +1,5 @@ +Changed: The parallel::Triangulation class has been renamed to parallel::TriangulationBase +to better reflect its purpose of a base to a series of parallel triangulations such as +parallel::distributed::Triangulation or parallel::shared::Triangulation. +
+(Peter Munch, 2019/08/19) diff --git a/include/deal.II/distributed/cell_weights.h b/include/deal.II/distributed/cell_weights.h index eecd4c69bd..05eaae20d7 100644 --- a/include/deal.II/distributed/cell_weights.h +++ b/include/deal.II/distributed/cell_weights.h @@ -28,7 +28,7 @@ DEAL_II_NAMESPACE_OPEN namespace parallel { /** - * Anytime a parallel::Triangulation is repartitioned, either upon request + * Anytime a parallel::TriangulationBase is repartitioned, either upon request * or by refinement/coarsening, cells will be distributed amongst all * subdomains to achieve an equally balanced workload. If the workload per * cell varies, which is in general the case for hp::DoFHandler objects, we @@ -40,7 +40,7 @@ namespace parallel * a hp::DoFHandler. One can choose from predefined weighting * algorithms provided by this class or provide a custom one. The * chosen weighting function will be connected to the corresponding - * signal of the linked parallel::Triangulation via callback. + * signal of the linked parallel::TriangulationBase via callback. * * An object of this class needs to exist for every DoFHandler associated * with the Triangulation we work on to achieve satisfying work balancing @@ -147,7 +147,7 @@ namespace parallel * We store both to make sure to always work on the correct combination of * both. */ - SmartPointer, CellWeights> + SmartPointer, CellWeights> triangulation; /** diff --git a/include/deal.II/distributed/shared_tria.h b/include/deal.II/distributed/shared_tria.h index 66af85cf51..364dcf1286 100644 --- a/include/deal.II/distributed/shared_tria.h +++ b/include/deal.II/distributed/shared_tria.h @@ -99,7 +99,8 @@ namespace parallel * */ template - class Triangulation : public dealii::parallel::Triangulation + class Triangulation + : public dealii::parallel::TriangulationBase { public: using active_cell_iterator = @@ -401,7 +402,8 @@ namespace parallel * MPI is not available. */ template - class Triangulation : public dealii::parallel::Triangulation + class Triangulation + : public dealii::parallel::TriangulationBase { public: /** diff --git a/include/deal.II/distributed/tria.h b/include/deal.II/distributed/tria.h index 539a866608..4c4b9b0b64 100644 --- a/include/deal.II/distributed/tria.h +++ b/include/deal.II/distributed/tria.h @@ -154,7 +154,7 @@ namespace parallel * and this function needs to know about boundaries. In other words, it is * not enough to just set boundary indicators on newly created * faces only after calling - * distributed::parallel::Triangulation::execute_coarsening_and_refinement: + * distributed::parallel::TriangulationBase::execute_coarsening_and_refinement: * it actually has to happen while that function is still running. * * The way to do this is by writing a function that sets boundary @@ -248,7 +248,8 @@ namespace parallel * @ingroup distributed */ template - class Triangulation : public dealii::parallel::Triangulation + class Triangulation + : public dealii::parallel::TriangulationBase { public: /** @@ -1199,7 +1200,7 @@ namespace parallel get_cell_weights() const; /** - * Override the implementation in parallel::Triangulation because + * Override the implementation in parallel::TriangulationBase because * we can ask p4est about ghost neighbors across periodic boundaries. * * Specifically, this function determines the neighboring subdomains that @@ -1236,7 +1237,7 @@ namespace parallel */ template class Triangulation<1, spacedim> - : public dealii::parallel::Triangulation<1, spacedim> + : public dealii::parallel::TriangulationBase<1, spacedim> { public: /** @@ -1410,7 +1411,8 @@ namespace parallel * p4est is not available. */ template - class Triangulation : public dealii::parallel::Triangulation + class Triangulation + : public dealii::parallel::TriangulationBase { public: /** diff --git a/include/deal.II/distributed/tria_base.h b/include/deal.II/distributed/tria_base.h index 1b450a4022..09f5fa3e3a 100644 --- a/include/deal.II/distributed/tria_base.h +++ b/include/deal.II/distributed/tria_base.h @@ -44,13 +44,13 @@ namespace parallel * parallel::shared::Triangulation. */ template - class Triangulation : public dealii::Triangulation + class TriangulationBase : public dealii::Triangulation { public: /** * Constructor. */ - Triangulation( + TriangulationBase( MPI_Comm mpi_communicator, const typename dealii::Triangulation::MeshSmoothing smooth_grid = (dealii::Triangulation::none), @@ -59,7 +59,7 @@ namespace parallel /** * Destructor. */ - virtual ~Triangulation() override; + virtual ~TriangulationBase() override; /** * Return MPI communicator used by this triangulation. @@ -239,6 +239,13 @@ namespace parallel fill_level_ghost_owners(); }; + /** + * Using directive for backwards-compatibility. + * @deprecated Use TriangulationBase instead of Triangulation. + */ + template + using Triangulation DEAL_II_DEPRECATED = TriangulationBase; + } // namespace parallel DEAL_II_NAMESPACE_CLOSE diff --git a/include/deal.II/dofs/dof_handler.h b/include/deal.II/dofs/dof_handler.h index 438d5bff91..de66e8d9b4 100644 --- a/include/deal.II/dofs/dof_handler.h +++ b/include/deal.II/dofs/dof_handler.h @@ -1586,8 +1586,8 @@ template std::vector DoFHandler::compute_n_locally_owned_dofs_per_processor() const { - const parallel::Triangulation *tr = - (dynamic_cast *>( + const parallel::TriangulationBase *tr = + (dynamic_cast *>( &this->get_triangulation())); if (tr != nullptr) return number_cache.get_n_locally_owned_dofs_per_processor( @@ -1602,8 +1602,8 @@ template std::vector DoFHandler::compute_locally_owned_dofs_per_processor() const { - const parallel::Triangulation *tr = - (dynamic_cast *>( + const parallel::TriangulationBase *tr = + (dynamic_cast *>( &this->get_triangulation())); if (tr != nullptr) return number_cache.get_locally_owned_dofs_per_processor( @@ -1626,8 +1626,8 @@ DoFHandler::compute_locally_owned_mg_dofs_per_processor( mg_number_cache.size() == this->get_triangulation().n_global_levels(), ExcMessage( "The level dofs are not set up properly! Did you call distribute_mg_dofs()?")); - const parallel::Triangulation *tr = - (dynamic_cast *>( + const parallel::TriangulationBase *tr = + (dynamic_cast *>( &this->get_triangulation())); if (tr != nullptr) return mg_number_cache[level].get_locally_owned_dofs_per_processor( diff --git a/include/deal.II/dofs/dof_renumbering.h b/include/deal.II/dofs/dof_renumbering.h index 4a8d1d8117..3a94d4e8c1 100644 --- a/include/deal.II/dofs/dof_renumbering.h +++ b/include/deal.II/dofs/dof_renumbering.h @@ -855,7 +855,8 @@ namespace DoFRenumbering * @pre for serial triangulation @p cell_order must have size * dof_handler.get_triangulation().n_active_cells(), whereas * in case of parallel triangulation its size should be - * parallel::Triangulation::n_locally_owned_active_cells(). Every active cell + * parallel::TriangulationBase::n_locally_owned_active_cells(). Every active + * cell * iterator of that triangulation needs to be present in @p cell_order exactly * once. */ @@ -883,8 +884,8 @@ namespace DoFRenumbering * vector therefore presents a (very particular) permutation of the * current DoF indices. * @param[out] inverse_renumbering The reverse of the permutation returned - * in the previous argument. In case of parallel::Triangulation the inverse - * is within locally owned DoFs. + * in the previous argument. In case of parallel::TriangulationBase the + * inverse is within locally owned DoFs. * @param[in] dof_handler The DoFHandler whose degrees of freedom are to be * renumbered. * @param[in] cell_order A vector that contains the order of the cells that @@ -893,8 +894,8 @@ namespace DoFRenumbering * @pre for serial triangulation @p cell_order must have size * dof_handler.get_triangulation().n_active_cells(), whereas * in case of parallel triangulation its size should be - * parallel::Triangulation::n_locally_owned_active_cells(). Every active cell - * iterator of that triangulation needs to be present in @p + * parallel::TriangulationBase::n_locally_owned_active_cells(). Every active + * cell iterator of that triangulation needs to be present in @p * cell_order exactly once. @post For each @p i between zero and * dof_handler.n_locally_owned_dofs(), the condition * renumbering[inverse_renumbering[i]] == diff --git a/include/deal.II/dofs/dof_tools.h b/include/deal.II/dofs/dof_tools.h index 2dab61a182..fd8c77abbf 100644 --- a/include/deal.II/dofs/dof_tools.h +++ b/include/deal.II/dofs/dof_tools.h @@ -1311,7 +1311,7 @@ namespace DoFTools /** * Same as above but return the selected DoFs as IndexSet. In particular, - * for parallel::Triangulation objects this function should be preferred. + * for parallel::TriangulationBase objects this function should be preferred. */ template IndexSet diff --git a/include/deal.II/grid/grid_tools.h b/include/deal.II/grid/grid_tools.h index 39b8214430..81845750cb 100644 --- a/include/deal.II/grid/grid_tools.h +++ b/include/deal.II/grid/grid_tools.h @@ -727,7 +727,7 @@ namespace GridTools * distances between them, might make the function extremely faster. * * @note If a point is not found inside the mesh, or is lying inside an - * artificial cell of a parallel::Triangulation, an exception is thrown. + * artificial cell of a parallel::TriangulationBase, an exception is thrown. * * @note The actual return type of this function, i.e., the type referenced * above as @p return_type, is @@ -814,9 +814,9 @@ namespace GridTools * @p local_points for each process, find the points lying on the locally * owned part of the mesh and compute the quadrature rules for them. * Distributed compute point locations is a function similar to - * GridTools::compute_point_locations but working for parallel::Triangulation - * objects and, unlike its serial version, also for a distributed - * triangulation (see parallel::distributed::Triangulation). + * GridTools::compute_point_locations but working for + * parallel::TriangulationBase objects and, unlike its serial version, also + * for a distributed triangulation (see parallel::distributed::Triangulation). * * @param[in] cache a GridTools::Cache object * @param[in] local_points the array of points owned by the current process. @@ -850,7 +850,7 @@ namespace GridTools * * The function uses the triangulation's mpi communicator: for this reason it * throws an assert error if the Triangulation is not derived from - * parallel::Triangulation . + * parallel::TriangulationBase . * * In a serial execution the first three elements of the tuple are the same * as in GridTools::compute_point_locations . @@ -3805,7 +3805,7 @@ namespace GridTools # else constexpr int dim = MeshType::dimension; constexpr int spacedim = MeshType::space_dimension; - auto tria = static_cast *>( + auto tria = static_cast *>( &mesh.get_triangulation()); Assert( tria != nullptr, diff --git a/include/deal.II/grid/grid_tools_cache.h b/include/deal.II/grid/grid_tools_cache.h index 9ad247ce89..75204a92a1 100644 --- a/include/deal.II/grid/grid_tools_cache.h +++ b/include/deal.II/grid/grid_tools_cache.h @@ -159,7 +159,7 @@ namespace GridTools * areas that cover all or parts of the local portion of a * parallel triangulation, and an unsigned int representing * the process or subdomain that owns these cells. - * Given a point on a parallel::Triangulation, this tree + * Given a point on a parallel::TriangulationBase, this tree * allows to identify one, or few candidate processes, for * which the point lies on a locally owned cell. * diff --git a/include/deal.II/grid/tria_accessor.templates.h b/include/deal.II/grid/tria_accessor.templates.h index 0fadd84d11..59cdaf16da 100644 --- a/include/deal.II/grid/tria_accessor.templates.h +++ b/include/deal.II/grid/tria_accessor.templates.h @@ -40,7 +40,7 @@ DEAL_II_NAMESPACE_OPEN namespace parallel { template - class Triangulation; + class TriangulationBase; } #endif @@ -3569,8 +3569,9 @@ CellAccessor::is_locally_owned() const if (is_artificial()) return false; - const parallel::Triangulation *pt = - dynamic_cast *>(this->tria); + const parallel::TriangulationBase *pt = + dynamic_cast *>( + this->tria); if (pt == nullptr) return true; @@ -3589,8 +3590,9 @@ CellAccessor::is_locally_owned_on_level() const return true; #else - const parallel::Triangulation *pt = - dynamic_cast *>(this->tria); + const parallel::TriangulationBase *pt = + dynamic_cast *>( + this->tria); if (pt == nullptr) return true; @@ -3614,8 +3616,9 @@ CellAccessor::is_ghost() const return false; #else - const parallel::Triangulation *pt = - dynamic_cast *>(this->tria); + const parallel::TriangulationBase *pt = + dynamic_cast *>( + this->tria); if (pt == nullptr) return false; @@ -3637,8 +3640,9 @@ CellAccessor::is_artificial() const return false; #else - const parallel::Triangulation *pt = - dynamic_cast *>(this->tria); + const parallel::TriangulationBase *pt = + dynamic_cast *>( + this->tria); if (pt == nullptr) return false; diff --git a/include/deal.II/hp/dof_handler.h b/include/deal.II/hp/dof_handler.h index 2adda55291..d6c9b0888f 100644 --- a/include/deal.II/hp/dof_handler.h +++ b/include/deal.II/hp/dof_handler.h @@ -431,7 +431,7 @@ namespace hp /** * Assign a hp::FECollection @p fe to this object. * - * In case a parallel::Triangulation is assigned to this object, + * In case a parallel::TriangulationBase is assigned to this object, * the active_fe_indices will be exchanged between processors so that * each one knows the indices on its own cells and all ghost cells. * @@ -1595,8 +1595,8 @@ namespace hp std::vector DoFHandler::compute_n_locally_owned_dofs_per_processor() const { - const parallel::Triangulation *tr = - (dynamic_cast *>( + const parallel::TriangulationBase *tr = + (dynamic_cast *>( &this->get_triangulation())); if (tr != nullptr) return number_cache.get_n_locally_owned_dofs_per_processor( @@ -1611,8 +1611,8 @@ namespace hp std::vector DoFHandler::compute_locally_owned_dofs_per_processor() const { - const parallel::Triangulation *tr = - (dynamic_cast *>( + const parallel::TriangulationBase *tr = + (dynamic_cast *>( &this->get_triangulation())); if (tr != nullptr) return number_cache.get_locally_owned_dofs_per_processor( @@ -1673,8 +1673,8 @@ namespace hp Assert(level < this->get_triangulation().n_global_levels(), ExcMessage("The given level index exceeds the number of levels " "present in the triangulation")); - const parallel::Triangulation *tr = - (dynamic_cast *>( + const parallel::TriangulationBase *tr = + (dynamic_cast *>( &this->get_triangulation())); if (tr != nullptr) return mg_number_cache[level].get_locally_owned_dofs_per_processor( diff --git a/include/deal.II/matrix_free/cuda_matrix_free.templates.h b/include/deal.II/matrix_free/cuda_matrix_free.templates.h index b993716d04..ace2e804f7 100644 --- a/include/deal.II/matrix_free/cuda_matrix_free.templates.h +++ b/include/deal.II/matrix_free/cuda_matrix_free.templates.h @@ -544,7 +544,8 @@ namespace CUDAWrappers { const auto &triangulation = dof_handler.get_triangulation(); if (const auto parallel_triangulation = - dynamic_cast *>(&triangulation)) + dynamic_cast *>( + &triangulation)) internal_reinit(mapping, dof_handler, constraints, diff --git a/include/deal.II/matrix_free/face_setup_internal.h b/include/deal.II/matrix_free/face_setup_internal.h index 3646ce6dda..84c4eed1db 100644 --- a/include/deal.II/matrix_free/face_setup_internal.h +++ b/include/deal.II/matrix_free/face_setup_internal.h @@ -195,7 +195,8 @@ namespace internal // boundaries as evenly as possible between the processors std::map inner_faces_at_proc_boundary; - if (dynamic_cast *>(&triangulation)) + if (dynamic_cast *>( + &triangulation)) { const types::subdomain_id my_domain = triangulation.locally_owned_subdomain(); @@ -289,8 +290,8 @@ namespace internal // looking at the length of the lists of faces # if defined(DEAL_II_WITH_MPI) && defined(DEBUG) MPI_Comm comm = MPI_COMM_SELF; - if (const parallel::Triangulation *ptria = - dynamic_cast *>( + if (const parallel::TriangulationBase *ptria = + dynamic_cast *>( &triangulation)) comm = ptria->get_communicator(); diff --git a/include/deal.II/matrix_free/matrix_free.templates.h b/include/deal.II/matrix_free/matrix_free.templates.h index 7e0c4ae4a2..678b8226ed 100644 --- a/include/deal.II/matrix_free/matrix_free.templates.h +++ b/include/deal.II/matrix_free/matrix_free.templates.h @@ -275,8 +275,8 @@ MatrixFree::internal_reinit( // set variables that are independent of FE if (Utilities::MPI::job_supports_mpi() == true) { - const parallel::Triangulation *dist_tria = - dynamic_cast *>( + const parallel::TriangulationBase *dist_tria = + dynamic_cast *>( &(dof_handler[0]->get_triangulation())); task_info.communicator = dist_tria != nullptr ? dist_tria->get_communicator() : @@ -444,8 +444,8 @@ MatrixFree::internal_reinit( // set variables that are independent of FE if (Utilities::MPI::job_supports_mpi() == true) { - const parallel::Triangulation *dist_tria = - dynamic_cast *>( + const parallel::TriangulationBase *dist_tria = + dynamic_cast *>( &(dof_handler[0]->get_triangulation())); task_info.communicator = dist_tria != nullptr ? dist_tria->get_communicator() : @@ -658,7 +658,7 @@ MatrixFree::initialize_dof_handlers( end_cell = tria.end(0); // For serial Triangulations always take all cells const unsigned int subdomain_id = - (dynamic_cast *>( + (dynamic_cast *>( &dof_handler[0]->get_triangulation()) != nullptr) ? my_pid : numbers::invalid_subdomain_id; @@ -730,7 +730,7 @@ MatrixFree::initialize_dof_handlers( end_cell = dof_handler[0]->end(0); // For serial Triangulations always take all cells const unsigned int subdomain_id = - (dynamic_cast *>( + (dynamic_cast *>( &dof_handler[0]->get_triangulation()) != nullptr) ? my_pid : numbers::invalid_subdomain_id; diff --git a/include/deal.II/multigrid/mg_transfer.h b/include/deal.II/multigrid/mg_transfer.h index ce3a9eafee..ba66e59b4a 100644 --- a/include/deal.II/multigrid/mg_transfer.h +++ b/include/deal.II/multigrid/mg_transfer.h @@ -82,11 +82,11 @@ namespace internal const SparsityPatternType &sp, DoFHandlerType & dh) { - const parallel::Triangulation + const parallel::TriangulationBase *dist_tria = dynamic_cast< - const parallel::Triangulation *>( + const parallel::TriangulationBase *>( &(dh.get_triangulation())); MPI_Comm communicator = dist_tria != nullptr ? dist_tria->get_communicator() : MPI_COMM_SELF; @@ -115,11 +115,11 @@ namespace internal const SparsityPatternType &sp, DoFHandlerType & dh) { - const parallel::Triangulation + const parallel::TriangulationBase *dist_tria = dynamic_cast< - const parallel::Triangulation *>( + const parallel::TriangulationBase *>( &(dh.get_triangulation())); MPI_Comm communicator = dist_tria != nullptr ? dist_tria->get_communicator() : MPI_COMM_SELF; @@ -149,11 +149,11 @@ namespace internal const SparsityPatternType &sp, DoFHandlerType & dh) { - const parallel::Triangulation + const parallel::TriangulationBase *dist_tria = dynamic_cast< - const parallel::Triangulation *>( + const parallel::TriangulationBase *>( &(dh.get_triangulation())); MPI_Comm communicator = dist_tria != nullptr ? dist_tria->get_communicator() : MPI_COMM_SELF; @@ -182,11 +182,11 @@ namespace internal const SparsityPatternType &sp, DoFHandlerType & dh) { - const parallel::Triangulation + const parallel::TriangulationBase *dist_tria = dynamic_cast< - const parallel::Triangulation *>( + const parallel::TriangulationBase *>( &(dh.get_triangulation())); MPI_Comm communicator = dist_tria != nullptr ? dist_tria->get_communicator() : MPI_COMM_SELF; @@ -244,11 +244,11 @@ namespace internal const SparsityPatternType &sp, const DoFHandlerType & dh) { - const parallel::Triangulation + const parallel::TriangulationBase *dist_tria = dynamic_cast< - const parallel::Triangulation *>( + const parallel::TriangulationBase *>( &(dh.get_triangulation())); MPI_Comm communicator = dist_tria != nullptr ? dist_tria->get_communicator() : MPI_COMM_SELF; diff --git a/include/deal.II/multigrid/mg_transfer.templates.h b/include/deal.II/multigrid/mg_transfer.templates.h index e4b9f04913..62ca7118df 100644 --- a/include/deal.II/multigrid/mg_transfer.templates.h +++ b/include/deal.II/multigrid/mg_transfer.templates.h @@ -117,8 +117,8 @@ namespace internal const std::vector &, MGLevelObject &v) { - const dealii::parallel::Triangulation *tria = - (dynamic_cast *>( + const dealii::parallel::TriangulationBase *tria = + (dynamic_cast *>( &mg_dof.get_triangulation())); AssertThrow( tria != nullptr, @@ -145,8 +145,8 @@ namespace internal const std::vector &, MGLevelObject &v) { - const dealii::parallel::Triangulation *tria = - (dynamic_cast *>( + const dealii::parallel::TriangulationBase *tria = + (dynamic_cast *>( &mg_dof.get_triangulation())); AssertThrow( tria != nullptr, @@ -444,8 +444,8 @@ MGLevelGlobalTransfer>::copy_to_mg( dst[level].reinit(ghosted_level_vector[level], false); else { - const parallel::Triangulation *tria = - (dynamic_cast *>( + const parallel::TriangulationBase *tria = + (dynamic_cast *>( &mg_dof_handler.get_triangulation())); dst[level].reinit(mg_dof_handler.locally_owned_mg_dofs(level), tria != nullptr ? tria->get_communicator() : diff --git a/include/deal.II/multigrid/mg_transfer_matrix_free.h b/include/deal.II/multigrid/mg_transfer_matrix_free.h index f27c9cb6cb..111ca464bf 100644 --- a/include/deal.II/multigrid/mg_transfer_matrix_free.h +++ b/include/deal.II/multigrid/mg_transfer_matrix_free.h @@ -482,8 +482,8 @@ MGTransferMatrixFree::interpolate_to_mg( ExcDimensionMismatch( max_level, dof_handler.get_triangulation().n_global_levels() - 1)); - const parallel::Triangulation *p_tria = - (dynamic_cast *>( + const parallel::TriangulationBase *p_tria = + (dynamic_cast *>( &dof_handler.get_triangulation())); MPI_Comm mpi_communicator = p_tria != nullptr ? p_tria->get_communicator() : MPI_COMM_SELF; @@ -607,13 +607,14 @@ MGTransferBlockMatrixFree::copy_to_mg( // dst == defect level block vector. At first run this vector is not // initialized. Do this below: { - const parallel::Triangulation *tria = - (dynamic_cast *>( + const parallel::TriangulationBase *tria = + (dynamic_cast *>( &(mg_dof[0]->get_triangulation()))); for (unsigned int i = 1; i < n_blocks; ++i) - AssertThrow((dynamic_cast *>( - &(mg_dof[0]->get_triangulation())) == tria), - ExcMessage("The DoFHandler use different Triangulations!")); + AssertThrow( + (dynamic_cast *>( + &(mg_dof[0]->get_triangulation())) == tria), + ExcMessage("The DoFHandler use different Triangulations!")); MGLevelObject do_reinit; do_reinit.resize(min_level, max_level); diff --git a/include/deal.II/numerics/vector_tools.h b/include/deal.II/numerics/vector_tools.h index 8767265fec..d80de5d4ef 100644 --- a/include/deal.II/numerics/vector_tools.h +++ b/include/deal.II/numerics/vector_tools.h @@ -2580,7 +2580,7 @@ namespace VectorTools * VectorTools::integrate_difference() and you normally want to supply the * same value for @p norm as you used in VectorTools::integrate_difference(). * - * If the given Triangulation is a parallel::Triangulation, entries + * If the given Triangulation is a parallel::TriangulationBase, entries * in @p cellwise_error that do not correspond to locally owned cells are * assumed to be 0.0 and a parallel reduction using MPI is done to compute * the global error. diff --git a/include/deal.II/numerics/vector_tools.templates.h b/include/deal.II/numerics/vector_tools.templates.h index fb16cd82e8..61a9b3588e 100644 --- a/include/deal.II/numerics/vector_tools.templates.h +++ b/include/deal.II/numerics/vector_tools.templates.h @@ -1462,7 +1462,7 @@ namespace VectorTools project_to_boundary_first); else { - Assert((dynamic_cast *>( + Assert((dynamic_cast *>( &(dof.get_triangulation())) == nullptr), ExcNotImplemented()); do_project(mapping, @@ -1823,9 +1823,10 @@ namespace VectorTools } else { - Assert((dynamic_cast *>( - &(dof.get_triangulation())) == nullptr), - ExcNotImplemented()); + Assert( + (dynamic_cast *>( + &(dof.get_triangulation())) == nullptr), + ExcNotImplemented()); internal::do_project(mapping, dof, constraints, @@ -1882,7 +1883,7 @@ namespace VectorTools const hp::QCollection &q_boundary, const bool project_to_boundary_first) { - Assert((dynamic_cast *>( + Assert((dynamic_cast *>( &(dof.get_triangulation())) == nullptr), ExcNotImplemented()); @@ -8440,8 +8441,9 @@ namespace VectorTools MPI_Comm comm = MPI_COMM_SELF; #ifdef DEAL_II_WITH_MPI - if (const parallel::Triangulation *ptria = - dynamic_cast *>(&tria)) + if (const parallel::TriangulationBase *ptria = + dynamic_cast *>( + &tria)) comm = ptria->get_communicator(); #endif @@ -9071,8 +9073,8 @@ namespace VectorTools #ifdef DEAL_II_WITH_MPI // if this was a distributed DoFHandler, we need to do the reduction // over the entire domain - if (const parallel::Triangulation *p_triangulation = - dynamic_cast *>( + if (const parallel::TriangulationBase *p_triangulation = + dynamic_cast *>( &dof.get_triangulation())) { // The type used to store the elements of the global vector may be a diff --git a/source/distributed/cell_weights.cc b/source/distributed/cell_weights.cc index 70797886f6..cbd8891be2 100644 --- a/source/distributed/cell_weights.cc +++ b/source/distributed/cell_weights.cc @@ -28,7 +28,7 @@ namespace parallel const hp::DoFHandler &dof_handler) : dof_handler(&dof_handler, typeid(*this).name()) { - triangulation = (dynamic_cast *>( + triangulation = (dynamic_cast *>( const_cast *>( &(this->dof_handler->get_triangulation())))); @@ -49,7 +49,7 @@ namespace parallel Assert( triangulation != nullptr, ExcMessage( - "parallel::CellWeights requires a parallel::Triangulation object.")); + "parallel::CellWeights requires a parallel::TriangulationBase object.")); } diff --git a/source/distributed/shared_tria.cc b/source/distributed/shared_tria.cc index 2cdb2040a9..b408716ac7 100644 --- a/source/distributed/shared_tria.cc +++ b/source/distributed/shared_tria.cc @@ -42,9 +42,9 @@ namespace parallel smooth_grid, const bool allow_artificial_cells, const Settings settings) - : dealii::parallel::Triangulation(mpi_communicator, - smooth_grid, - false) + : dealii::parallel::TriangulationBase(mpi_communicator, + smooth_grid, + false) , settings(settings) , allow_artificial_cells(allow_artificial_cells) { @@ -392,7 +392,7 @@ namespace parallel ExcMessage( "Cannot use this function on parallel::distributed::Triangulation.")); - dealii::parallel::Triangulation::copy_triangulation( + dealii::parallel::TriangulationBase::copy_triangulation( other_tria); partition(); this->update_number_cache(); @@ -404,10 +404,10 @@ namespace parallel void Triangulation::update_number_cache() { - parallel::Triangulation::update_number_cache(); + parallel::TriangulationBase::update_number_cache(); if (settings & construct_multigrid_hierarchy) - parallel::Triangulation::fill_level_ghost_owners(); + parallel::TriangulationBase::fill_level_ghost_owners(); } } // namespace shared } // namespace parallel diff --git a/source/distributed/tria.cc b/source/distributed/tria.cc index f9f267bb8d..590ec84593 100644 --- a/source/distributed/tria.cc +++ b/source/distributed/tria.cc @@ -2127,7 +2127,7 @@ namespace parallel : // Do not check for distorted cells. // For multigrid, we need limit_level_difference_at_vertices // to make sure the transfer operators only need to consider two levels. - dealii::parallel::Triangulation( + dealii::parallel::TriangulationBase( mpi_communicator, (settings_ & construct_multigrid_hierarchy) ? static_cast< @@ -2880,10 +2880,10 @@ namespace parallel void Triangulation::update_number_cache() { - parallel::Triangulation::update_number_cache(); + parallel::TriangulationBase::update_number_cache(); if (settings & construct_multigrid_hierarchy) - parallel::Triangulation::fill_level_ghost_owners(); + parallel::TriangulationBase::fill_level_ghost_owners(); } @@ -4725,8 +4725,8 @@ namespace parallel Triangulation::memory_consumption() const { std::size_t mem = - this->dealii::parallel::Triangulation::memory_consumption() + + this->dealii::parallel::TriangulationBase:: + memory_consumption() + MemoryConsumption::memory_consumption(triangulation_has_content) + MemoryConsumption::memory_consumption(connectivity) + MemoryConsumption::memory_consumption(parallel_forest) + @@ -4767,8 +4767,8 @@ namespace parallel { try { - dealii::parallel::Triangulation::copy_triangulation( - other_tria); + dealii::parallel::TriangulationBase:: + copy_triangulation(other_tria); } catch ( const typename dealii::Triangulation::DistortedCellList @@ -4947,9 +4947,9 @@ namespace parallel const typename dealii::Triangulation<1, spacedim>::MeshSmoothing smooth_grid, const Settings /*settings*/) - : dealii::parallel::Triangulation<1, spacedim>(mpi_communicator, - smooth_grid, - false) + : dealii::parallel::TriangulationBase<1, spacedim>(mpi_communicator, + smooth_grid, + false) { Assert(false, ExcNotImplemented()); } diff --git a/source/distributed/tria_base.cc b/source/distributed/tria_base.cc index 587b32e261..1fd06d8820 100644 --- a/source/distributed/tria_base.cc +++ b/source/distributed/tria_base.cc @@ -40,7 +40,7 @@ DEAL_II_NAMESPACE_OPEN namespace parallel { template - Triangulation::Triangulation( + TriangulationBase::TriangulationBase( MPI_Comm mpi_communicator, const typename dealii::Triangulation::MeshSmoothing smooth_grid, @@ -54,7 +54,7 @@ namespace parallel #ifndef DEAL_II_WITH_MPI Assert(false, ExcMessage("You compiled deal.II without MPI support, for " - "which parallel::Triangulation is not available.")); + "which parallel::TriangulationBase is not available.")); #endif number_cache.n_locally_owned_active_cells.resize(n_subdomains); } @@ -63,20 +63,20 @@ namespace parallel template void - Triangulation::copy_triangulation( + TriangulationBase::copy_triangulation( const dealii::Triangulation &other_tria) { #ifndef DEAL_II_WITH_MPI (void)other_tria; Assert(false, ExcMessage("You compiled deal.II without MPI support, for " - "which parallel::Triangulation is not available.")); + "which parallel::TriangulationBase is not available.")); #else dealii::Triangulation::copy_triangulation(other_tria); - if (const dealii::parallel::Triangulation *other_tria_x = - dynamic_cast *>( - &other_tria)) + if (const dealii::parallel::TriangulationBase *other_tria_x = + dynamic_cast + *>(&other_tria)) { mpi_communicator = other_tria_x->get_communicator(); @@ -92,7 +92,7 @@ namespace parallel template std::size_t - Triangulation::memory_consumption() const + TriangulationBase::memory_consumption() const { std::size_t mem = this->dealii::Triangulation::memory_consumption() + @@ -107,7 +107,7 @@ namespace parallel } template - Triangulation::~Triangulation() + TriangulationBase::~TriangulationBase() { // release unused vector memory because the vector layout is going to look // very different now @@ -116,35 +116,35 @@ namespace parallel } template - Triangulation::NumberCache::NumberCache() + TriangulationBase::NumberCache::NumberCache() : n_global_active_cells(0) , n_global_levels(0) {} template unsigned int - Triangulation::n_locally_owned_active_cells() const + TriangulationBase::n_locally_owned_active_cells() const { return number_cache.n_locally_owned_active_cells[my_subdomain]; } template unsigned int - Triangulation::n_global_levels() const + TriangulationBase::n_global_levels() const { return number_cache.n_global_levels; } template types::global_dof_index - Triangulation::n_global_active_cells() const + TriangulationBase::n_global_active_cells() const { return number_cache.n_global_active_cells; } template const std::vector & - Triangulation::n_locally_owned_active_cells_per_processor() + TriangulationBase::n_locally_owned_active_cells_per_processor() const { return number_cache.n_locally_owned_active_cells; @@ -152,7 +152,7 @@ namespace parallel template MPI_Comm - Triangulation::get_communicator() const + TriangulationBase::get_communicator() const { return mpi_communicator; } @@ -160,7 +160,7 @@ namespace parallel #ifdef DEAL_II_WITH_MPI template void - Triangulation::update_number_cache() + TriangulationBase::update_number_cache() { Assert(number_cache.n_locally_owned_active_cells.size() == Utilities::MPI::n_mpi_processes(this->mpi_communicator), @@ -233,7 +233,7 @@ namespace parallel template void - Triangulation::fill_level_ghost_owners() + TriangulationBase::fill_level_ghost_owners() { number_cache.level_ghost_owners.clear(); @@ -316,14 +316,14 @@ namespace parallel template void - Triangulation::update_number_cache() + TriangulationBase::update_number_cache() { Assert(false, ExcNotImplemented()); } template void - Triangulation::fill_level_ghost_owners() + TriangulationBase::fill_level_ghost_owners() { Assert(false, ExcNotImplemented()); } @@ -332,7 +332,7 @@ namespace parallel template types::subdomain_id - Triangulation::locally_owned_subdomain() const + TriangulationBase::locally_owned_subdomain() const { return my_subdomain; } @@ -341,7 +341,7 @@ namespace parallel template const std::set & - Triangulation::ghost_owners() const + TriangulationBase::ghost_owners() const { return number_cache.ghost_owners; } @@ -350,7 +350,7 @@ namespace parallel template const std::set & - Triangulation::level_ghost_owners() const + TriangulationBase::level_ghost_owners() const { return number_cache.level_ghost_owners; } @@ -359,7 +359,8 @@ namespace parallel template std::map> - Triangulation::compute_vertices_with_ghost_neighbors() const + TriangulationBase::compute_vertices_with_ghost_neighbors() + const { // TODO: we are not treating periodic neighbors correctly here. If we do // we can remove the overriding implementation for p::d::Triangulation diff --git a/source/distributed/tria_base.inst.in b/source/distributed/tria_base.inst.in index af043c2d71..3a6096f7ec 100644 --- a/source/distributed/tria_base.inst.in +++ b/source/distributed/tria_base.inst.in @@ -19,12 +19,14 @@ for (deal_II_dimension : DIMENSIONS) { namespace parallel \{ - template class Triangulation; + template class TriangulationBase; #if deal_II_dimension < 3 - template class Triangulation; + template class TriangulationBase; #endif #if deal_II_dimension < 2 - template class Triangulation; + template class TriangulationBase; #endif \} } diff --git a/source/dofs/dof_handler_policy.cc b/source/dofs/dof_handler_policy.cc index 08b99293b5..c5ab117f6a 100644 --- a/source/dofs/dof_handler_policy.cc +++ b/source/dofs/dof_handler_policy.cc @@ -5757,8 +5757,8 @@ namespace internal constexpr int dim = DoFHandlerType::dimension; constexpr int spacedim = DoFHandlerType::space_dimension; - const parallel::Triangulation *tr = - (dynamic_cast *>( + const parallel::TriangulationBase *tr = + (dynamic_cast *>( &this->dof_handler->get_triangulation())); Assert(tr != nullptr, ExcInternalError()); diff --git a/source/dofs/dof_renumbering.cc b/source/dofs/dof_renumbering.cc index 9e22ce347f..116488bd52 100644 --- a/source/dofs/dof_renumbering.cc +++ b/source/dofs/dof_renumbering.cc @@ -867,8 +867,8 @@ namespace DoFRenumbering const unsigned int n_buckets = fe_collection.n_components(); std::vector shifts(n_buckets); - if (const parallel::Triangulation *tria = - (dynamic_cast *>( + if (const parallel::TriangulationBase *tria = + (dynamic_cast *>( &start->get_dof_handler().get_triangulation()))) { #ifdef DEAL_II_WITH_MPI @@ -1170,8 +1170,8 @@ namespace DoFRenumbering const unsigned int n_buckets = fe_collection.n_blocks(); std::vector shifts(n_buckets); - if (const parallel::Triangulation *tria = - (dynamic_cast *>( + if (const parallel::TriangulationBase *tria = + (dynamic_cast *>( &start->get_dof_handler().get_triangulation()))) { #ifdef DEAL_II_WITH_MPI @@ -1368,8 +1368,8 @@ namespace DoFRenumbering // DoFs for all previous processes types::global_dof_index my_starting_index = 0; - if (const parallel::Triangulation *tria = - dynamic_cast *>( + if (const parallel::TriangulationBase *tria = + dynamic_cast *>( &dof_handler.get_triangulation())) { #ifdef DEAL_II_WITH_MPI @@ -1586,12 +1586,11 @@ namespace DoFRenumbering const typename std::vector &cells) { - if (const parallel::Triangulation *p = - dynamic_cast< - const parallel::Triangulation *>( - &dof.get_triangulation())) + if (const parallel::TriangulationBase *p = + dynamic_cast *>(&dof.get_triangulation())) { AssertDimension(cells.size(), p->n_locally_owned_active_cells()); } @@ -1753,11 +1752,12 @@ namespace DoFRenumbering const Tensor<1, DoFHandlerType::space_dimension> &direction, const bool dof_wise_renumbering) { - Assert((dynamic_cast< - const parallel::Triangulation *>( - &dof.get_triangulation()) == nullptr), - ExcNotImplemented()); + Assert( + (dynamic_cast< + const parallel::TriangulationBase *>( + &dof.get_triangulation()) == nullptr), + ExcNotImplemented()); if (dof_wise_renumbering == false) { @@ -2198,8 +2198,8 @@ namespace DoFRenumbering { Assert( (!dynamic_cast< - const parallel::Triangulation *>( + const parallel::TriangulationBase *>( &dof_handler.get_triangulation())), ExcMessage( "Parallel triangulations are already enumerated according to their MPI process id.")); diff --git a/source/dofs/dof_tools.cc b/source/dofs/dof_tools.cc index 0f241f3ff4..a492783d77 100644 --- a/source/dofs/dof_tools.cc +++ b/source/dofs/dof_tools.cc @@ -1307,9 +1307,9 @@ namespace DoFTools // collect information for each subdomain index anyway, not just for the // used one.) const unsigned int n_subdomains = - (dynamic_cast< - const parallel::Triangulation *>( + (dynamic_cast *>( &dof_handler.get_triangulation()) == nullptr ? [&dof_handler]() { unsigned int max_subdomain_id = 0; @@ -1319,9 +1319,9 @@ namespace DoFTools return max_subdomain_id + 1; }() : Utilities::MPI::n_mpi_processes( - dynamic_cast< - const parallel::Triangulation *>( + dynamic_cast *>( &dof_handler.get_triangulation()) ->get_communicator())); Assert(n_subdomains > *std::max_element(subdomain_association.begin(), @@ -1870,8 +1870,8 @@ namespace DoFTools const unsigned int dim = DoFHandlerType::dimension; const unsigned int spacedim = DoFHandlerType::space_dimension; - if (const parallel::Triangulation *tria = - (dynamic_cast *>( + if (const parallel::TriangulationBase *tria = + (dynamic_cast *>( &dof_handler.get_triangulation()))) { std::vector local_dof_count = @@ -1955,9 +1955,9 @@ namespace DoFTools #ifdef DEAL_II_WITH_MPI // if we are working on a parallel mesh, we now need to collect // this information from all processors - if (const parallel::Triangulation - *tria = (dynamic_cast + *tria = (dynamic_cast *>( &dof_handler.get_triangulation()))) diff --git a/source/dofs/dof_tools_constraints.cc b/source/dofs/dof_tools_constraints.cc index 3a9e3f65b4..c4a250a428 100644 --- a/source/dofs/dof_tools_constraints.cc +++ b/source/dofs/dof_tools_constraints.cc @@ -2788,9 +2788,10 @@ namespace DoFTools MPI_Comm communicator = MPI_COMM_SELF; try { - const typename dealii::parallel::Triangulation + const typename dealii::parallel::TriangulationBase &tria = dynamic_cast &>( + TriangulationBase &>( coarse_to_fine_grid_map.get_destination_grid() .get_triangulation()); communicator = tria.get_communicator(); diff --git a/source/dofs/dof_tools_sparsity.cc b/source/dofs/dof_tools_sparsity.cc index 2eae88e68b..f813fce477 100644 --- a/source/dofs/dof_tools_sparsity.cc +++ b/source/dofs/dof_tools_sparsity.cc @@ -232,9 +232,9 @@ namespace DoFTools // and dofs on a cell owned by a different processor. constexpr int dim = DoFHandlerType::dimension; constexpr int spacedim = DoFHandlerType::space_dimension; - if (dynamic_cast *>( + if (dynamic_cast *>( &dof_row.get_triangulation()) != nullptr || - dynamic_cast *>( + dynamic_cast *>( &dof_col.get_triangulation()) != nullptr) { Assert(&dof_row.get_triangulation() == &dof_col.get_triangulation(), diff --git a/source/grid/grid_out.cc b/source/grid/grid_out.cc index ec08f50cc9..696acc4e97 100644 --- a/source/grid/grid_out.cc +++ b/source/grid/grid_out.cc @@ -3283,8 +3283,8 @@ GridOut::write_mesh_per_processor_as_vtu( // if not, just create a .vtu file with no reference // to the processor number std::string new_file = filename_without_extension + ".vtu"; - if (const parallel::Triangulation *tr = - dynamic_cast *>(&tria)) + if (const parallel::TriangulationBase *tr = + dynamic_cast *>(&tria)) { new_file = filename_without_extension + ".proc" + Utilities::int_to_string(tr->locally_owned_subdomain(), 4) + diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index d0890f014d..9b2f8197bd 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -173,8 +173,8 @@ namespace GridTools double global_volume = 0; #ifdef DEAL_II_WITH_MPI - if (const parallel::Triangulation *p_tria = - dynamic_cast *>( + if (const parallel::TriangulationBase *p_tria = + dynamic_cast *>( &triangulation)) global_volume = Utilities::MPI::sum(local_volume, p_tria->get_communicator()); @@ -3129,8 +3129,8 @@ namespace GridTools double global_min_diameter = 0; #ifdef DEAL_II_WITH_MPI - if (const parallel::Triangulation *p_tria = - dynamic_cast *>( + if (const parallel::TriangulationBase *p_tria = + dynamic_cast *>( &triangulation)) global_min_diameter = Utilities::MPI::min(min_diameter, p_tria->get_communicator()); @@ -3156,8 +3156,8 @@ namespace GridTools double global_max_diameter = 0; #ifdef DEAL_II_WITH_MPI - if (const parallel::Triangulation *p_tria = - dynamic_cast *>( + if (const parallel::TriangulationBase *p_tria = + dynamic_cast *>( &triangulation)) global_max_diameter = Utilities::MPI::max(max_diameter, p_tria->get_communicator()); @@ -5087,7 +5087,7 @@ namespace GridTools #else // Recovering the mpi communicator used to create the triangulation const auto &tria_mpi = - dynamic_cast *>( + dynamic_cast *>( &cache.get_triangulation()); // If the dynamic cast failed we can't recover the mpi communicator: // throwing an assertion error diff --git a/source/grid/grid_tools_cache.cc b/source/grid/grid_tools_cache.cc index 048489b1bc..938ca9d725 100644 --- a/source/grid/grid_tools_cache.cc +++ b/source/grid/grid_tools_cache.cc @@ -183,7 +183,7 @@ namespace GridTools std::vector> bbox_v(1, bbox); if (const auto tria_mpi = - dynamic_cast *>( + dynamic_cast *>( &(*tria))) { covering_rtree = GridTools::build_global_description_tree( diff --git a/source/hp/dof_handler.cc b/source/hp/dof_handler.cc index 8c04804bba..c4b84a7b47 100644 --- a/source/hp/dof_handler.cc +++ b/source/hp/dof_handler.cc @@ -1069,10 +1069,11 @@ namespace internal else { // a sequential triangulation. there is nothing we need to do here - Assert((dynamic_cast< - const dealii::parallel::Triangulation *>( - &dof_handler.get_triangulation()) == nullptr), - ExcInternalError()); + Assert( + (dynamic_cast< + const dealii::parallel::TriangulationBase *>( + &dof_handler.get_triangulation()) == nullptr), + ExcInternalError()); } } diff --git a/source/hp/refinement.cc b/source/hp/refinement.cc index bd2436d96c..ff30ad67cb 100644 --- a/source/hp/refinement.cc +++ b/source/hp/refinement.cc @@ -133,8 +133,8 @@ namespace hp } } - if (const parallel::Triangulation *parallel_tria = - dynamic_cast *>( + if (const parallel::TriangulationBase *parallel_tria = + dynamic_cast *>( &dof_handler.get_triangulation())) { max_smoothness_refine = diff --git a/source/multigrid/mg_level_global_transfer.cc b/source/multigrid/mg_level_global_transfer.cc index d0a36c9f88..5ac77d336d 100644 --- a/source/multigrid/mg_level_global_transfer.cc +++ b/source/multigrid/mg_level_global_transfer.cc @@ -83,8 +83,8 @@ MGLevelGlobalTransfer::fill_and_communicate_copy_indices( // now do a global reduction over all processors to see what operation // they can agree upon - if (const parallel::Triangulation *ptria = - dynamic_cast *>( + if (const parallel::TriangulationBase *ptria = + dynamic_cast *>( &mg_dof.get_triangulation())) perform_plain_copy = (Utilities::MPI::min(my_perform_plain_copy ? 1 : 0, ptria->get_communicator()) == 1); @@ -295,8 +295,8 @@ void MGLevelGlobalTransfer>:: fill_and_communicate_copy_indices(const DoFHandler &mg_dof) { - const parallel::Triangulation *ptria = - dynamic_cast *>( + const parallel::TriangulationBase *ptria = + dynamic_cast *>( &mg_dof.get_triangulation()); const MPI_Comm mpi_communicator = ptria != nullptr ? ptria->get_communicator() : MPI_COMM_SELF; diff --git a/source/multigrid/mg_tools.cc b/source/multigrid/mg_tools.cc index 4d3c8c04f2..f45b2f1c68 100644 --- a/source/multigrid/mg_tools.cc +++ b/source/multigrid/mg_tools.cc @@ -1653,8 +1653,9 @@ namespace MGTools unsigned int global_min = min_level; // If necessary, communicate to find minimum // level for an active cell over all subdomains - if (const parallel::Triangulation *tr = - dynamic_cast *>(&tria)) + if (const parallel::TriangulationBase *tr = + dynamic_cast *>( + &tria)) global_min = Utilities::MPI::min(min_level, tr->get_communicator()); AssertIndexRange(global_min, tria.n_global_levels()); @@ -1673,8 +1674,9 @@ namespace MGTools // It is only necessary to calculate the imbalance // on a distributed mesh. The imbalance is always // 1.0 for the serial case. - if (const parallel::Triangulation *tr = - dynamic_cast *>(&tria)) + if (const parallel::TriangulationBase *tr = + dynamic_cast *>( + &tria)) { const unsigned int n_proc = Utilities::MPI::n_mpi_processes(tr->get_communicator()); diff --git a/source/multigrid/mg_transfer_internal.cc b/source/multigrid/mg_transfer_internal.cc index 1edb807932..2bab12fc32 100644 --- a/source/multigrid/mg_transfer_internal.cc +++ b/source/multigrid/mg_transfer_internal.cc @@ -169,8 +169,8 @@ namespace internal } } - const dealii::parallel::Triangulation *tria = - (dynamic_cast *>( + const dealii::parallel::TriangulationBase *tria = + (dynamic_cast *>( &mg_dof.get_triangulation())); AssertThrow( send_data_temp.size() == 0 || tria != nullptr, @@ -856,8 +856,9 @@ namespace internal } // step 2.7: Initialize the ghosted vector - const parallel::Triangulation *ptria = - (dynamic_cast *>(&tria)); + const parallel::TriangulationBase *ptria = + (dynamic_cast *>( + &tria)); const MPI_Comm communicator = ptria != nullptr ? ptria->get_communicator() : MPI_COMM_SELF; diff --git a/source/multigrid/mg_transfer_prebuilt.cc b/source/multigrid/mg_transfer_prebuilt.cc index 3649998289..a65380efff 100644 --- a/source/multigrid/mg_transfer_prebuilt.cc +++ b/source/multigrid/mg_transfer_prebuilt.cc @@ -273,8 +273,8 @@ MGTransferPrebuilt::build_matrices( // be manually distributed. // Retrieve communicator from triangulation if it is parallel - const parallel::Triangulation *dist_tria = - dynamic_cast *>( + const parallel::TriangulationBase *dist_tria = + dynamic_cast *>( &(mg_dof.get_triangulation())); MPI_Comm communicator = dist_tria != nullptr ? diff --git a/source/non_matching/coupling.cc b/source/non_matching/coupling.cc index 5bc44873f0..467528a81a 100644 --- a/source/non_matching/coupling.cc +++ b/source/non_matching/coupling.cc @@ -184,7 +184,7 @@ namespace NonMatching ExcNotImplemented()); const bool tria_is_parallel = - (dynamic_cast *>( + (dynamic_cast *>( &space_dh.get_triangulation()) != nullptr); const auto &space_fe = space_dh.get_fe(); const auto &immersed_fe = immersed_dh.get_fe(); @@ -367,7 +367,7 @@ namespace NonMatching ExcNotImplemented()); const bool tria_is_parallel = - (dynamic_cast *>( + (dynamic_cast *>( &space_dh.get_triangulation()) != nullptr); const auto &space_fe = space_dh.get_fe();