From ccaa86d4acd329045d73a26a01d5262fb59e0d4f Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Thu, 25 Jun 2020 08:12:50 +0200 Subject: [PATCH] Remove DoFHandlerType from multigrid/mg_transfer.h --- include/deal.II/multigrid/mg_transfer.h | 93 ++++++++++++------------- 1 file changed, 44 insertions(+), 49 deletions(-) diff --git a/include/deal.II/multigrid/mg_transfer.h b/include/deal.II/multigrid/mg_transfer.h index f7b6043004..370a3c156e 100644 --- a/include/deal.II/multigrid/mg_transfer.h +++ b/include/deal.II/multigrid/mg_transfer.h @@ -53,13 +53,13 @@ namespace internal static const bool requires_distributed_sparsity_pattern = false; - template + template static void reinit(Matrix & matrix, Sparsity & sparsity, int level, const SparsityPatternType &sp, - const DoFHandlerType &) + const DoFHandler &) { sparsity.copy_from(sp); (void)level; @@ -76,19 +76,18 @@ namespace internal static const bool requires_distributed_sparsity_pattern = false; - template + template static void reinit(Matrix &matrix, Sparsity &, - int level, - const SparsityPatternType &sp, - DoFHandlerType & dh) + int level, + const SparsityPatternType & sp, + const DoFHandler &dh) { - const dealii::parallel::TriangulationBase - *dist_tria = dynamic_cast *>(&(dh.get_triangulation())); + const dealii::parallel::TriangulationBase *dist_tria = + dynamic_cast< + const dealii::parallel::TriangulationBase *>( + &(dh.get_triangulation())); MPI_Comm communicator = dist_tria != nullptr ? dist_tria->get_communicator() : MPI_COMM_SELF; @@ -108,19 +107,18 @@ namespace internal static const bool requires_distributed_sparsity_pattern = false; - template + template static void reinit(Matrix &matrix, Sparsity &, - int level, - const SparsityPatternType &sp, - DoFHandlerType & dh) + int level, + const SparsityPatternType & sp, + const DoFHandler &dh) { - const dealii::parallel::TriangulationBase - *dist_tria = dynamic_cast *>(&(dh.get_triangulation())); + const dealii::parallel::TriangulationBase *dist_tria = + dynamic_cast< + const dealii::parallel::TriangulationBase *>( + &(dh.get_triangulation())); MPI_Comm communicator = dist_tria != nullptr ? dist_tria->get_communicator() : MPI_COMM_SELF; matrix.reinit(dh.locally_owned_mg_dofs(level + 1), @@ -141,19 +139,18 @@ namespace internal static const bool requires_distributed_sparsity_pattern = false; - template + template static void reinit(Matrix &matrix, Sparsity &, - int level, - const SparsityPatternType &sp, - DoFHandlerType & dh) + int level, + const SparsityPatternType & sp, + const DoFHandler &dh) { - const dealii::parallel::TriangulationBase - *dist_tria = dynamic_cast *>(&(dh.get_triangulation())); + const dealii::parallel::TriangulationBase *dist_tria = + dynamic_cast< + const dealii::parallel::TriangulationBase *>( + &(dh.get_triangulation())); MPI_Comm communicator = dist_tria != nullptr ? dist_tria->get_communicator() : MPI_COMM_SELF; matrix.reinit(dh.locally_owned_mg_dofs(level + 1), @@ -173,19 +170,18 @@ namespace internal static const bool requires_distributed_sparsity_pattern = false; - template + template static void reinit(Matrix &matrix, Sparsity &, - int level, - const SparsityPatternType &sp, - DoFHandlerType & dh) + int level, + const SparsityPatternType & sp, + const DoFHandler &dh) { - const dealii::parallel::TriangulationBase - *dist_tria = dynamic_cast *>(&(dh.get_triangulation())); + const dealii::parallel::TriangulationBase *dist_tria = + dynamic_cast< + const dealii::parallel::TriangulationBase *>( + &(dh.get_triangulation())); MPI_Comm communicator = dist_tria != nullptr ? dist_tria->get_communicator() : MPI_COMM_SELF; matrix.reinit(dh.locally_owned_mg_dofs(level + 1), @@ -207,13 +203,13 @@ namespace internal static const bool requires_distributed_sparsity_pattern = false; - template + template static void reinit(Matrix &, Sparsity &, int, const SparsityPatternType &, - const DoFHandlerType &) + const DoFHandler &) { AssertThrow( false, @@ -234,19 +230,18 @@ namespace internal static const bool requires_distributed_sparsity_pattern = true; - template + template static void reinit(Matrix &matrix, Sparsity &, - int level, - const SparsityPatternType &sp, - const DoFHandlerType & dh) + int level, + const SparsityPatternType & sp, + const DoFHandler &dh) { - const dealii::parallel::TriangulationBase - *dist_tria = dynamic_cast *>(&(dh.get_triangulation())); + const dealii::parallel::TriangulationBase *dist_tria = + dynamic_cast< + const dealii::parallel::TriangulationBase *>( + &(dh.get_triangulation())); MPI_Comm communicator = dist_tria != nullptr ? dist_tria->get_communicator() : MPI_COMM_SELF; // Reinit PETSc matrix -- 2.39.5