From: Daniel Arndt Date: Fri, 27 Mar 2020 14:56:21 +0000 (-0400) Subject: Remove deprecated Multigrid related constructors X-Git-Tag: v9.2.0-rc1~346^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5f30c1fe789175ff2bcbc0b2fbb9681fe82a447;p=dealii.git Remove deprecated Multigrid related constructors --- diff --git a/doc/news/changes/incompatibilities/20200327DanielArndt-1 b/doc/news/changes/incompatibilities/20200327DanielArndt-1 new file mode 100644 index 0000000000..4726b2ae41 --- /dev/null +++ b/doc/news/changes/incompatibilities/20200327DanielArndt-1 @@ -0,0 +1,6 @@ +Removed: The deprecated functions DoFHandler::distribute_mg_dofs() and +MGTransferPrebuilt::initialize_constraints() and deprecated constructors for +MGSmootherBlock, MGTransferPrebuilt, MGTransferBlockBase and +MGTransferBlockSelect have been removed. +
+(Daniel Arndt, 2020/03/27) diff --git a/include/deal.II/dofs/dof_handler.h b/include/deal.II/dofs/dof_handler.h index 1572d52f99..be7c0258fe 100644 --- a/include/deal.II/dofs/dof_handler.h +++ b/include/deal.II/dofs/dof_handler.h @@ -533,18 +533,6 @@ public: virtual void distribute_dofs(const FiniteElement &fe); - /** - * Distribute level degrees of freedom on each level for geometric - * multigrid. The active DoFs need to be distributed using distribute_dofs() - * before calling this function and the @p fe needs to be identical to the - * finite element passed to distribute_dofs(). - * - * @deprecated Use the version without parameter instead. - */ - DEAL_II_DEPRECATED - virtual void - distribute_mg_dofs(const FiniteElement &fe); - /** * Distribute level degrees of freedom on each level for geometric * multigrid. The active DoFs need to be distributed using distribute_dofs() diff --git a/include/deal.II/multigrid/mg_block_smoother.h b/include/deal.II/multigrid/mg_block_smoother.h index 2a1458baf9..2b32c1b269 100644 --- a/include/deal.II/multigrid/mg_block_smoother.h +++ b/include/deal.II/multigrid/mg_block_smoother.h @@ -51,20 +51,6 @@ template class MGSmootherBlock : public MGSmoother> { public: - /** - * @deprecated Since GrowingVectorMemory now uses a joint memory pool, it is - * recommended to use the constructor without the memory object. - * - * Constructor. Sets memory and smoothing parameters. - */ - DEAL_II_DEPRECATED - MGSmootherBlock(VectorMemory> &mem, - const unsigned int steps = 1, - const bool variable = false, - const bool symmetric = false, - const bool transpose = false, - const bool reverse = false); - /** * Constructor. */ @@ -149,19 +135,6 @@ private: #ifndef DOXYGEN -template -inline MGSmootherBlock::MGSmootherBlock( - VectorMemory> &mem, - const unsigned int steps, - const bool variable, - const bool symmetric, - const bool transpose, - const bool reverse) - : MGSmoother>(steps, variable, symmetric, transpose) - , reverse(reverse) - , mem(&mem) -{} - template inline MGSmootherBlock::MGSmootherBlock( const unsigned int steps, diff --git a/include/deal.II/multigrid/mg_transfer.h b/include/deal.II/multigrid/mg_transfer.h index 89cef8c89c..4a87c0d404 100644 --- a/include/deal.II/multigrid/mg_transfer.h +++ b/include/deal.II/multigrid/mg_transfer.h @@ -683,16 +683,6 @@ public: */ MGTransferPrebuilt(const MGConstrainedDoFs &mg_constrained_dofs); - /** - * Constructor with constraints. Equivalent to the default constructor - * followed by initialize_constraints(). - * - * @deprecated @p constraints is unused. - */ - DEAL_II_DEPRECATED - MGTransferPrebuilt(const AffineConstraints &constraints, - const MGConstrainedDoFs & mg_constrained_dofs); - /** * Destructor. */ @@ -704,16 +694,6 @@ public: void initialize_constraints(const MGConstrainedDoFs &mg_constrained_dofs); - /** - * Initialize the constraints to be used in build(). - * - * @deprecated @p constraints is unused. - */ - DEAL_II_DEPRECATED - void - initialize_constraints(const AffineConstraints &constraints, - const MGConstrainedDoFs & mg_constrained_dofs); - /** * Reset the object to the state it had right after the default constructor. */ diff --git a/include/deal.II/multigrid/mg_transfer_block.h b/include/deal.II/multigrid/mg_transfer_block.h index b2536c1c3d..03a28cde9f 100644 --- a/include/deal.II/multigrid/mg_transfer_block.h +++ b/include/deal.II/multigrid/mg_transfer_block.h @@ -74,15 +74,6 @@ public: */ MGTransferBlockBase(const MGConstrainedDoFs &mg_constrained_dofs); - /** - * Constructor with constraint matrices as well as mg_constrained_dofs. - * - * @deprecated @p constraints is unused. - */ - DEAL_II_DEPRECATED - MGTransferBlockBase(const AffineConstraints &constraints, - const MGConstrainedDoFs & mg_constrained_dofs); - /** * Memory used by this object. */ @@ -352,15 +343,6 @@ public: */ MGTransferBlockSelect(const MGConstrainedDoFs &mg_constrained_dofs); - /** - * Constructor with constraint matrices as well as mg_constrained_dofs. - * - * @deprecated @p constraints is unused. - */ - DEAL_II_DEPRECATED - MGTransferBlockSelect(const AffineConstraints &constraints, - const MGConstrainedDoFs & mg_constrained_dofs); - /** * Destructor. */ diff --git a/include/deal.II/multigrid/multigrid.h b/include/deal.II/multigrid/multigrid.h index 0a9d3984dc..32f54b6a7f 100644 --- a/include/deal.II/multigrid/multigrid.h +++ b/include/deal.II/multigrid/multigrid.h @@ -153,35 +153,6 @@ public: using vector_type = VectorType; using const_vector_type = const VectorType; - /** - * Constructor. The DoFHandler is used to check whether the provided - * minlevel and maxlevel are in the range of valid levels. - * If maxlevel is set to the default value, the highest valid - * level is used. - * transfer is an object performing prolongation and - * restriction. - * - * This function already initializes the vectors which will be used later in - * the course of the computations. You should therefore create objects of - * this type as late as possible. - * - * @deprecated Use the other constructor instead. - * The DoFHandler is actually not needed. - */ - template -#ifndef _MSC_VER - DEAL_II_DEPRECATED -#endif - Multigrid(const DoFHandler & dof_handler, - const MGMatrixBase & matrix, - const MGCoarseGridBase &coarse, - const MGTransferBase & transfer, - const MGSmootherBase & pre_smooth, - const MGSmootherBase & post_smooth, - const unsigned int minlevel = 0, - const unsigned int maxlevel = numbers::invalid_unsigned_int, - Cycle cycle = v_cycle); - /** * Constructor. transfer is an object performing prolongation and * restriction. For levels in [minlevel, maxlevel] matrix has to contain @@ -636,40 +607,6 @@ private: /* --------------------------- inline functions --------------------- */ -template -template -Multigrid::Multigrid(const DoFHandler & dof_handler, - const MGMatrixBase &matrix, - const MGCoarseGridBase &coarse, - const MGTransferBase & transfer, - const MGSmootherBase & pre_smooth, - const MGSmootherBase &post_smooth, - const unsigned int min_level, - const unsigned int max_level, - Cycle cycle) - : cycle_type(cycle) - , minlevel(min_level) - , matrix(&matrix, typeid(*this).name()) - , coarse(&coarse, typeid(*this).name()) - , transfer(&transfer, typeid(*this).name()) - , pre_smooth(&pre_smooth, typeid(*this).name()) - , post_smooth(&post_smooth, typeid(*this).name()) - , edge_down(nullptr, typeid(*this).name()) - , edge_up(nullptr, typeid(*this).name()) - , debug(0) -{ - const unsigned int dof_handler_max_level = - dof_handler.get_triangulation().n_global_levels() - 1; - if (max_level == numbers::invalid_unsigned_int) - maxlevel = dof_handler_max_level; - else - maxlevel = max_level; - - reinit(minlevel, maxlevel); -} - - - template Multigrid::Multigrid(const MGMatrixBase & matrix, const MGCoarseGridBase &coarse, diff --git a/source/dofs/dof_handler.cc b/source/dofs/dof_handler.cc index 69133d732d..571770c3c9 100644 --- a/source/dofs/dof_handler.cc +++ b/source/dofs/dof_handler.cc @@ -1294,16 +1294,6 @@ DoFHandler::distribute_dofs( -template -void -DoFHandler::distribute_mg_dofs( - const FiniteElement &) -{ - this->distribute_mg_dofs(); -} - - - template void DoFHandler::distribute_mg_dofs() diff --git a/source/multigrid/mg_transfer_prebuilt.cc b/source/multigrid/mg_transfer_prebuilt.cc index e4bb863167..3b41615688 100644 --- a/source/multigrid/mg_transfer_prebuilt.cc +++ b/source/multigrid/mg_transfer_prebuilt.cc @@ -54,16 +54,6 @@ MGTransferPrebuilt::MGTransferPrebuilt( -template -MGTransferPrebuilt::MGTransferPrebuilt( - const AffineConstraints & /*c*/, - const MGConstrainedDoFs &mg_c) -{ - this->mg_constrained_dofs = &mg_c; -} - - - template void MGTransferPrebuilt::initialize_constraints( @@ -74,17 +64,6 @@ MGTransferPrebuilt::initialize_constraints( -template -void -MGTransferPrebuilt::initialize_constraints( - const AffineConstraints & /*c*/, - const MGConstrainedDoFs &mg_c) -{ - initialize_constraints(mg_c); -} - - - template void MGTransferPrebuilt::clear() diff --git a/source/multigrid/multigrid.cc b/source/multigrid/multigrid.cc index 310fc0da13..77842e8aab 100644 --- a/source/multigrid/multigrid.cc +++ b/source/multigrid/multigrid.cc @@ -49,14 +49,6 @@ MGTransferBlockBase::MGTransferBlockBase(const MGConstrainedDoFs &mg_c) -MGTransferBlockBase::MGTransferBlockBase( - const AffineConstraints & /*c*/, - const MGConstrainedDoFs &mg_c) - : n_mg_blocks(0) - , mg_constrained_dofs(&mg_c) -{} - - template MGTransferBlock::MGTransferBlock() : memory(nullptr, typeid(*this).name()) @@ -269,16 +261,6 @@ MGTransferBlockSelect::MGTransferBlockSelect( -template -MGTransferBlockSelect::MGTransferBlockSelect( - const AffineConstraints & /*c*/, - const MGConstrainedDoFs &mg_c) - : MGTransferBlockBase(mg_c) - , selected_block(0) -{} - - - template void MGTransferBlockSelect::prolongate(const unsigned int to_level, diff --git a/tests/bits/step-16.cc b/tests/bits/step-16.cc index 6a9a0a6274..6318ebb57e 100644 --- a/tests/bits/step-16.cc +++ b/tests/bits/step-16.cc @@ -273,12 +273,8 @@ LaplaceProblem::solve() mg_smoother.set_symmetric(true); mg::Matrix> mg_matrix(mg_matrices); - Multigrid> mg(mg_dof_handler, - mg_matrix, - mg_coarse, - mg_transfer, - mg_smoother, - mg_smoother); + Multigrid> mg( + mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); PreconditionMG, MGTransferPrebuilt>> preconditioner(mg_dof_handler, mg, mg_transfer); diff --git a/tests/matrix_free/cell_level_and_index.cc b/tests/matrix_free/cell_level_and_index.cc index 0dbccc766a..2f0436839d 100644 --- a/tests/matrix_free/cell_level_and_index.cc +++ b/tests/matrix_free/cell_level_and_index.cc @@ -97,7 +97,7 @@ test(const bool adaptive_ref = true) FE_Q fe(fe_degree); DoFHandler dof(tria); dof.distribute_dofs(fe); - dof.distribute_mg_dofs(fe); + dof.distribute_mg_dofs(); AffineConstraints constraints; constraints.close(); diff --git a/tests/matrix_free/multigrid_dg_periodic.cc b/tests/matrix_free/multigrid_dg_periodic.cc index 65000afebc..2960cb21a9 100644 --- a/tests/matrix_free/multigrid_dg_periodic.cc +++ b/tests/matrix_free/multigrid_dg_periodic.cc @@ -584,7 +584,7 @@ do_test(const DoFHandler &dof) mg::Matrix> mg_matrix(mg_matrices); Multigrid> mg( - dof, mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); + mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); PreconditionMG, MGTransferMF> diff --git a/tests/matrix_free/multigrid_dg_sip_01.cc b/tests/matrix_free/multigrid_dg_sip_01.cc index 5c550e8497..493b25f86b 100644 --- a/tests/matrix_free/multigrid_dg_sip_01.cc +++ b/tests/matrix_free/multigrid_dg_sip_01.cc @@ -601,7 +601,7 @@ do_test(const DoFHandler &dof, const bool also_test_parallel = false) mg::Matrix> mg_matrix(mg_matrices); Multigrid> mg( - dof, mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); + mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); PreconditionMG, MGTransferMF> diff --git a/tests/matrix_free/multigrid_dg_sip_02.cc b/tests/matrix_free/multigrid_dg_sip_02.cc index 7df1f593a0..3d8adf4e0a 100644 --- a/tests/matrix_free/multigrid_dg_sip_02.cc +++ b/tests/matrix_free/multigrid_dg_sip_02.cc @@ -509,7 +509,7 @@ do_test(const DoFHandler &dof, const bool also_test_parallel = false) mg::Matrix> mg_matrix(mg_matrices); Multigrid> mg( - dof, mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); + mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); PreconditionMG, MGTransferMF> diff --git a/tests/matrix_free/parallel_multigrid.cc b/tests/matrix_free/parallel_multigrid.cc index a151604ac6..ea737f3e46 100644 --- a/tests/matrix_free/parallel_multigrid.cc +++ b/tests/matrix_free/parallel_multigrid.cc @@ -408,7 +408,7 @@ do_test(const DoFHandler &dof) mg::Matrix> mg_matrix(mg_matrices); Multigrid> mg( - dof, mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); + mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); PreconditionMG, MGTransferPrebuiltMF> diff --git a/tests/matrix_free/parallel_multigrid_02.cc b/tests/matrix_free/parallel_multigrid_02.cc index 1306acac3c..c24f09287a 100644 --- a/tests/matrix_free/parallel_multigrid_02.cc +++ b/tests/matrix_free/parallel_multigrid_02.cc @@ -221,7 +221,7 @@ do_test(const DoFHandler &dof) mg::Matrix> mg_matrix(mg_matrices); Multigrid> mg( - dof, mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); + mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); PreconditionMG, MGTransferMatrixFree> diff --git a/tests/matrix_free/parallel_multigrid_adaptive_01.cc b/tests/matrix_free/parallel_multigrid_adaptive_01.cc index ece9bf6a08..9e809aacc0 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_01.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_01.cc @@ -593,7 +593,7 @@ do_test(const DoFHandler &dof) mg_interface_matrices); Multigrid> mg( - dof, mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); + mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_matrices(mg_interface, mg_interface); PreconditionMG, diff --git a/tests/matrix_free/parallel_multigrid_adaptive_02.cc b/tests/matrix_free/parallel_multigrid_adaptive_02.cc index 9039dbb84e..2cbcf4a8fc 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_02.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_02.cc @@ -282,7 +282,7 @@ do_test(const DoFHandler &dof) mg_interface_matrices); Multigrid> mg( - dof, mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); + mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_matrices(mg_interface, mg_interface); PreconditionMG, diff --git a/tests/matrix_free/parallel_multigrid_adaptive_03.cc b/tests/matrix_free/parallel_multigrid_adaptive_03.cc index 1f2f3bca58..b6ca3b283e 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_03.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_03.cc @@ -604,7 +604,7 @@ do_test(const DoFHandler &dof, const bool threaded) mg_interface_matrices); Multigrid> mg( - dof, mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); + mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_matrices(mg_interface, mg_interface); PreconditionMG, diff --git a/tests/matrix_free/parallel_multigrid_adaptive_04.cc b/tests/matrix_free/parallel_multigrid_adaptive_04.cc index 717f263723..ed56aa4fea 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_04.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_04.cc @@ -280,7 +280,7 @@ do_test(const DoFHandler &dof) mg_interface_matrices); Multigrid> mg( - dof, mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); + mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_matrices(mg_interface, mg_interface); PreconditionMG, diff --git a/tests/matrix_free/parallel_multigrid_adaptive_05.cc b/tests/matrix_free/parallel_multigrid_adaptive_05.cc index 172f4c0663..06e0c69bce 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_05.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_05.cc @@ -601,7 +601,7 @@ do_test(const DoFHandler &dof, const bool threaded) mg_interface_matrices); Multigrid> mg( - dof, mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); + mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_matrices(mg_interface, mg_interface); PreconditionMG, diff --git a/tests/matrix_free/parallel_multigrid_adaptive_06ref.cc b/tests/matrix_free/parallel_multigrid_adaptive_06ref.cc index 77b07516a7..db0f7a98eb 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_06ref.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_06ref.cc @@ -269,7 +269,7 @@ do_test(const DoFHandler &dof) mg_interface_matrices); Multigrid> mg( - dof, mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); + mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_matrices(mg_interface, mg_interface); PreconditionMG, diff --git a/tests/matrix_free/parallel_multigrid_adaptive_08.cc b/tests/matrix_free/parallel_multigrid_adaptive_08.cc index c193161501..2a617960be 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_08.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_08.cc @@ -353,7 +353,7 @@ do_test(const DoFHandler &dof) mg_interface_matrices); Multigrid> mg( - dof, mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); + mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_matrices(mg_interface, mg_interface); PreconditionMG, diff --git a/tests/matrix_free/parallel_multigrid_fullydistributed.cc b/tests/matrix_free/parallel_multigrid_fullydistributed.cc index 57097b2325..a0daf331f2 100644 --- a/tests/matrix_free/parallel_multigrid_fullydistributed.cc +++ b/tests/matrix_free/parallel_multigrid_fullydistributed.cc @@ -420,7 +420,7 @@ do_test(const DoFHandler &dof) mg::Matrix> mg_matrix(mg_matrices); Multigrid> mg( - dof, mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); + mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); PreconditionMG, MGTransferPrebuiltMF> diff --git a/tests/matrix_free/parallel_multigrid_mf.cc b/tests/matrix_free/parallel_multigrid_mf.cc index b0d651abf8..41b154fcc0 100644 --- a/tests/matrix_free/parallel_multigrid_mf.cc +++ b/tests/matrix_free/parallel_multigrid_mf.cc @@ -416,7 +416,7 @@ do_test(const DoFHandler &dof) mg::Matrix> mg_matrix(mg_matrices); Multigrid> mg( - dof, mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); + mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); PreconditionMG, MGTransferPrebuiltMF> diff --git a/tests/matrix_free/parallel_multigrid_mf_02.cc b/tests/matrix_free/parallel_multigrid_mf_02.cc index 857765176c..d11ef73864 100644 --- a/tests/matrix_free/parallel_multigrid_mf_02.cc +++ b/tests/matrix_free/parallel_multigrid_mf_02.cc @@ -218,7 +218,7 @@ do_test(const DoFHandler &dof) mg::Matrix> mg_matrix(mg_matrices); Multigrid> mg( - dof, mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); + mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); PreconditionMG, MGTransferMatrixFree> diff --git a/tests/matrix_free/step-37.cc b/tests/matrix_free/step-37.cc index 28a7380e86..598fba0d58 100644 --- a/tests/matrix_free/step-37.cc +++ b/tests/matrix_free/step-37.cc @@ -591,7 +591,7 @@ namespace Step37 mg::Matrix> mg_matrix(mg_matrices); Multigrid> mg( - dof_handler, mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); + mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); PreconditionMG, MGTransferPrebuilt>> preconditioner(dof_handler, mg, mg_transfer); diff --git a/tests/mpi/multigrid_adaptive.cc b/tests/mpi/multigrid_adaptive.cc index 1325736d3b..264d6f54bd 100644 --- a/tests/mpi/multigrid_adaptive.cc +++ b/tests/mpi/multigrid_adaptive.cc @@ -423,13 +423,8 @@ namespace Step50 // Now, we are ready to set up the // V-cycle operator and the // multilevel preconditioner. - Multigrid mg(mg_dof_handler, - mg_matrix, - coarse_grid_solver, - mg_transfer, - mg_smoother, - mg_smoother); - mg.set_debug(2); + Multigrid mg( + mg_matrix, coarse_grid_solver, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_matrices(mg_interface_down, mg_interface_up); PreconditionMG> preconditioner( diff --git a/tests/mpi/multigrid_uniform.cc b/tests/mpi/multigrid_uniform.cc index 8a4d907f5c..5b871d5718 100644 --- a/tests/mpi/multigrid_uniform.cc +++ b/tests/mpi/multigrid_uniform.cc @@ -410,13 +410,8 @@ namespace Step50 // Now, we are ready to set up the // V-cycle operator and the // multilevel preconditioner. - Multigrid mg(mg_dof_handler, - mg_matrix, - coarse_grid_solver, - mg_transfer, - mg_smoother, - mg_smoother); - mg.set_debug(2); + Multigrid mg( + mg_matrix, coarse_grid_solver, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_matrices(mg_interface_down, mg_interface_up); PreconditionMG> preconditioner( diff --git a/tests/mpi/step-39-block.cc b/tests/mpi/step-39-block.cc index dae2a799b4..a61d845ad6 100644 --- a/tests/mpi/step-39-block.cc +++ b/tests/mpi/step-39-block.cc @@ -682,12 +682,8 @@ namespace Step39 mg::Matrix mgdown(mg_matrix_dg_down); mg::Matrix mgup(mg_matrix_dg_up); - Multigrid mg(dof_handler, - mgmatrix, - coarse_grid_solver, - mg_transfer, - mg_smoother, - mg_smoother); + Multigrid mg( + mgmatrix, coarse_grid_solver, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_flux_matrices(mgdown, mgup); PreconditionMG mgdown(mg_matrix_dg_down); mg::Matrix mgup(mg_matrix_dg_up); - Multigrid mg(dof_handler, - mgmatrix, - coarse_grid_solver, - mg_transfer, - mg_smoother, - mg_smoother); + Multigrid mg( + mgmatrix, coarse_grid_solver, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_flux_matrices(mgdown, mgup); PreconditionMG mg_interface_up(mg_interface_matrices); mg::Matrix mg_interface_down(mg_interface_matrices); - Multigrid mg(mg_dof_handler, - mg_matrix, - coarse_grid_solver, - mg_transfer, - mg_smoother, - mg_smoother); + Multigrid mg( + mg_matrix, coarse_grid_solver, mg_transfer, mg_smoother, mg_smoother); auto print_transfer_to_mg = [](const bool start) { deallog << "transfer_to_mg " << (start ? "started" : "finished") diff --git a/tests/multigrid/mg_coarse_01.cc b/tests/multigrid/mg_coarse_01.cc index 48f03c0e93..56992dc5c8 100644 --- a/tests/multigrid/mg_coarse_01.cc +++ b/tests/multigrid/mg_coarse_01.cc @@ -469,12 +469,8 @@ namespace Step50 mg::Matrix mg_interface_up(mg_interface_matrices); mg::Matrix mg_interface_down(mg_interface_matrices); - Multigrid mg(mg_dof_handler, - mg_matrix, - coarse_grid_solver, - mg_transfer, - mg_smoother, - mg_smoother); + Multigrid mg( + mg_matrix, coarse_grid_solver, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_matrices(mg_interface_down, mg_interface_up); diff --git a/tests/multigrid/mg_data_out_03.cc b/tests/multigrid/mg_data_out_03.cc index 088d6a48e3..b9d3362f3b 100644 --- a/tests/multigrid/mg_data_out_03.cc +++ b/tests/multigrid/mg_data_out_03.cc @@ -51,7 +51,7 @@ do_test() DoFHandler dof_handler(triangulation); dof_handler.distribute_dofs(fe); - dof_handler.distribute_mg_dofs(fe); + dof_handler.distribute_mg_dofs(); Vector global_dof_vector(dof_handler.n_dofs()); VectorTools::interpolate(dof_handler, diff --git a/tests/multigrid/mg_data_out_04.cc b/tests/multigrid/mg_data_out_04.cc index 649c980eb5..d51ac4f8d2 100644 --- a/tests/multigrid/mg_data_out_04.cc +++ b/tests/multigrid/mg_data_out_04.cc @@ -50,7 +50,7 @@ do_test() FE_Q fe(1); DoFHandler dof_handler(triangulation); dof_handler.distribute_dofs(fe); - dof_handler.distribute_mg_dofs(fe); + dof_handler.distribute_mg_dofs(); // Make FE vector IndexSet locally_relevant_dofs; diff --git a/tests/multigrid/mg_data_out_05.cc b/tests/multigrid/mg_data_out_05.cc index f524d9b496..3149084cfb 100644 --- a/tests/multigrid/mg_data_out_05.cc +++ b/tests/multigrid/mg_data_out_05.cc @@ -56,7 +56,7 @@ do_test() DoFHandler dof_handler(triangulation); dof_handler.distribute_dofs(fe); - dof_handler.distribute_mg_dofs(fe); + dof_handler.distribute_mg_dofs(); // Make FE vector IndexSet locally_relevant_dofs; diff --git a/tests/multigrid/mg_renumbered_01.cc b/tests/multigrid/mg_renumbered_01.cc index 9313baacb1..ce8a8e8766 100644 --- a/tests/multigrid/mg_renumbered_01.cc +++ b/tests/multigrid/mg_renumbered_01.cc @@ -391,15 +391,10 @@ LaplaceProblem::test() mg::Matrix> mg_matrix_renumbered(mg_matrices_renumbered); - Multigrid> mg(mg_dof_handler, - mg_matrix, - mg_coarse, - mg_transfer, - mg_smoother, - mg_smoother); - - Multigrid> mg_renumbered(mg_dof_handler_renumbered, - mg_matrix_renumbered, + Multigrid> mg( + mg_matrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); + + Multigrid> mg_renumbered(mg_matrix_renumbered, mg_coarse_renumbered, mg_transfer_renumbered, mg_smoother_renumbered, diff --git a/tests/multigrid/step-16-02.cc b/tests/multigrid/step-16-02.cc index f4caccc6e0..67aa226df2 100644 --- a/tests/multigrid/step-16-02.cc +++ b/tests/multigrid/step-16-02.cc @@ -491,12 +491,8 @@ LaplaceProblem::solve() mg::Matrix<> mg_interface_up(mg_interface_in); mg::Matrix<> mg_interface_down(mg_interface_in); - Multigrid> mg(mg_dof_handler, - mg_matrix, - coarse_grid_solver, - mg_transfer, - mg_smoother, - mg_smoother); + Multigrid> mg( + mg_matrix, coarse_grid_solver, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_matrices(mg_interface_down, mg_interface_up); PreconditionMG, MGTransferPrebuilt>> diff --git a/tests/multigrid/step-16-03.cc b/tests/multigrid/step-16-03.cc index f558806d72..d0fc89b5c6 100644 --- a/tests/multigrid/step-16-03.cc +++ b/tests/multigrid/step-16-03.cc @@ -385,8 +385,7 @@ LaplaceProblem::solve() mg::Matrix<> mg_interface_up(mg_interface_matrices); mg::Matrix<> mg_interface_down(mg_interface_matrices); - Multigrid> mg(mg_dof_handler, - mg_matrix, + Multigrid> mg(mg_matrix, coarse_grid_solver, mg_transfer, mg_smoother, diff --git a/tests/multigrid/step-16-05.cc b/tests/multigrid/step-16-05.cc index fb12e0f51f..9cd051790e 100644 --- a/tests/multigrid/step-16-05.cc +++ b/tests/multigrid/step-16-05.cc @@ -374,7 +374,7 @@ void LaplaceProblem::solve() { MGTransferPrebuilt> mg_transfer( - hanging_node_constraints, mg_constrained_dofs); + mg_constrained_dofs); mg_transfer.build(mg_dof_handler); SolverControl coarse_solver_control(1000, 1e-10, false, false); diff --git a/tests/multigrid/step-16-06.cc b/tests/multigrid/step-16-06.cc index e77da649fa..d89da1bb91 100644 --- a/tests/multigrid/step-16-06.cc +++ b/tests/multigrid/step-16-06.cc @@ -374,7 +374,7 @@ void LaplaceProblem::solve() { MGTransferPrebuilt> mg_transfer( - hanging_node_constraints, mg_constrained_dofs); + mg_constrained_dofs); mg_transfer.build(mg_dof_handler); SolverControl coarse_solver_control(1000, 1e-10, false, false); diff --git a/tests/multigrid/step-16-07.cc b/tests/multigrid/step-16-07.cc index 9b097fa276..5a7a99bac9 100644 --- a/tests/multigrid/step-16-07.cc +++ b/tests/multigrid/step-16-07.cc @@ -465,12 +465,8 @@ LaplaceProblem::solve() mg::Matrix<> mg_interface_up(mg_interface_matrices); mg::Matrix<> mg_interface_down(mg_interface_matrices); - Multigrid> mg(mg_dof_handler, - mg_matrix, - coarse_grid_solver, - mg_transfer, - mg_smoother, - mg_smoother); + Multigrid> mg( + mg_matrix, coarse_grid_solver, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_matrices(mg_interface_down, mg_interface_up); PreconditionMG, MGTransferPrebuilt>> diff --git a/tests/multigrid/step-16-50-mpi-linear-operator.cc b/tests/multigrid/step-16-50-mpi-linear-operator.cc index fccf9abf7c..3b9809d749 100644 --- a/tests/multigrid/step-16-50-mpi-linear-operator.cc +++ b/tests/multigrid/step-16-50-mpi-linear-operator.cc @@ -454,12 +454,8 @@ namespace Step50 mg::Matrix mg_interface_up(mg_interface_matrices); mg::Matrix mg_interface_down(mg_interface_matrices); - Multigrid mg(mg_dof_handler, - mg_matrix, - coarse_grid_solver, - mg_transfer, - mg_smoother, - mg_smoother); + Multigrid mg( + mg_matrix, coarse_grid_solver, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_matrices(mg_interface_down, mg_interface_up); PreconditionMG> preconditioner( diff --git a/tests/multigrid/step-16-50-mpi-smoother.cc b/tests/multigrid/step-16-50-mpi-smoother.cc index d1f1ee06c5..1136ad4598 100644 --- a/tests/multigrid/step-16-50-mpi-smoother.cc +++ b/tests/multigrid/step-16-50-mpi-smoother.cc @@ -457,12 +457,8 @@ namespace Step50 mg::Matrix mg_interface_up(mg_interface_matrices); mg::Matrix mg_interface_down(mg_interface_matrices); - Multigrid mg(mg_dof_handler, - mg_matrix, - coarse_grid_solver, - mg_transfer, - mg_smoother, - mg_smoother); + Multigrid mg( + mg_matrix, coarse_grid_solver, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_matrices(mg_interface_down, mg_interface_up); PreconditionMG> preconditioner( diff --git a/tests/multigrid/step-16-50-mpi.cc b/tests/multigrid/step-16-50-mpi.cc index 05c919bb5b..3a8212cb0b 100644 --- a/tests/multigrid/step-16-50-mpi.cc +++ b/tests/multigrid/step-16-50-mpi.cc @@ -454,12 +454,8 @@ namespace Step50 mg::Matrix mg_interface_up(mg_interface_matrices); mg::Matrix mg_interface_down(mg_interface_matrices); - Multigrid mg(mg_dof_handler, - mg_matrix, - coarse_grid_solver, - mg_transfer, - mg_smoother, - mg_smoother); + Multigrid mg( + mg_matrix, coarse_grid_solver, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_matrices(mg_interface_down, mg_interface_up); PreconditionMG> preconditioner( diff --git a/tests/multigrid/step-16-50-serial.cc b/tests/multigrid/step-16-50-serial.cc index 1c0ee0a758..1f56b6cdeb 100644 --- a/tests/multigrid/step-16-50-serial.cc +++ b/tests/multigrid/step-16-50-serial.cc @@ -387,12 +387,8 @@ LaplaceProblem::solve() mg::Matrix mg_interface_up(mg_interface_matrices); mg::Matrix mg_interface_down(mg_interface_matrices); - Multigrid mg(mg_dof_handler, - mg_matrix, - coarse_grid_solver, - mg_transfer, - mg_smoother, - mg_smoother); + Multigrid mg( + mg_matrix, coarse_grid_solver, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_matrices(mg_interface_down, mg_interface_up); PreconditionMG> preconditioner( diff --git a/tests/multigrid/step-16-bdry1.cc b/tests/multigrid/step-16-bdry1.cc index 68a0ab1bd6..995d80468d 100644 --- a/tests/multigrid/step-16-bdry1.cc +++ b/tests/multigrid/step-16-bdry1.cc @@ -510,12 +510,8 @@ LaplaceProblem::solve(bool use_mw) // if (use_mw) // mg_interface_down.initialize(mg_interface_out); - Multigrid> mg(mg_dof_handler, - mg_matrix, - coarse_grid_solver, - mg_transfer, - mg_smoother, - mg_smoother); + Multigrid> mg( + mg_matrix, coarse_grid_solver, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_matrices(mg_interface_down, mg_interface_up); PreconditionMG, MGTransferPrebuilt>> diff --git a/tests/multigrid/step-16.cc b/tests/multigrid/step-16.cc index b4c8fca1d1..b12d45e237 100644 --- a/tests/multigrid/step-16.cc +++ b/tests/multigrid/step-16.cc @@ -466,12 +466,8 @@ LaplaceProblem::solve() mg::Matrix<> mg_interface_up(mg_interface_matrices); mg::Matrix<> mg_interface_down(mg_interface_matrices); - Multigrid> mg(mg_dof_handler, - mg_matrix, - coarse_grid_solver, - mg_transfer, - mg_smoother, - mg_smoother); + Multigrid> mg( + mg_matrix, coarse_grid_solver, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_matrices(mg_interface_down, mg_interface_up); PreconditionMG, MGTransferPrebuilt>> diff --git a/tests/multigrid/step-39-02.cc b/tests/multigrid/step-39-02.cc index 958fd55420..a5e9a968c7 100644 --- a/tests/multigrid/step-39-02.cc +++ b/tests/multigrid/step-39-02.cc @@ -612,7 +612,7 @@ namespace Step39 mg::Matrix> mgedge(mg_matrix_in_out); Multigrid> mg( - dof_handler, mgmatrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); + mgmatrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_flux_matrices(mgdown, mgup); mg.set_edge_matrices(mgedge, mgedge); diff --git a/tests/multigrid/step-39-02a.cc b/tests/multigrid/step-39-02a.cc index 8a0d4c86e4..bc52a9de58 100644 --- a/tests/multigrid/step-39-02a.cc +++ b/tests/multigrid/step-39-02a.cc @@ -619,7 +619,7 @@ namespace Step39 mg::Matrix> mgedge(mg_matrix_in_out); Multigrid> mg( - dof_handler, mgmatrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); + mgmatrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_flux_matrices(mgdown, mgup); mg.set_edge_matrices(mgedge, mgedge); diff --git a/tests/multigrid/step-39-03.cc b/tests/multigrid/step-39-03.cc index 5e136df70b..a6aede4a85 100644 --- a/tests/multigrid/step-39-03.cc +++ b/tests/multigrid/step-39-03.cc @@ -618,7 +618,7 @@ namespace Step39 mg::Matrix> mgedge(mg_matrix_in_out); Multigrid> mg( - dof_handler, mgmatrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); + mgmatrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_flux_matrices(mgdown, mgup); mg.set_edge_matrices(mgedge, mgedge); diff --git a/tests/multigrid/step-39.cc b/tests/multigrid/step-39.cc index 3eb8bb756e..fb4db17f3d 100644 --- a/tests/multigrid/step-39.cc +++ b/tests/multigrid/step-39.cc @@ -601,7 +601,7 @@ namespace Step39 mg::Matrix> mgup(mg_matrix_dg_up); Multigrid> mg( - dof_handler, mgmatrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); + mgmatrix, mg_coarse, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_flux_matrices(mgdown, mgup); PreconditionMG, MGTransferPrebuilt>> diff --git a/tests/multigrid/step-50_01.cc b/tests/multigrid/step-50_01.cc index b15d4a4284..0e21f3e086 100644 --- a/tests/multigrid/step-50_01.cc +++ b/tests/multigrid/step-50_01.cc @@ -454,12 +454,8 @@ namespace Step50 mg::Matrix mg_interface_up(mg_interface_matrices); mg::Matrix mg_interface_down(mg_interface_matrices); - Multigrid mg(mg_dof_handler, - mg_matrix, - coarse_grid_solver, - mg_transfer, - mg_smoother, - mg_smoother); + Multigrid mg( + mg_matrix, coarse_grid_solver, mg_transfer, mg_smoother, mg_smoother); mg.set_edge_matrices(mg_interface_down, mg_interface_up);