From 892847248bf518b53554da0f171ca4cc078312b5 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Tue, 1 Jun 2021 13:30:53 -0400 Subject: [PATCH] Remove deprecated multigrid transfer build_matrices() functions --- .../incompatibilities/20210601DanielArndt-1 | 4 ++ include/deal.II/multigrid/mg_transfer.h | 9 --- include/deal.II/multigrid/mg_transfer_block.h | 47 --------------- .../deal.II/multigrid/mg_transfer_component.h | 58 ------------------- source/multigrid/mg_transfer_block.cc | 33 ----------- source/multigrid/mg_transfer_block.inst.in | 24 -------- source/multigrid/mg_transfer_component.cc | 27 --------- .../multigrid/mg_transfer_component.inst.in | 20 ------- source/multigrid/mg_transfer_prebuilt.cc | 11 ---- source/multigrid/mg_transfer_prebuilt.inst.in | 3 - tests/multigrid/mg_data_out_03.cc | 2 +- 11 files changed, 5 insertions(+), 233 deletions(-) create mode 100644 doc/news/changes/incompatibilities/20210601DanielArndt-1 diff --git a/doc/news/changes/incompatibilities/20210601DanielArndt-1 b/doc/news/changes/incompatibilities/20210601DanielArndt-1 new file mode 100644 index 0000000000..2a674106e4 --- /dev/null +++ b/doc/news/changes/incompatibilities/20210601DanielArndt-1 @@ -0,0 +1,4 @@ +Removed: The deprecated build_matrices() member functions +in various multigrid transfer classes have been removed. +
+(Daniel Arndt, 2021/06/01) diff --git a/include/deal.II/multigrid/mg_transfer.h b/include/deal.II/multigrid/mg_transfer.h index 05c3045df4..b20acc46aa 100644 --- a/include/deal.II/multigrid/mg_transfer.h +++ b/include/deal.II/multigrid/mg_transfer.h @@ -673,15 +673,6 @@ public: void build(const DoFHandler &dof_handler); - /** - * Actually build the prolongation matrices for each level. - * - * @deprecated use build() instead. - */ - template - DEAL_II_DEPRECATED void - build_matrices(const DoFHandler &dof_handler); - /** * Prolongate a vector from level to_level-1 to level * to_level using the embedding matrices of the underlying finite diff --git a/include/deal.II/multigrid/mg_transfer_block.h b/include/deal.II/multigrid/mg_transfer_block.h index f66473a736..9a3e60b583 100644 --- a/include/deal.II/multigrid/mg_transfer_block.h +++ b/include/deal.II/multigrid/mg_transfer_block.h @@ -89,20 +89,6 @@ protected: void build(const DoFHandler &dof_handler); - /** - * Actually build the prolongation matrices for each level. - * - * This function is only called by derived classes. These can also set the - * member variables #selected and others to restrict the transfer matrices - * to certain blocks. - * - * @deprecated Use build() instead. - */ - template - DEAL_II_DEPRECATED void - build_matrices(const DoFHandler &dof, - const DoFHandler &mg_dof); - /** * Flag of selected blocks. * @@ -227,20 +213,6 @@ public: build(const DoFHandler &dof_handler, const std::vector & selected); - /** - * Build the prolongation matrices for each level. - * - * This function is a front-end for the same function in - * MGTransferBlockBase. - * - * @deprecated Use the build() function instead. - */ - template - DEAL_II_DEPRECATED void - build_matrices(const DoFHandler &dof, - const DoFHandler &mg_dof, - const std::vector & selected); - virtual void prolongate(const unsigned int to_level, BlockVector & dst, @@ -355,25 +327,6 @@ public: void build(const DoFHandler &dof_handler, unsigned int selected); - /** - * Actually build the prolongation matrices for grouped blocks. - * - * This function is a front-end for the same function in - * MGTransferBlockBase. - * - * @param dof The DoFHandler for the active degrees of freedom to use. - * @param mg_dof The DoFHandler for the level degrees of freedom to use. - * @param selected Number of the block of the global vector to be copied from - * and to the multilevel vector. - * - * @deprecated Use build() instead. - */ - template - DEAL_II_DEPRECATED void - build_matrices(const DoFHandler &dof, - const DoFHandler &mg_dof, - unsigned int selected); - /** * Change selected block. Handle with care! */ diff --git a/include/deal.II/multigrid/mg_transfer_component.h b/include/deal.II/multigrid/mg_transfer_component.h index 424d4848ab..091b9944d9 100644 --- a/include/deal.II/multigrid/mg_transfer_component.h +++ b/include/deal.II/multigrid/mg_transfer_component.h @@ -83,23 +83,6 @@ protected: void build(const DoFHandler &dof_handler); - /** - * Actually build the prolongation matrices for each level. - * - * This function is only called by derived classes. These can also set the - * member variables selected_component and - * mg_selected_component member variables to restrict the - * transfer matrices to certain components. Furthermore, they use - * target_component and mg_target_component for - * re-ordering and grouping of components. - * - * @deprecated Use build() instead. - */ - template - DEAL_II_DEPRECATED void - build_matrices(const DoFHandler &dof, - const DoFHandler &mg_dof); - /** * Flag of selected components. * @@ -208,47 +191,6 @@ public: virtual ~MGTransferSelect() override = default; // TODO: rewrite docs; make sure defaulted args are actually allowed - /** - * Actually build the prolongation matrices for grouped components. - * - * This function is a front-end for the same function in - * MGTransferComponentBase. - * - * @arg selected: Number of the block of the global vector to be copied from - * and to the multilevel vector. This number refers to the renumbering by - * target_component. - * - * @arg mg_selected: Number of the block for which the transfer matrices - * should be built. - * - * If mg_target_component is present, this refers to the renumbered - * components. - * - * @arg target_component: this argument allows grouping and renumbering of - * components in the fine-level vector (see DoFRenumbering::component_wise). - * - * @arg mg_target_component: this argument allows grouping and renumbering - * of components in the level vectors (see DoFRenumbering::component_wise). - * It also affects the behavior of the selected argument - * - * @arg boundary_indices: holds the boundary indices on each level. - * - * @deprecated Use build() instead. - */ - template - DEAL_II_DEPRECATED void - build_matrices( - const DoFHandler &dof, - const DoFHandler &mg_dof, - unsigned int selected, - unsigned int mg_selected, - const std::vector &target_component = - std::vector(), - const std::vector &mg_target_component = - std::vector(), - const std::vector> &boundary_indices = - std::vector>()); - /** * Actually build the prolongation matrices for grouped components. * diff --git a/source/multigrid/mg_transfer_block.cc b/source/multigrid/mg_transfer_block.cc index 9294c91a5e..ba62ef55c0 100644 --- a/source/multigrid/mg_transfer_block.cc +++ b/source/multigrid/mg_transfer_block.cc @@ -202,17 +202,6 @@ MGTransferBlock::copy_to_mg( -template -void -MGTransferBlockBase::build_matrices( - const DoFHandler & /*dof*/, - const DoFHandler &mg_dof_handler) -{ - build(mg_dof_handler); -} - - - template void MGTransferBlockBase::build(const DoFHandler &dof_handler) @@ -477,17 +466,6 @@ MGTransferBlockBase::build(const DoFHandler &dof_handler) } } -template -template -void -MGTransferBlockSelect::build_matrices( - const DoFHandler & /*dof*/, - const DoFHandler &mg_dof, - unsigned int select) -{ - build(mg_dof, select); -} - template template void @@ -576,17 +554,6 @@ MGTransferBlockSelect::build( } -template -template -void -MGTransferBlock::build_matrices( - const DoFHandler & /*dof*/, - const DoFHandler &mg_dof, - const std::vector & sel) -{ - build(mg_dof, sel); -} - template template void diff --git a/source/multigrid/mg_transfer_block.inst.in b/source/multigrid/mg_transfer_block.inst.in index 920d11027e..036408959f 100644 --- a/source/multigrid/mg_transfer_block.inst.in +++ b/source/multigrid/mg_transfer_block.inst.in @@ -29,30 +29,6 @@ for (deal_II_dimension : DIMENSIONS) template void MGTransferBlockSelect::build( const DoFHandler &, const unsigned int); - // deprecated: - template void MGTransferBlock::build_matrices( - const DoFHandler &, - const DoFHandler &, - const std::vector &); - - // deprecated: - template void MGTransferBlock::build_matrices( - const DoFHandler &, - const DoFHandler &, - const std::vector &); - - // deprecated: - template void MGTransferBlockSelect::build_matrices< - deal_II_dimension>(const DoFHandler &, - const DoFHandler &, - const unsigned int); - - // deprecated: - template void MGTransferBlockSelect::build_matrices< - deal_II_dimension>(const DoFHandler &, - const DoFHandler &, - const unsigned int); - template void MGTransferBlock::copy_to_mg( const DoFHandler &, MGLevelObject> &, diff --git a/source/multigrid/mg_transfer_component.cc b/source/multigrid/mg_transfer_component.cc index b4f87eff70..74c1a0caa8 100644 --- a/source/multigrid/mg_transfer_component.cc +++ b/source/multigrid/mg_transfer_component.cc @@ -252,16 +252,6 @@ MGTransferSelect::do_copy_to_mg( -template -void -MGTransferComponentBase::build_matrices(const DoFHandler &, - const DoFHandler &mg_dof) -{ - build(mg_dof); -} - - - template void MGTransferComponentBase::build(const DoFHandler &mg_dof) @@ -568,23 +558,6 @@ MGTransferComponentBase::build(const DoFHandler &mg_dof) -template -template -void -MGTransferSelect::build_matrices( - const DoFHandler & /*dof*/, - const DoFHandler & mg_dof, - unsigned int select, - unsigned int mg_select, - const std::vector & t_component, - const std::vector & mg_t_component, - const std::vector> &bdry_indices) -{ - build(mg_dof, select, mg_select, t_component, mg_t_component, bdry_indices); -} - - - template template void diff --git a/source/multigrid/mg_transfer_component.inst.in b/source/multigrid/mg_transfer_component.inst.in index 129872a8ca..1f434b621e 100644 --- a/source/multigrid/mg_transfer_component.inst.in +++ b/source/multigrid/mg_transfer_component.inst.in @@ -33,26 +33,6 @@ for (deal_II_dimension : DIMENSIONS) const std::vector &, const std::vector> &); - // deprecated: - template void MGTransferSelect::build_matrices( - const DoFHandler &d, - const DoFHandler &, - unsigned int, - unsigned int, - const std::vector &, - const std::vector &, - const std::vector> &); - - // deprecated: - template void MGTransferSelect::build_matrices( - const DoFHandler &d, - const DoFHandler &, - unsigned int, - unsigned int, - const std::vector &, - const std::vector &, - const std::vector> &); - template void MGTransferSelect::copy_to_mg( const DoFHandler &, MGLevelObject> &, diff --git a/source/multigrid/mg_transfer_prebuilt.cc b/source/multigrid/mg_transfer_prebuilt.cc index f2ffcc0ec9..13ff599c01 100644 --- a/source/multigrid/mg_transfer_prebuilt.cc +++ b/source/multigrid/mg_transfer_prebuilt.cc @@ -345,17 +345,6 @@ MGTransferPrebuilt::build( -template -template -void -MGTransferPrebuilt::build_matrices( - const DoFHandler &dof_handler) -{ - build(dof_handler); -} - - - template void MGTransferPrebuilt::print_matrices(std::ostream &os) const diff --git a/source/multigrid/mg_transfer_prebuilt.inst.in b/source/multigrid/mg_transfer_prebuilt.inst.in index f825afdf3f..387aea8c97 100644 --- a/source/multigrid/mg_transfer_prebuilt.inst.in +++ b/source/multigrid/mg_transfer_prebuilt.inst.in @@ -24,7 +24,4 @@ for (deal_II_dimension : DIMENSIONS; V1 : VECTORS_WITH_MATRIX) { template void MGTransferPrebuilt::build( const DoFHandler &mg_dof); - - template void MGTransferPrebuilt::build_matrices( - const DoFHandler &mg_dof); } diff --git a/tests/multigrid/mg_data_out_03.cc b/tests/multigrid/mg_data_out_03.cc index 2737d26a35..b76402a252 100644 --- a/tests/multigrid/mg_data_out_03.cc +++ b/tests/multigrid/mg_data_out_03.cc @@ -77,7 +77,7 @@ do_test() MGTransferPrebuilt> transfer; - transfer.build_matrices(dof_handler); + transfer.build(dof_handler); // This is not quite the correct thing to do, but "interpolate_to_mg" // doesn't exist for serial vectors. Here it means that the level 0 is 0 -- 2.39.5