From: Peter Munch Date: Thu, 25 Jun 2020 06:12:50 +0000 (+0200) Subject: Remove DoFHandlerType from multigrid/mg_transfer.h X-Git-Tag: v9.3.0-rc1~1374^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10599%2Fhead;p=dealii.git Remove DoFHandlerType from multigrid/mg_transfer.h --- 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