From 930b02c8047ea7f54abccc185b1d0c8247941671 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Sat, 29 Oct 2016 10:39:49 +0200 Subject: [PATCH] Avoid using deprecated functionality --- tests/matrix_free/parallel_multigrid.cc | 4 +++- tests/matrix_free/parallel_multigrid_adaptive_01.cc | 4 +++- tests/matrix_free/parallel_multigrid_adaptive_02.cc | 4 +++- tests/matrix_free/parallel_multigrid_adaptive_03.cc | 4 +++- tests/matrix_free/parallel_multigrid_adaptive_04.cc | 4 +++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/tests/matrix_free/parallel_multigrid.cc b/tests/matrix_free/parallel_multigrid.cc index 238c87db06..feebc0e546 100644 --- a/tests/matrix_free/parallel_multigrid.cc +++ b/tests/matrix_free/parallel_multigrid.cc @@ -361,7 +361,9 @@ void do_test (const DoFHandler &dof) smoother_data[level].smoothing_range = 15.; smoother_data[level].degree = 5; smoother_data[level].eig_cg_n_iterations = 15; - smoother_data[level].matrix_diagonal_inverse = + smoother_data[level].preconditioner. + reset(new DiagonalMatrix >()); + smoother_data[level].preconditioner->get_vector() = mg_matrices[level].get_matrix_diagonal_inverse(); } mg_smoother.initialize(mg_matrices, smoother_data); diff --git a/tests/matrix_free/parallel_multigrid_adaptive_01.cc b/tests/matrix_free/parallel_multigrid_adaptive_01.cc index 1cd256990e..f50dbf9042 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_01.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_01.cc @@ -508,7 +508,9 @@ void do_test (const DoFHandler &dof) smoother_data[level].smoothing_range = 15.; smoother_data[level].degree = 5; smoother_data[level].eig_cg_n_iterations = 15; - smoother_data[level].matrix_diagonal_inverse = + smoother_data[level].preconditioner. + reset(new DiagonalMatrix >()); + smoother_data[level].preconditioner->get_vector() = mg_matrices[level].get_matrix_diagonal_inverse(); } mg_smoother.initialize(mg_matrices, smoother_data); diff --git a/tests/matrix_free/parallel_multigrid_adaptive_02.cc b/tests/matrix_free/parallel_multigrid_adaptive_02.cc index bf08a47b3b..0022408296 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_02.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_02.cc @@ -363,7 +363,9 @@ void do_test (const DoFHandler &dof) smoother_data[level].smoothing_range = 15.; smoother_data[level].degree = 5; smoother_data[level].eig_cg_n_iterations = 15; - smoother_data[level].matrix_diagonal_inverse = + smoother_data[level].preconditioner. + reset(new DiagonalMatrix >()); + smoother_data[level].preconditioner->get_vector() = mg_matrices[level].get_matrix_diagonal_inverse(); } mg_smoother.initialize(mg_matrices, smoother_data); diff --git a/tests/matrix_free/parallel_multigrid_adaptive_03.cc b/tests/matrix_free/parallel_multigrid_adaptive_03.cc index ea83846e7c..101f0bb3de 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_03.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_03.cc @@ -503,7 +503,9 @@ void do_test (const DoFHandler &dof, const bool threaded) smoother_data[level].smoothing_range = 15.; smoother_data[level].degree = 5; smoother_data[level].eig_cg_n_iterations = 15; - smoother_data[level].matrix_diagonal_inverse = + smoother_data[level].preconditioner. + reset(new DiagonalMatrix >()); + smoother_data[level].preconditioner->get_vector() = mg_matrices[level].get_matrix_diagonal_inverse(); } diff --git a/tests/matrix_free/parallel_multigrid_adaptive_04.cc b/tests/matrix_free/parallel_multigrid_adaptive_04.cc index 6bf48b8858..af783779e0 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_04.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_04.cc @@ -363,7 +363,9 @@ void do_test (const DoFHandler &dof) smoother_data[level].smoothing_range = 15.; smoother_data[level].degree = 5; smoother_data[level].eig_cg_n_iterations = 15; - smoother_data[level].matrix_diagonal_inverse = + smoother_data[level].preconditioner. + reset(new DiagonalMatrix >()); + smoother_data[level].preconditioner->get_vector() = mg_matrices[level].get_matrix_diagonal_inverse(); } mg_smoother.initialize(mg_matrices, smoother_data); -- 2.39.5