From 81f5ad06ccb016a1a6643be68ca5bb079d3e617c Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 16 Nov 2022 17:19:37 -0700 Subject: [PATCH] Avoid the use of deprecated constructors. --- examples/step-17/step-17.cc | 2 +- examples/step-18/step-18.cc | 2 +- tests/arpack/parpack_advection_diffusion_petsc.cc | 2 +- tests/arpack/step-36_parpack.cc | 2 +- tests/fe/fe_enriched_color_07.cc | 2 +- tests/mpi/hp_step-40.cc | 2 +- tests/mpi/hp_step-40_variable_01.cc | 2 +- tests/mpi/periodicity_01.cc | 2 +- tests/mpi/step-40.cc | 2 +- tests/mpi/step-40_cuthill_mckee.cc | 2 +- tests/mpi/step-40_cuthill_mckee_MPI-subset.cc | 2 +- tests/petsc/bddc.cc | 4 ++-- tests/physics/step-18-rotation_matrix.cc | 2 +- tests/physics/step-18.cc | 2 +- tests/simplex/step-17.cc | 2 +- tests/simplex/step-18.cc | 2 +- tests/slepc/step-36_parallel.cc | 3 +-- tests/slepc/step-36_parallel_02.cc | 3 +-- tests/slepc/step-36_parallel_03.cc | 3 +-- 19 files changed, 20 insertions(+), 23 deletions(-) diff --git a/examples/step-17/step-17.cc b/examples/step-17/step-17.cc index b895593e24..144606dde9 100644 --- a/examples/step-17/step-17.cc +++ b/examples/step-17/step-17.cc @@ -616,7 +616,7 @@ namespace Step17 unsigned int ElasticProblem::solve() { SolverControl solver_control(solution.size(), 1e-8 * system_rhs.l2_norm()); - PETScWrappers::SolverCG cg(solver_control, mpi_communicator); + PETScWrappers::SolverCG cg(solver_control); PETScWrappers::PreconditionBlockJacobi preconditioner(system_matrix); diff --git a/examples/step-18/step-18.cc b/examples/step-18/step-18.cc index 9445b63bbf..3a1b65cac0 100644 --- a/examples/step-18/step-18.cc +++ b/examples/step-18/step-18.cc @@ -1122,7 +1122,7 @@ namespace Step18 SolverControl solver_control(dof_handler.n_dofs(), 1e-16 * system_rhs.l2_norm()); - PETScWrappers::SolverCG cg(solver_control, mpi_communicator); + PETScWrappers::SolverCG cg(solver_control); PETScWrappers::PreconditionBlockJacobi preconditioner(system_matrix); diff --git a/tests/arpack/parpack_advection_diffusion_petsc.cc b/tests/arpack/parpack_advection_diffusion_petsc.cc index 7bb26b16fb..2d902f9cb4 100644 --- a/tests/arpack/parpack_advection_diffusion_petsc.cc +++ b/tests/arpack/parpack_advection_diffusion_petsc.cc @@ -114,7 +114,7 @@ public: PETScInverse(const dealii::PETScWrappers::MatrixBase &A, dealii::SolverControl & cn, const MPI_Comm &mpi_communicator = PETSC_COMM_SELF) - : solver(cn, mpi_communicator) + : solver(cn) , matrix(A) , preconditioner(matrix) {} diff --git a/tests/arpack/step-36_parpack.cc b/tests/arpack/step-36_parpack.cc index af36f951b3..f079f2ad2a 100644 --- a/tests/arpack/step-36_parpack.cc +++ b/tests/arpack/step-36_parpack.cc @@ -117,7 +117,7 @@ public: PETScInverse(const dealii::PETScWrappers::MatrixBase &A, dealii::SolverControl & cn, const MPI_Comm &mpi_communicator = PETSC_COMM_SELF) - : solver(cn, mpi_communicator) + : solver(cn) , matrix(A) , preconditioner(matrix) {} diff --git a/tests/fe/fe_enriched_color_07.cc b/tests/fe/fe_enriched_color_07.cc index 482d9ee568..3a3d4e2110 100644 --- a/tests/fe/fe_enriched_color_07.cc +++ b/tests/fe/fe_enriched_color_07.cc @@ -1576,7 +1576,7 @@ LaplaceProblem::solve() { pcout << "...solving" << std::endl; SolverControl solver_control(prm.max_iterations, prm.tolerance, false, false); - PETScWrappers::SolverCG cg(solver_control, mpi_communicator); + PETScWrappers::SolverCG cg(solver_control); PETScWrappers::PreconditionSOR preconditioner(system_matrix); diff --git a/tests/mpi/hp_step-40.cc b/tests/mpi/hp_step-40.cc index 650cacd6bc..b95e11d156 100644 --- a/tests/mpi/hp_step-40.cc +++ b/tests/mpi/hp_step-40.cc @@ -261,7 +261,7 @@ namespace Step40 SolverControl solver_control(dof_handler.n_dofs(), 1e-12); - PETScWrappers::SolverCG solver(solver_control, mpi_communicator); + PETScWrappers::SolverCG solver(solver_control); #ifndef PETSC_USE_COMPLEX PETScWrappers::PreconditionBoomerAMG preconditioner( diff --git a/tests/mpi/hp_step-40_variable_01.cc b/tests/mpi/hp_step-40_variable_01.cc index 22cf4b0867..2c2ef78a8e 100644 --- a/tests/mpi/hp_step-40_variable_01.cc +++ b/tests/mpi/hp_step-40_variable_01.cc @@ -267,7 +267,7 @@ namespace Step40 SolverControl solver_control(dof_handler.n_dofs(), 1e-12); - PETScWrappers::SolverCG solver(solver_control, mpi_communicator); + PETScWrappers::SolverCG solver(solver_control); #ifndef PETSC_USE_COMPLEX PETScWrappers::PreconditionBoomerAMG preconditioner( diff --git a/tests/mpi/periodicity_01.cc b/tests/mpi/periodicity_01.cc index 78da7d5c7b..9638f89052 100644 --- a/tests/mpi/periodicity_01.cc +++ b/tests/mpi/periodicity_01.cc @@ -277,7 +277,7 @@ namespace Step40 SolverControl solver_control(dof_handler.n_dofs(), 1e-12, false, false); - PETScWrappers::SolverCG solver(solver_control, mpi_communicator); + PETScWrappers::SolverCG solver(solver_control); #ifndef PETSC_USE_COMPLEX // Ask for a symmetric preconditioner by setting the first parameter in diff --git a/tests/mpi/step-40.cc b/tests/mpi/step-40.cc index d25fc17ccf..a30ddc4e46 100644 --- a/tests/mpi/step-40.cc +++ b/tests/mpi/step-40.cc @@ -246,7 +246,7 @@ namespace Step40 SolverControl solver_control(dof_handler.n_dofs(), 1e-12); - PETScWrappers::SolverCG solver(solver_control, mpi_communicator); + PETScWrappers::SolverCG solver(solver_control); #ifndef PETSC_USE_COMPLEX PETScWrappers::PreconditionBoomerAMG preconditioner( diff --git a/tests/mpi/step-40_cuthill_mckee.cc b/tests/mpi/step-40_cuthill_mckee.cc index 8a6b31d3fc..00ec8af93f 100644 --- a/tests/mpi/step-40_cuthill_mckee.cc +++ b/tests/mpi/step-40_cuthill_mckee.cc @@ -308,7 +308,7 @@ namespace Step40 SolverControl solver_control(dof_handler.n_dofs(), 1e-12); - PETScWrappers::SolverCG solver(solver_control, mpi_communicator); + PETScWrappers::SolverCG solver(solver_control); #ifndef PETSC_USE_COMPLEX PETScWrappers::PreconditionBoomerAMG preconditioner( diff --git a/tests/mpi/step-40_cuthill_mckee_MPI-subset.cc b/tests/mpi/step-40_cuthill_mckee_MPI-subset.cc index cbda9619ce..17e1dd48c2 100644 --- a/tests/mpi/step-40_cuthill_mckee_MPI-subset.cc +++ b/tests/mpi/step-40_cuthill_mckee_MPI-subset.cc @@ -309,7 +309,7 @@ namespace Step40 SolverControl solver_control(dof_handler.n_dofs(), 1e-12); - PETScWrappers::SolverCG solver(solver_control, mpi_communicator); + PETScWrappers::SolverCG solver(solver_control); #ifndef PETSC_USE_COMPLEX PETScWrappers::PreconditionBoomerAMG preconditioner( diff --git a/tests/petsc/bddc.cc b/tests/petsc/bddc.cc index b3fbaafa0f..9a3fb8ba8f 100644 --- a/tests/petsc/bddc.cc +++ b/tests/petsc/bddc.cc @@ -156,8 +156,8 @@ main(int argc, char *argv[]) SolverControl solver_control(dof_handler.n_dofs(), 1e-12); - PETScWrappers::SolverCG solver(solver_control, MPI_COMM_WORLD); - PETScWrappers::PreconditionBDDC<2> preconditioner; + PETScWrappers::SolverCG solver(solver_control); + PETScWrappers::PreconditionBDDC<2> preconditioner; PETScWrappers::PreconditionBDDC<2>::AdditionalData data; // Now we setup the dof coordinates if a sufficiently new PETSc is used diff --git a/tests/physics/step-18-rotation_matrix.cc b/tests/physics/step-18-rotation_matrix.cc index 0fc9d60ede..130238b4c2 100644 --- a/tests/physics/step-18-rotation_matrix.cc +++ b/tests/physics/step-18-rotation_matrix.cc @@ -482,7 +482,7 @@ namespace Step18 1e-16 * system_rhs.l2_norm(), false, false); - PETScWrappers::SolverCG cg(solver_control, mpi_communicator); + PETScWrappers::SolverCG cg(solver_control); PETScWrappers::PreconditionBlockJacobi preconditioner(system_matrix); cg.solve(system_matrix, distributed_incremental_displacement, diff --git a/tests/physics/step-18.cc b/tests/physics/step-18.cc index 1880f4addf..212b2ff149 100644 --- a/tests/physics/step-18.cc +++ b/tests/physics/step-18.cc @@ -498,7 +498,7 @@ namespace Step18 1e-16 * system_rhs.l2_norm(), false, false); - PETScWrappers::SolverCG cg(solver_control, mpi_communicator); + PETScWrappers::SolverCG cg(solver_control); PETScWrappers::PreconditionBlockJacobi preconditioner(system_matrix); cg.solve(system_matrix, distributed_incremental_displacement, diff --git a/tests/simplex/step-17.cc b/tests/simplex/step-17.cc index 9a1a86bc3b..c20aa103af 100644 --- a/tests/simplex/step-17.cc +++ b/tests/simplex/step-17.cc @@ -327,7 +327,7 @@ namespace Step17 ElasticProblem::solve() { SolverControl solver_control(solution.size(), 1e-8 * system_rhs.l2_norm()); - PETScWrappers::SolverCG cg(solver_control, mpi_communicator); + PETScWrappers::SolverCG cg(solver_control); // PreconditionBlockJacobi depends on the processor count PETScWrappers::PreconditionBlockJacobi preconditioner(system_matrix); diff --git a/tests/simplex/step-18.cc b/tests/simplex/step-18.cc index 37ba34f885..57af8e2090 100644 --- a/tests/simplex/step-18.cc +++ b/tests/simplex/step-18.cc @@ -701,7 +701,7 @@ namespace Step18 1e-16 * system_rhs.l2_norm()); #ifdef DEAL_II_WITH_PETSC - PETScWrappers::SolverCG cg(solver_control, mpi_communicator); + PETScWrappers::SolverCG cg(solver_control); PETScWrappers::PreconditionBlockJacobi preconditioner(system_matrix); diff --git a/tests/slepc/step-36_parallel.cc b/tests/slepc/step-36_parallel.cc index 61cac41df3..030e59b62c 100644 --- a/tests/slepc/step-36_parallel.cc +++ b/tests/slepc/step-36_parallel.cc @@ -247,8 +247,7 @@ test(std::string solver_name, std::string preconditioner_name) 1e-15, /*log_history*/ false, /*log_results*/ false); - PETScWrappers::SolverCG linear_solver(linear_solver_control, - mpi_communicator); + PETScWrappers::SolverCG linear_solver(linear_solver_control); linear_solver.initialize(*preconditioner); dealii::SolverControl solver_control(100, diff --git a/tests/slepc/step-36_parallel_02.cc b/tests/slepc/step-36_parallel_02.cc index 676c5144fe..b7cc1797d8 100644 --- a/tests/slepc/step-36_parallel_02.cc +++ b/tests/slepc/step-36_parallel_02.cc @@ -247,8 +247,7 @@ test(std::string solver_name, std::string preconditioner_name) 1e-15, /*log_history*/ false, /*log_results*/ false); - PETScWrappers::SolverCG linear_solver(linear_solver_control, - mpi_communicator); + PETScWrappers::SolverCG linear_solver(linear_solver_control); linear_solver.initialize(*preconditioner); dealii::SolverControl solver_control(100, diff --git a/tests/slepc/step-36_parallel_03.cc b/tests/slepc/step-36_parallel_03.cc index 20cde958a2..52f5ba7532 100644 --- a/tests/slepc/step-36_parallel_03.cc +++ b/tests/slepc/step-36_parallel_03.cc @@ -247,8 +247,7 @@ test(std::string solver_name, std::string preconditioner_name) 1e-15, /*log_history*/ false, /*log_results*/ false); - PETScWrappers::SolverCG linear_solver(linear_solver_control, - mpi_communicator); + PETScWrappers::SolverCG linear_solver(linear_solver_control); linear_solver.initialize(*preconditioner); dealii::SolverControl solver_control(100, -- 2.39.5