From 0e6f496cdf59ade0d62eaaa51cb75c7337e36e50 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 25 Jan 2015 12:45:52 -0600 Subject: [PATCH] Remove deprecated class MGMatrix. --- doc/news/changes.h | 1 + examples/step-39/step-39.cc | 8 +- include/deal.II/multigrid/mg_matrix.h | 103 -------------------------- tests/bits/step-16.cc | 4 +- tests/bits/step-16b.cc | 4 +- tests/matrix_free/step-37.cc | 6 +- tests/mpi/multigrid_adaptive.cc | 6 +- tests/mpi/multigrid_uniform.cc | 6 +- tests/mpi/step-39.cc | 6 +- tests/multigrid/cycles.cc | 4 +- tests/multigrid/mg_renumbered_01.cc | 8 +- tests/multigrid/step-16-02.cc | 6 +- tests/multigrid/step-16-bdry1.cc | 6 +- tests/multigrid/step-16.cc | 6 +- tests/multigrid/step-39-02.cc | 8 +- tests/multigrid/step-39-03.cc | 8 +- tests/multigrid/step-39.cc | 6 +- 17 files changed, 47 insertions(+), 149 deletions(-) diff --git a/doc/news/changes.h b/doc/news/changes.h index 92e96e6ff3..aa24f298dd 100644 --- a/doc/news/changes.h +++ b/doc/news/changes.h @@ -206,6 +206,7 @@ inconvenience this causes. - MGTools::count_dofs_per_component. - MGTools::apply_boundary_values. - MGTools::extract_inner_interface_dofs. + - Class MGMatrix.
This release also removes the deprecated class MGDoFHandler. The functionality of this class had previously been incorporated into diff --git a/examples/step-39/step-39.cc b/examples/step-39/step-39.cc index 22c12ef4d0..cf340a9ab5 100644 --- a/examples/step-39/step-39.cc +++ b/examples/step-39/step-39.cc @@ -1,6 +1,6 @@ /* --------------------------------------------------------------------- * - * Copyright (C) 2010 - 2014 by the deal.II authors + * Copyright (C) 2010 - 2015 by the deal.II authors * * This file is part of the deal.II library. * @@ -712,9 +712,9 @@ namespace Step39 // Finally, we must wrap our matrices in an object having the required // multiplication functions. - MGMatrix, Vector > mgmatrix(&mg_matrix); - MGMatrix, Vector > mgdown(&mg_matrix_dg_down); - MGMatrix, Vector > mgup(&mg_matrix_dg_up); + mg::Matrix > mgmatrix(mg_matrix); + mg::Matrix > mgdown(mg_matrix_dg_down); + mg::Matrix > mgup(mg_matrix_dg_up); // Now, we are ready to set up the V-cycle operator and the multilevel // preconditioner. diff --git a/include/deal.II/multigrid/mg_matrix.h b/include/deal.II/multigrid/mg_matrix.h index f0112786ff..85c98b6048 100644 --- a/include/deal.II/multigrid/mg_matrix.h +++ b/include/deal.II/multigrid/mg_matrix.h @@ -83,34 +83,6 @@ namespace mg } -/** - * @deprecated Use the much simpler class mg::Matrix instead. - * @author Guido Kanschat, 2002 - */ -template , class VECTOR = Vector > -class MGMatrix : public MGMatrixBase -{ -public: - MGMatrix (MGLevelObject *matrix= 0); - - void set_matrix (MGLevelObject *M); - virtual void vmult (const unsigned int level, - VECTOR &dst, - const VECTOR &src) const; - virtual void vmult_add (const unsigned int level, - VECTOR &dst, - const VECTOR &src) const; - virtual void Tvmult (const unsigned int level, - VECTOR &dst, - const VECTOR &src) const; - virtual void Tvmult_add (const unsigned int level, - VECTOR &dst, - const VECTOR &src) const; - std::size_t memory_consumption () const; -private: - SmartPointer,MGMatrix > matrix; -} DEAL_II_DEPRECATED; - /** * Multilevel matrix selecting from block matrices. This class implements the @@ -283,81 +255,6 @@ namespace mg } } -/*----------------------------------------------------------------------*/ - -template -MGMatrix::MGMatrix (MGLevelObject *p) - : - matrix (p, typeid(*this).name()) -{} - - -template -void -MGMatrix::set_matrix (MGLevelObject *p) -{ - matrix = p; -} - - -template -void -MGMatrix::vmult (const unsigned int level, - VECTOR &dst, - const VECTOR &src) const -{ - Assert(matrix != 0, ExcNotInitialized()); - - const MGLevelObject &m = *matrix; - m[level].vmult(dst, src); -} - - -template -void -MGMatrix::vmult_add (const unsigned int level, - VECTOR &dst, - const VECTOR &src) const -{ - Assert(matrix != 0, ExcNotInitialized()); - - const MGLevelObject &m = *matrix; - m[level].vmult_add(dst, src); -} - - -template -void -MGMatrix::Tvmult (const unsigned int level, - VECTOR &dst, - const VECTOR &src) const -{ - Assert(matrix != 0, ExcNotInitialized()); - - const MGLevelObject &m = *matrix; - m[level].Tvmult(dst, src); -} - - -template -void -MGMatrix::Tvmult_add (const unsigned int level, - VECTOR &dst, - const VECTOR &src) const -{ - Assert(matrix != 0, ExcNotInitialized()); - - const MGLevelObject &m = *matrix; - m[level].Tvmult_add(dst, src); -} - - -template -std::size_t -MGMatrix::memory_consumption () const -{ - return sizeof(*this) + matrix->memory_consumption(); -} /*----------------------------------------------------------------------*/ diff --git a/tests/bits/step-16.cc b/tests/bits/step-16.cc index 1281c6c21e..225d02148c 100644 --- a/tests/bits/step-16.cc +++ b/tests/bits/step-16.cc @@ -260,8 +260,8 @@ void LaplaceProblem::solve () mg_smoother.set_steps(2); mg_smoother.set_symmetric(true); - MGMatrix, Vector > - mg_matrix(&mg_matrices); + mg::Matrix > + mg_matrix(mg_matrices); Multigrid > mg(mg_dof_handler, mg_matrix, mg_coarse, diff --git a/tests/bits/step-16b.cc b/tests/bits/step-16b.cc index 374c750fe7..a2fc9aedec 100644 --- a/tests/bits/step-16b.cc +++ b/tests/bits/step-16b.cc @@ -262,8 +262,8 @@ void LaplaceProblem::solve () mg_smoother.set_steps(2); mg_smoother.set_symmetric(true); - MGMatrix, Vector > - mg_matrix(&mg_matrices); + mg::Matrix > + mg_matrix(mg_matrices); Multigrid > mg(mg_dof_handler, mg_matrix, mg_coarse, diff --git a/tests/matrix_free/step-37.cc b/tests/matrix_free/step-37.cc index d9ecb57a73..b208e6bf4d 100644 --- a/tests/matrix_free/step-37.cc +++ b/tests/matrix_free/step-37.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2012 - 2014 by the deal.II authors +// Copyright (C) 2012 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -583,8 +583,8 @@ namespace Step37 smoother_data.eig_cg_n_iterations = 10; mg_smoother.initialize(mg_matrices, smoother_data); - MGMatrix > - mg_matrix(&mg_matrices); + mg::Matrix > + mg_matrix(mg_matrices); Multigrid > mg(dof_handler, mg_matrix, diff --git a/tests/mpi/multigrid_adaptive.cc b/tests/mpi/multigrid_adaptive.cc index 73d7097fc4..498f95b00d 100644 --- a/tests/mpi/multigrid_adaptive.cc +++ b/tests/mpi/multigrid_adaptive.cc @@ -395,9 +395,9 @@ namespace Step50 MGSmootherPrecondition mg_smoother; mg_smoother.initialize(mg_matrices); mg_smoother.set_steps(2); - MGMatrix mg_matrix(&mg_matrices); - MGMatrix mg_interface_up(&mg_interface_matrices); - MGMatrix mg_interface_down(&mg_interface_matrices); + mg::Matrix mg_matrix(mg_matrices); + mg::Matrix mg_interface_up(mg_interface_matrices); + mg::Matrix mg_interface_down(mg_interface_matrices); // Now, we are ready to set up the // V-cycle operator and the diff --git a/tests/mpi/multigrid_uniform.cc b/tests/mpi/multigrid_uniform.cc index f041ec9cc5..189c57332a 100644 --- a/tests/mpi/multigrid_uniform.cc +++ b/tests/mpi/multigrid_uniform.cc @@ -395,9 +395,9 @@ namespace Step50 MGSmootherPrecondition mg_smoother; mg_smoother.initialize(mg_matrices); mg_smoother.set_steps(2); - MGMatrix mg_matrix(&mg_matrices); - MGMatrix mg_interface_up(&mg_interface_matrices); - MGMatrix mg_interface_down(&mg_interface_matrices); + mg::Matrix mg_matrix(mg_matrices); + mg::Matrix mg_interface_up(mg_interface_matrices); + mg::Matrix mg_interface_down(mg_interface_matrices); // Now, we are ready to set up the // V-cycle operator and the diff --git a/tests/mpi/step-39.cc b/tests/mpi/step-39.cc index 9180b959cf..5dfe10eaa2 100644 --- a/tests/mpi/step-39.cc +++ b/tests/mpi/step-39.cc @@ -572,9 +572,9 @@ namespace Step39 mg_smoother.initialize(mg_matrix, .7); mg_smoother.set_steps(2); - MGMatrix mgmatrix(&mg_matrix); - MGMatrix mgdown(&mg_matrix_dg_down); - MGMatrix mgup(&mg_matrix_dg_up); + mg::Matrix mgmatrix(mg_matrix); + mg::Matrix mgdown(mg_matrix_dg_down); + mg::Matrix mgup(mg_matrix_dg_up); Multigrid mg(dof_handler, mgmatrix, coarse_grid_solver, mg_transfer, diff --git a/tests/multigrid/cycles.cc b/tests/multigrid/cycles.cc index 21a9a0cab4..0e2812ab97 100644 --- a/tests/multigrid/cycles.cc +++ b/tests/multigrid/cycles.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -70,7 +70,7 @@ void test_cycles(unsigned int minlevel, unsigned int maxlevel) MGLevelObject > level_matrices(0, maxlevel); for (unsigned int i=0; i<=maxlevel; ++i) level_matrices[i].reinit(N, N); - MGMatrix, VECTOR> mgmatrix(&level_matrices); + mg::Matrix mgmatrix(level_matrices); Multigrid mg1(minlevel, maxlevel, mgmatrix, all, all, all, all, Multigrid::v_cycle); diff --git a/tests/multigrid/mg_renumbered_01.cc b/tests/multigrid/mg_renumbered_01.cc index fa7cf93e65..681d0bc686 100644 --- a/tests/multigrid/mg_renumbered_01.cc +++ b/tests/multigrid/mg_renumbered_01.cc @@ -372,11 +372,11 @@ void LaplaceProblem::test () mg_smoother.set_steps(1); mg_smoother_renumbered.set_steps(1); - MGMatrix, Vector > - mg_matrix(&mg_matrices); + mg::Matrix > + mg_matrix(mg_matrices); - MGMatrix, Vector > - mg_matrix_renumbered(&mg_matrices_renumbered); + mg::Matrix > + mg_matrix_renumbered(mg_matrices_renumbered); Multigrid > mg(mg_dof_handler, mg_matrix, diff --git a/tests/multigrid/step-16-02.cc b/tests/multigrid/step-16-02.cc index 1d90820738..9fcb182d78 100644 --- a/tests/multigrid/step-16-02.cc +++ b/tests/multigrid/step-16-02.cc @@ -466,9 +466,9 @@ void LaplaceProblem::solve () mg_smoother.set_steps(2); mg_smoother.set_symmetric(true); - MGMatrix<> mg_matrix(&mg_matrices); - MGMatrix<> mg_interface_up(&mg_interface_in); - MGMatrix<> mg_interface_down(&mg_interface_in); + mg::Matrix<> mg_matrix(mg_matrices); + mg::Matrix<> mg_interface_up(mg_interface_in); + mg::Matrix<> mg_interface_down(mg_interface_in); Multigrid > mg(mg_dof_handler, mg_matrix, diff --git a/tests/multigrid/step-16-bdry1.cc b/tests/multigrid/step-16-bdry1.cc index 179034e82c..18c0f1c1e1 100644 --- a/tests/multigrid/step-16-bdry1.cc +++ b/tests/multigrid/step-16-bdry1.cc @@ -467,9 +467,9 @@ void LaplaceProblem::solve () mg_smoother.set_steps(2); mg_smoother.set_symmetric(true); - MGMatrix<> mg_matrix(&mg_matrices); - MGMatrix<> mg_interface_up(&mg_interface_in); - MGMatrix<> mg_interface_down(&mg_interface_in); + mg::Matrix<> mg_matrix(mg_matrices); + mg::Matrix<> mg_interface_up(mg_interface_in); + mg::Matrix<> mg_interface_down(mg_interface_in); Multigrid > mg(mg_dof_handler, mg_matrix, diff --git a/tests/multigrid/step-16.cc b/tests/multigrid/step-16.cc index 76e049b0a1..cf11734a75 100644 --- a/tests/multigrid/step-16.cc +++ b/tests/multigrid/step-16.cc @@ -449,9 +449,9 @@ void LaplaceProblem::solve () mg_smoother.set_steps(2); mg_smoother.set_symmetric(true); - MGMatrix<> mg_matrix(&mg_matrices); - MGMatrix<> mg_interface_up(&mg_interface_matrices); - MGMatrix<> mg_interface_down(&mg_interface_matrices); + mg::Matrix<> mg_matrix(mg_matrices); + mg::Matrix<> mg_interface_up(mg_interface_matrices); + mg::Matrix<> mg_interface_down(mg_interface_matrices); Multigrid > mg(mg_dof_handler, mg_matrix, diff --git a/tests/multigrid/step-39-02.cc b/tests/multigrid/step-39-02.cc index d07fd59eac..f3356e0615 100644 --- a/tests/multigrid/step-39-02.cc +++ b/tests/multigrid/step-39-02.cc @@ -543,10 +543,10 @@ namespace Step39 mg_smoother.set_symmetric(true); mg_smoother.set_variable(false); - MGMatrix, Vector > mgmatrix(&mg_matrix); - MGMatrix, Vector > mgdown(&mg_matrix_dg_down); - MGMatrix, Vector > mgup(&mg_matrix_dg_up); - MGMatrix, Vector > mgedge(&mg_matrix_in_out); + mg::Matrix > mgmatrix(mg_matrix); + mg::Matrix > mgdown(mg_matrix_dg_down); + mg::Matrix > mgup(mg_matrix_dg_up); + mg::Matrix > mgedge(mg_matrix_in_out); Multigrid > mg(mg_dof_handler, mgmatrix, mg_coarse, mg_transfer, diff --git a/tests/multigrid/step-39-03.cc b/tests/multigrid/step-39-03.cc index aed9a2f96e..c98fd1f909 100644 --- a/tests/multigrid/step-39-03.cc +++ b/tests/multigrid/step-39-03.cc @@ -549,10 +549,10 @@ namespace Step39 mg_smoother.set_symmetric(true); mg_smoother.set_variable(false); - MGMatrix, Vector > mgmatrix(&mg_matrix); - MGMatrix, Vector > mgdown(&mg_matrix_dg_down); - MGMatrix, Vector > mgup(&mg_matrix_dg_up); - MGMatrix, Vector > mgedge(&mg_matrix_in_out); + mg::Matrix > mgmatrix(mg_matrix); + mg::Matrix > mgdown(mg_matrix_dg_down); + mg::Matrix > mgup(mg_matrix_dg_up); + mg::Matrix > mgedge(mg_matrix_in_out); Multigrid > mg(mg_dof_handler, mgmatrix, mg_coarse, mg_transfer, diff --git a/tests/multigrid/step-39.cc b/tests/multigrid/step-39.cc index b60aefdc03..c9767ec9ac 100644 --- a/tests/multigrid/step-39.cc +++ b/tests/multigrid/step-39.cc @@ -534,9 +534,9 @@ namespace Step39 mg_smoother.set_symmetric(true); mg_smoother.set_variable(false); - MGMatrix, Vector > mgmatrix(&mg_matrix); - MGMatrix, Vector > mgdown(&mg_matrix_dg_down); - MGMatrix, Vector > mgup(&mg_matrix_dg_up); + mg::Matrix > mgmatrix(mg_matrix); + mg::Matrix > mgdown(mg_matrix_dg_down); + mg::Matrix > mgup(mg_matrix_dg_up); Multigrid > mg(mg_dof_handler, mgmatrix, mg_coarse, mg_transfer, -- 2.39.5