From 22af0700d666403d2df982abe5a746a1832dd9cf Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Sat, 18 Apr 2020 23:54:53 +0200 Subject: [PATCH] Remove most <> from tutorials --- examples/step-11/step-11.cc | 6 +++--- examples/step-12/step-12.cc | 4 ++-- examples/step-12b/step-12b.cc | 4 ++-- examples/step-13/step-13.cc | 10 +++++----- examples/step-14/step-14.cc | 12 ++++++------ examples/step-15/step-15.cc | 6 +++--- examples/step-16/step-16.cc | 10 +++++----- examples/step-16b/step-16b.cc | 6 +++--- examples/step-20/doc/intro.dox | 8 ++++---- examples/step-20/step-20.cc | 14 +++++++------- examples/step-21/step-21.cc | 10 +++++----- examples/step-22/step-22.cc | 8 ++++---- examples/step-23/step-23.cc | 8 ++++---- examples/step-24/step-24.cc | 4 ++-- examples/step-25/step-25.cc | 6 +++--- examples/step-26/step-26.cc | 6 +++--- examples/step-27/step-27.cc | 6 +++--- examples/step-28/step-28.cc | 12 ++++++------ examples/step-3/step-3.cc | 2 +- examples/step-30/step-30.cc | 4 ++-- examples/step-35/step-35.cc | 7 ++++--- examples/step-38/step-38.cc | 4 ++-- examples/step-4/step-4.cc | 4 ++-- examples/step-5/step-5.cc | 6 +++--- examples/step-51/step-51.cc | 4 ++-- examples/step-56/step-56.cc | 8 ++++---- examples/step-57/step-57.cc | 2 +- examples/step-6/doc/results.dox | 6 +++--- examples/step-6/step-6.cc | 6 +++--- examples/step-61/step-61.cc | 4 ++-- examples/step-63/step-63.cc | 4 ++-- examples/step-65/step-65.cc | 6 +++--- examples/step-7/step-7.cc | 6 +++--- examples/step-8/step-8.cc | 6 +++--- examples/step-9/step-9.cc | 6 +++--- 35 files changed, 113 insertions(+), 112 deletions(-) diff --git a/examples/step-11/step-11.cc b/examples/step-11/step-11.cc index 2424e1abfa..5f848fc1ae 100644 --- a/examples/step-11/step-11.cc +++ b/examples/step-11/step-11.cc @@ -388,10 +388,10 @@ namespace Step11 template void LaplaceProblem::solve() { - SolverControl solver_control(1000, 1e-12); - SolverCG<> cg(solver_control); + SolverControl solver_control(1000, 1e-12); + SolverCG> cg(solver_control); - PreconditionSSOR<> preconditioner; + PreconditionSSOR> preconditioner; preconditioner.initialize(system_matrix, 1.2); cg.solve(system_matrix, solution, system_rhs, preconditioner); diff --git a/examples/step-12/step-12.cc b/examples/step-12/step-12.cc index 9817b2636a..f77d524135 100644 --- a/examples/step-12/step-12.cc +++ b/examples/step-12/step-12.cc @@ -469,8 +469,8 @@ namespace Step12 template void AdvectionProblem::solve() { - SolverControl solver_control(1000, 1e-12); - SolverRichardson<> solver(solver_control); + SolverControl solver_control(1000, 1e-12); + SolverRichardson> solver(solver_control); // Here we create the preconditioner, PreconditionBlockSSOR> preconditioner; diff --git a/examples/step-12b/step-12b.cc b/examples/step-12b/step-12b.cc index 5c02885ecd..c5081bee3a 100644 --- a/examples/step-12b/step-12b.cc +++ b/examples/step-12b/step-12b.cc @@ -508,8 +508,8 @@ namespace Step12 template void AdvectionProblem::solve(Vector &solution) { - SolverControl solver_control(1000, 1e-12); - SolverRichardson<> solver(solver_control); + SolverControl solver_control(1000, 1e-12); + SolverRichardson> solver(solver_control); // Here we create the preconditioner, PreconditionBlockSSOR> preconditioner; diff --git a/examples/step-13/step-13.cc b/examples/step-13/step-13.cc index 5235bcd596..d77583bc2d 100644 --- a/examples/step-13/step-13.cc +++ b/examples/step-13/step-13.cc @@ -734,7 +734,7 @@ namespace Step13 template void Solver::assemble_linear_system(LinearSystem &linear_system) { - Threads::Task<> rhs_task = + Threads::Task rhs_task = Threads::new_task(&Solver::assemble_rhs, *this, linear_system.rhs); auto worker = @@ -949,7 +949,7 @@ namespace Step13 &DoFTools::make_hanging_node_constraints; // Start a side task then continue on the main thread - Threads::Task<> side_task = + Threads::Task side_task = Threads::new_task(mhnc_p, dof_handler, hanging_node_constraints); DynamicSparsityPattern dsp(dof_handler.n_dofs(), dof_handler.n_dofs()); @@ -978,10 +978,10 @@ namespace Step13 template void Solver::LinearSystem::solve(Vector &solution) const { - SolverControl solver_control(1000, 1e-12); - SolverCG<> cg(solver_control); + SolverControl solver_control(1000, 1e-12); + SolverCG> cg(solver_control); - PreconditionSSOR<> preconditioner; + PreconditionSSOR> preconditioner; preconditioner.initialize(matrix, 1.2); cg.solve(matrix, solution, rhs, preconditioner); diff --git a/examples/step-14/step-14.cc b/examples/step-14/step-14.cc index f4144a66a9..e627479892 100644 --- a/examples/step-14/step-14.cc +++ b/examples/step-14/step-14.cc @@ -519,7 +519,7 @@ namespace Step14 template void Solver::assemble_linear_system(LinearSystem &linear_system) { - Threads::Task<> rhs_task = + Threads::Task rhs_task = Threads::new_task(&Solver::assemble_rhs, *this, linear_system.rhs); auto worker = @@ -658,7 +658,7 @@ namespace Step14 &DoFTools::make_hanging_node_constraints; // Start a side task then continue on the main thread - Threads::Task<> side_task = + Threads::Task side_task = Threads::new_task(mhnc_p, dof_handler, hanging_node_constraints); DynamicSparsityPattern dsp(dof_handler.n_dofs(), dof_handler.n_dofs()); @@ -682,10 +682,10 @@ namespace Step14 template void Solver::LinearSystem::solve(Vector &solution) const { - SolverControl solver_control(5000, 1e-12); - SolverCG<> cg(solver_control); + SolverControl solver_control(5000, 1e-12); + SolverCG> cg(solver_control); - PreconditionSSOR<> preconditioner; + PreconditionSSOR> preconditioner; preconditioner.initialize(matrix, 1.2); cg.solve(matrix, solution, rhs, preconditioner); @@ -1996,7 +1996,7 @@ namespace Step14 template void WeightedResidual::solve_problem() { - Threads::TaskGroup<> tasks; + Threads::TaskGroup tasks; tasks += Threads::new_task(&WeightedResidual::solve_primal_problem, *this); tasks += diff --git a/examples/step-15/step-15.cc b/examples/step-15/step-15.cc index 8f19362f41..cbc9197de5 100644 --- a/examples/step-15/step-15.cc +++ b/examples/step-15/step-15.cc @@ -343,11 +343,11 @@ namespace Step15 template void MinimalSurfaceProblem::solve() { - SolverControl solver_control(system_rhs.size(), + SolverControl solver_control(system_rhs.size(), system_rhs.l2_norm() * 1e-6); - SolverCG<> solver(solver_control); + SolverCG> solver(solver_control); - PreconditionSSOR<> preconditioner; + PreconditionSSOR> preconditioner; preconditioner.initialize(system_matrix, 1.2); solver.solve(system_matrix, newton_update, system_rhs, preconditioner); diff --git a/examples/step-16/step-16.cc b/examples/step-16/step-16.cc index c5a850d500..e01f42dd3d 100644 --- a/examples/step-16/step-16.cc +++ b/examples/step-16/step-16.cc @@ -424,7 +424,7 @@ namespace Step16 // us, and thus the difference between this function and the previous lies // only in the setup of the assembler and the different iterators in the loop. // - // We generate an AffineConstraints<> object for each level containing the + // We generate an AffineConstraints object for each level containing the // boundary and interface dofs as constrained entries. The corresponding // object is then used to generate the level matrices. template @@ -433,7 +433,7 @@ namespace Step16 MappingQ1 mapping; const unsigned int n_levels = triangulation.n_levels(); - std::vector> boundary_constraints(n_levels); + std::vector> boundary_constraints(n_levels); for (unsigned int level = 0; level < n_levels; ++level) { IndexSet dofset; @@ -527,7 +527,7 @@ namespace Step16 FullMatrix coarse_matrix; coarse_matrix.copy_from(mg_matrices[0]); - MGCoarseGridHouseholder<> coarse_grid_solver; + MGCoarseGridHouseholder> coarse_grid_solver; coarse_grid_solver.initialize(coarse_matrix); // The next component of a multilevel solver or preconditioner is that we @@ -583,8 +583,8 @@ namespace Step16 // With all this together, we can finally get about solving the linear // system in the usual way: - SolverControl solver_control(1000, 1e-12); - SolverCG<> solver(solver_control); + SolverControl solver_control(1000, 1e-12); + SolverCG> solver(solver_control); solution = 0; diff --git a/examples/step-16b/step-16b.cc b/examples/step-16b/step-16b.cc index 4c368a89ac..947c6cfb74 100644 --- a/examples/step-16b/step-16b.cc +++ b/examples/step-16b/step-16b.cc @@ -478,7 +478,7 @@ namespace Step16 FullMatrix coarse_matrix; coarse_matrix.copy_from(mg_matrices[0]); - MGCoarseGridHouseholder<> coarse_grid_solver; + MGCoarseGridHouseholder> coarse_grid_solver; coarse_grid_solver.initialize(coarse_matrix); // The next component of a multilevel solver or preconditioner is that we @@ -534,8 +534,8 @@ namespace Step16 // With all this together, we can finally get about solving the linear // system in the usual way: - SolverControl solver_control(1000, 1e-12); - SolverCG<> solver(solver_control); + SolverControl solver_control(1000, 1e-12); + SolverCG> solver(solver_control); solution = 0; diff --git a/examples/step-20/doc/intro.dox b/examples/step-20/doc/intro.dox index bda18d18e1..246eb87f69 100644 --- a/examples/step-20/doc/intro.dox +++ b/examples/step-20/doc/intro.dox @@ -563,11 +563,11 @@ we can write: @code const auto op_M = linear_operator(M); - PreconditionJacobi<> preconditioner_M; + PreconditionJacobi> preconditioner_M; preconditioner_M.initialize(M); ReductionControl reduction_control_M(2000, 1.0e-18, 1.0e-10); - SolverCG<> solver_M(reduction_control_M); + SolverCG> solver_M(reduction_control_M); const auto op_M_inv = inverse_operator(op_M, solver_M, preconditioner_M); @endcode @@ -679,7 +679,7 @@ With these prerequisites at hand, solving for $P$ and $U$ is a matter of creating another solver and inverse: @code SolverControl solver_control_S(2000, 1.e-12); - SolverCG<> solver_S(solver_control_S); + SolverCG> solver_S(solver_control_S); PreconditionIdentity preconditioner_S; const auto op_S_inv = inverse_operator(op_S, solver_S, preconditioner_S); @@ -751,7 +751,7 @@ using an IterationNumberControl that allows us to fix the number of CG iterations that are performed to a fixed small number (in our case 30): @code IterationNumberControl iteration_number_control_aS(30, 1.e-18); - SolverCG<> solver_aS(iteration_number_control_aS); + SolverCG> solver_aS(iteration_number_control_aS); PreconditionIdentity preconditioner_aS; const auto preconditioner_S = inverse_operator(op_aS, solver_aS, preconditioner_aS); diff --git a/examples/step-20/step-20.cc b/examples/step-20/step-20.cc index 5735bc81b4..f810797066 100644 --- a/examples/step-20/step-20.cc +++ b/examples/step-20/step-20.cc @@ -609,9 +609,9 @@ namespace Step20 const auto op_M = linear_operator(M); const auto op_B = linear_operator(B); - ReductionControl reduction_control_M(2000, 1.0e-18, 1.0e-10); - SolverCG<> solver_M(reduction_control_M); - PreconditionJacobi<> preconditioner_M; + ReductionControl reduction_control_M(2000, 1.0e-18, 1.0e-10); + SolverCG> solver_M(reduction_control_M); + PreconditionJacobi> preconditioner_M; preconditioner_M.initialize(M); @@ -625,8 +625,8 @@ namespace Step20 // We now create a preconditioner out of op_aS that // applies a fixed number of 30 (inexpensive) CG iterations: - IterationNumberControl iteration_number_control_aS(30, 1.e-18); - SolverCG<> solver_aS(iteration_number_control_aS); + IterationNumberControl iteration_number_control_aS(30, 1.e-18); + SolverCG> solver_aS(iteration_number_control_aS); const auto preconditioner_S = inverse_operator(op_aS, solver_aS, PreconditionIdentity()); @@ -637,8 +637,8 @@ namespace Step20 // preconditioner we just declared. const auto schur_rhs = transpose_operator(op_B) * op_M_inv * F - G; - SolverControl solver_control_S(2000, 1.e-12); - SolverCG<> solver_S(solver_control_S); + SolverControl solver_control_S(2000, 1.e-12); + SolverCG> solver_S(solver_control_S); const auto op_S_inv = inverse_operator(op_S, solver_S, preconditioner_S); diff --git a/examples/step-21/step-21.cc b/examples/step-21/step-21.cc index ef1d9eabdd..6c22304499 100644 --- a/examples/step-21/step-21.cc +++ b/examples/step-21/step-21.cc @@ -424,7 +424,7 @@ namespace Step21 { SolverControl solver_control(std::max(src.size(), 200), 1e-8 * src.l2_norm()); - SolverCG<> cg(solver_control); + SolverCG> cg(solver_control); dst = 0; @@ -933,9 +933,9 @@ namespace Step21 approximate_schur_complement); - SolverControl solver_control(solution.block(1).size(), + SolverControl solver_control(solution.block(1).size(), 1e-12 * schur_rhs.l2_norm()); - SolverCG<> cg(solver_control); + SolverCG> cg(solver_control); cg.solve(schur_complement, solution.block(1), schur_rhs, preconditioner); @@ -972,9 +972,9 @@ namespace Step21 // onto the physically reasonable range: assemble_rhs_S(); { - SolverControl solver_control(system_matrix.block(2, 2).m(), + SolverControl solver_control(system_matrix.block(2, 2).m(), 1e-8 * system_rhs.block(2).l2_norm()); - SolverCG<> cg(solver_control); + SolverCG> cg(solver_control); cg.solve(system_matrix.block(2, 2), solution.block(2), system_rhs.block(2), diff --git a/examples/step-22/step-22.cc b/examples/step-22/step-22.cc index 71576aa9c0..8acedcae3d 100644 --- a/examples/step-22/step-22.cc +++ b/examples/step-22/step-22.cc @@ -308,8 +308,8 @@ namespace Step22 Vector & dst, const Vector &src) const { - SolverControl solver_control(src.size(), 1e-6 * src.l2_norm()); - SolverCG<> cg(solver_control); + SolverControl solver_control(src.size(), 1e-6 * src.l2_norm()); + SolverCG> cg(solver_control); dst = 0; @@ -830,9 +830,9 @@ namespace Step22 system_matrix, A_inverse); // The usual control structures for the solver call are created... - SolverControl solver_control(solution.block(1).size(), + SolverControl solver_control(solution.block(1).size(), 1e-6 * schur_rhs.l2_norm()); - SolverCG<> cg(solver_control); + SolverCG> cg(solver_control); // Now to the preconditioner to the Schur complement. As explained in // the introduction, the preconditioning is done by a mass matrix in the diff --git a/examples/step-23/step-23.cc b/examples/step-23/step-23.cc index 9fe93cf14c..d0ef39b30a 100644 --- a/examples/step-23/step-23.cc +++ b/examples/step-23/step-23.cc @@ -362,8 +362,8 @@ namespace Step23 template void WaveEquation::solve_u() { - SolverControl solver_control(1000, 1e-8 * system_rhs.l2_norm()); - SolverCG<> cg(solver_control); + SolverControl solver_control(1000, 1e-8 * system_rhs.l2_norm()); + SolverCG> cg(solver_control); cg.solve(matrix_u, solution_u, system_rhs, PreconditionIdentity()); @@ -376,8 +376,8 @@ namespace Step23 template void WaveEquation::solve_v() { - SolverControl solver_control(1000, 1e-8 * system_rhs.l2_norm()); - SolverCG<> cg(solver_control); + SolverControl solver_control(1000, 1e-8 * system_rhs.l2_norm()); + SolverCG> cg(solver_control); cg.solve(matrix_v, solution_v, system_rhs, PreconditionIdentity()); diff --git a/examples/step-24/step-24.cc b/examples/step-24/step-24.cc index e56ca18bcc..dc6dda347b 100644 --- a/examples/step-24/step-24.cc +++ b/examples/step-24/step-24.cc @@ -393,7 +393,7 @@ namespace Step24 void TATForwardProblem::solve_p() { SolverControl solver_control(1000, 1e-8 * system_rhs_p.l2_norm()); - SolverCG<> cg(solver_control); + SolverCG> cg(solver_control); cg.solve(system_matrix, solution_p, system_rhs_p, PreconditionIdentity()); @@ -407,7 +407,7 @@ namespace Step24 void TATForwardProblem::solve_v() { SolverControl solver_control(1000, 1e-8 * system_rhs_v.l2_norm()); - SolverCG<> cg(solver_control); + SolverCG> cg(solver_control); cg.solve(mass_matrix, solution_v, system_rhs_v, PreconditionIdentity()); diff --git a/examples/step-25/step-25.cc b/examples/step-25/step-25.cc index 057d813f8d..3e1e37f257 100644 --- a/examples/step-25/step-25.cc +++ b/examples/step-25/step-25.cc @@ -531,10 +531,10 @@ namespace Step25 template unsigned int SineGordonProblem::solve() { - SolverControl solver_control(1000, 1e-12 * system_rhs.l2_norm()); - SolverCG<> cg(solver_control); + SolverControl solver_control(1000, 1e-12 * system_rhs.l2_norm()); + SolverCG> cg(solver_control); - PreconditionSSOR<> preconditioner; + PreconditionSSOR> preconditioner; preconditioner.initialize(system_matrix, 1.2); cg.solve(system_matrix, solution_update, system_rhs, preconditioner); diff --git a/examples/step-26/step-26.cc b/examples/step-26/step-26.cc index 8c2f7ef4a3..02479f90ac 100644 --- a/examples/step-26/step-26.cc +++ b/examples/step-26/step-26.cc @@ -273,10 +273,10 @@ namespace Step26 template void HeatEquation::solve_time_step() { - SolverControl solver_control(1000, 1e-8 * system_rhs.l2_norm()); - SolverCG<> cg(solver_control); + SolverControl solver_control(1000, 1e-8 * system_rhs.l2_norm()); + SolverCG> cg(solver_control); - PreconditionSSOR<> preconditioner; + PreconditionSSOR> preconditioner; preconditioner.initialize(system_matrix, 1.0); cg.solve(system_matrix, solution, system_rhs, preconditioner); diff --git a/examples/step-27/step-27.cc b/examples/step-27/step-27.cc index 3152116cae..c5b4eec35f 100644 --- a/examples/step-27/step-27.cc +++ b/examples/step-27/step-27.cc @@ -374,11 +374,11 @@ namespace Step27 template void LaplaceProblem::solve() { - SolverControl solver_control(system_rhs.size(), + SolverControl solver_control(system_rhs.size(), 1e-12 * system_rhs.l2_norm()); - SolverCG<> cg(solver_control); + SolverCG> cg(solver_control); - PreconditionSSOR<> preconditioner; + PreconditionSSOR> preconditioner; preconditioner.initialize(system_matrix, 1.2); cg.solve(system_matrix, solution, system_rhs, preconditioner); diff --git a/examples/step-28/step-28.cc b/examples/step-28/step-28.cc index f3e3be760e..f930c5f814 100644 --- a/examples/step-28/step-28.cc +++ b/examples/step-28/step-28.cc @@ -1014,11 +1014,11 @@ namespace Step28 solution, system_rhs); - SolverControl solver_control(system_matrix.m(), + SolverControl solver_control(system_matrix.m(), 1e-12 * system_rhs.l2_norm()); - SolverCG<> cg(solver_control); + SolverCG> cg(solver_control); - PreconditionSSOR<> preconditioner; + PreconditionSSOR> preconditioner; preconditioner.initialize(system_matrix, 1.2); cg.solve(system_matrix, solution, system_rhs, preconditioner); @@ -1525,7 +1525,7 @@ namespace Step28 BlockVector group_error_indicators(n_cells); { - Threads::ThreadGroup<> threads; + Threads::ThreadGroup threads; for (unsigned int group = 0; group < parameters.n_groups; ++group) threads += Threads::new_thread(&EnergyGroup::estimate_errors, *energy_groups[group], @@ -1538,7 +1538,7 @@ namespace Step28 const float coarsen_threshold = 0.01 * max_error; { - Threads::ThreadGroup<> threads; + Threads::ThreadGroup threads; for (unsigned int group = 0; group < parameters.n_groups; ++group) threads += Threads::new_thread(&EnergyGroup::refine_grid, *energy_groups[group], @@ -1612,7 +1612,7 @@ namespace Step28 std::cout << std::endl << std::endl; - Threads::ThreadGroup<> threads; + Threads::ThreadGroup threads; for (unsigned int group = 0; group < parameters.n_groups; ++group) threads += Threads::new_thread(&EnergyGroup::assemble_system_matrix, diff --git a/examples/step-3/step-3.cc b/examples/step-3/step-3.cc index c9a1f2ee6e..71472edbcf 100644 --- a/examples/step-3/step-3.cc +++ b/examples/step-3/step-3.cc @@ -552,7 +552,7 @@ void Step3::solve() // class is the type of the vectors, but the empty angle brackets indicate // that we simply take the default argument (which is // Vector@): - SolverCG<> solver(solver_control); + SolverCG> solver(solver_control); // Now solve the system of equations. The CG solver takes a preconditioner // as its fourth argument. We don't feel ready to delve into this yet, so we diff --git a/examples/step-30/step-30.cc b/examples/step-30/step-30.cc index d3cd72b612..a25766ff87 100644 --- a/examples/step-30/step-30.cc +++ b/examples/step-30/step-30.cc @@ -641,8 +641,8 @@ namespace Step30 template void DGMethod::solve(Vector &solution) { - SolverControl solver_control(1000, 1e-12, false, false); - SolverRichardson<> solver(solver_control); + SolverControl solver_control(1000, 1e-12, false, false); + SolverRichardson> solver(solver_control); PreconditionBlockSSOR> preconditioner; diff --git a/examples/step-35/step-35.cc b/examples/step-35/step-35.cc index 8a7f0b6bfe..bfda44b687 100644 --- a/examples/step-35/step-35.cc +++ b/examples/step-35/step-35.cc @@ -1117,8 +1117,9 @@ namespace Step35 NavierStokesProjection::diffusion_component_solve(const unsigned int d) { SolverControl solver_control(vel_max_its, vel_eps * force[d].l2_norm()); - SolverGMRES<> gmres(solver_control, - SolverGMRES<>::AdditionalData(vel_Krylov_size)); + SolverGMRES> gmres( + solver_control, + SolverGMRES>::AdditionalData(vel_Krylov_size)); gmres.solve(vel_it_matrix[d], u_n[d], force[d], prec_velocity[d]); } @@ -1236,7 +1237,7 @@ namespace Step35 vel_diag_strength, vel_off_diagonals)); SolverControl solvercontrol(vel_max_its, vel_eps * pres_tmp.l2_norm()); - SolverCG<> cg(solvercontrol); + SolverCG> cg(solvercontrol); cg.solve(pres_iterative, phi_n, pres_tmp, prec_pres_Laplace); phi_n *= 1.5 / dt; diff --git a/examples/step-38/step-38.cc b/examples/step-38/step-38.cc index 0427b2e089..c9de79bc91 100644 --- a/examples/step-38/step-38.cc +++ b/examples/step-38/step-38.cc @@ -424,9 +424,9 @@ namespace Step38 void LaplaceBeltramiProblem::solve() { SolverControl solver_control(solution.size(), 1e-7 * system_rhs.l2_norm()); - SolverCG<> cg(solver_control); + SolverCG> cg(solver_control); - PreconditionSSOR<> preconditioner; + PreconditionSSOR> preconditioner; preconditioner.initialize(system_matrix, 1.2); cg.solve(system_matrix, solution, system_rhs, preconditioner); diff --git a/examples/step-4/step-4.cc b/examples/step-4/step-4.cc index f9aed11544..c68a664082 100644 --- a/examples/step-4/step-4.cc +++ b/examples/step-4/step-4.cc @@ -453,8 +453,8 @@ void Step4::assemble_system() template void Step4::solve() { - SolverControl solver_control(1000, 1e-12); - SolverCG<> solver(solver_control); + SolverControl solver_control(1000, 1e-12); + SolverCG> solver(solver_control); solver.solve(system_matrix, solution, system_rhs, PreconditionIdentity()); // We have made one addition, though: since we suppress output from the diff --git a/examples/step-5/step-5.cc b/examples/step-5/step-5.cc index fd191d7163..4da722c5b1 100644 --- a/examples/step-5/step-5.cc +++ b/examples/step-5/step-5.cc @@ -264,10 +264,10 @@ void Step5::assemble_system() template void Step5::solve() { - SolverControl solver_control(1000, 1e-12); - SolverCG<> solver(solver_control); + SolverControl solver_control(1000, 1e-12); + SolverCG> solver(solver_control); - PreconditionSSOR<> preconditioner; + PreconditionSSOR> preconditioner; preconditioner.initialize(system_matrix, 1.2); solver.solve(system_matrix, solution, system_rhs, preconditioner); diff --git a/examples/step-51/step-51.cc b/examples/step-51/step-51.cc index b3bdb43b81..f9ab7dcf33 100644 --- a/examples/step-51/step-51.cc +++ b/examples/step-51/step-51.cc @@ -969,9 +969,9 @@ namespace Step51 template void HDG::solve() { - SolverControl solver_control(system_matrix.m() * 10, + SolverControl solver_control(system_matrix.m() * 10, 1e-11 * system_rhs.l2_norm()); - SolverBicgstab<> solver(solver_control); + SolverBicgstab> solver(solver_control); solver.solve(system_matrix, solution, system_rhs, PreconditionIdentity()); std::cout << " Number of BiCGStab iterations: " diff --git a/examples/step-56/step-56.cc b/examples/step-56/step-56.cc index e02b9780c1..b3e1d45182 100644 --- a/examples/step-56/step-56.cc +++ b/examples/step-56/step-56.cc @@ -361,7 +361,7 @@ namespace Step56 // First solve with the approximation for S { SolverControl solver_control(1000, 1e-6 * src.block(1).l2_norm()); - SolverCG<> cg(solver_control); + SolverCG> cg(solver_control); dst.block(1) = 0.0; cg.solve(schur_complement_matrix, @@ -384,8 +384,8 @@ namespace Step56 // or just apply one preconditioner sweep if (do_solve_A == true) { - SolverControl solver_control(10000, utmp.l2_norm() * 1e-4); - SolverCG<> cg(solver_control); + SolverControl solver_control(10000, utmp.l2_norm() * 1e-4); + SolverCG> cg(solver_control); dst.block(0) = 0.0; cg.solve(system_matrix.block(0, 0), @@ -884,7 +884,7 @@ namespace Step56 // Setup coarse grid solver FullMatrix coarse_matrix; coarse_matrix.copy_from(mg_matrices[0]); - MGCoarseGridHouseholder<> coarse_grid_solver; + MGCoarseGridHouseholder> coarse_grid_solver; coarse_grid_solver.initialize(coarse_matrix); using Smoother = PreconditionSOR>; diff --git a/examples/step-57/step-57.cc b/examples/step-57/step-57.cc index 31327e3295..c5255bf90c 100644 --- a/examples/step-57/step-57.cc +++ b/examples/step-57/step-57.cc @@ -235,7 +235,7 @@ namespace Step57 { SolverControl solver_control(1000, 1e-6 * src.block(1).l2_norm()); - SolverCG<> cg(solver_control); + SolverCG> cg(solver_control); dst.block(1) = 0.0; cg.solve(pressure_mass_matrix, diff --git a/examples/step-6/doc/results.dox b/examples/step-6/doc/results.dox index 8cf353f81c..b86c603ec5 100644 --- a/examples/step-6/doc/results.dox +++ b/examples/step-6/doc/results.dox @@ -128,17 +128,17 @@ up for grabs. In deal.II, it is relatively simple to change the preconditioner. For example, by changing the existing lines of code @code - PreconditionSSOR<> preconditioner; + PreconditionSSOR> preconditioner; preconditioner.initialize(system_matrix, 1.2); @endcode into @code - PreconditionSSOR<> preconditioner; + PreconditionSSOR> preconditioner; preconditioner.initialize(system_matrix, 1.0); @endcode we can try out different relaxation parameters for SSOR. By using @code - PreconditionJacobi<> preconditioner; + PreconditionJacobi> preconditioner; preconditioner.initialize(system_matrix); @endcode we can use Jacobi as a preconditioner. And by using diff --git a/examples/step-6/step-6.cc b/examples/step-6/step-6.cc index a8cf3bf413..f88995e82b 100644 --- a/examples/step-6/step-6.cc +++ b/examples/step-6/step-6.cc @@ -335,10 +335,10 @@ void Step6::assemble_system() template void Step6::solve() { - SolverControl solver_control(1000, 1e-12); - SolverCG<> solver(solver_control); + SolverControl solver_control(1000, 1e-12); + SolverCG> solver(solver_control); - PreconditionSSOR<> preconditioner; + PreconditionSSOR> preconditioner; preconditioner.initialize(system_matrix, 1.2); solver.solve(system_matrix, solution, system_rhs, preconditioner); diff --git a/examples/step-61/step-61.cc b/examples/step-61/step-61.cc index 1e987d2dec..7f8f027c37 100644 --- a/examples/step-61/step-61.cc +++ b/examples/step-61/step-61.cc @@ -603,8 +603,8 @@ namespace Step61 template void WGDarcyEquation::solve() { - SolverControl solver_control(1000, 1e-8 * system_rhs.l2_norm()); - SolverCG<> solver(solver_control); + SolverControl solver_control(1000, 1e-8 * system_rhs.l2_norm()); + SolverCG> solver(solver_control); solver.solve(system_matrix, solution, system_rhs, PreconditionIdentity()); constraints.distribute(solution); } diff --git a/examples/step-63/step-63.cc b/examples/step-63/step-63.cc index 88937cc992..977cabe30f 100644 --- a/examples/step-63/step-63.cc +++ b/examples/step-63/step-63.cc @@ -1083,8 +1083,8 @@ namespace Step63 std::cout << " Solving with GMRES to tol " << solve_tolerance << "..." << std::endl; - SolverGMRES<> solver(solver_control, - SolverGMRES<>::AdditionalData(50, true)); + SolverGMRES> solver( + solver_control, SolverGMRES>::AdditionalData(50, true)); Timer time; time.start(); diff --git a/examples/step-65/step-65.cc b/examples/step-65/step-65.cc index 9ea786db42..6e70e4140f 100644 --- a/examples/step-65/step-65.cc +++ b/examples/step-65/step-65.cc @@ -430,10 +430,10 @@ namespace Step65 { TimerOutput::Scope scope(timer, "Solve linear system"); - SolverControl solver_control(1000, 1e-12); - SolverCG<> solver(solver_control); + SolverControl solver_control(1000, 1e-12); + SolverCG> solver(solver_control); - PreconditionJacobi<> preconditioner; + PreconditionJacobi> preconditioner; preconditioner.initialize(system_matrix); solver.solve(system_matrix, solution, system_rhs, preconditioner); diff --git a/examples/step-7/step-7.cc b/examples/step-7/step-7.cc index 71d612aa13..c413a50eae 100644 --- a/examples/step-7/step-7.cc +++ b/examples/step-7/step-7.cc @@ -724,10 +724,10 @@ namespace Step7 template void HelmholtzProblem::solve() { - SolverControl solver_control(1000, 1e-12); - SolverCG<> cg(solver_control); + SolverControl solver_control(1000, 1e-12); + SolverCG> cg(solver_control); - PreconditionSSOR<> preconditioner; + PreconditionSSOR> preconditioner; preconditioner.initialize(system_matrix, 1.2); cg.solve(system_matrix, solution, system_rhs, preconditioner); diff --git a/examples/step-8/step-8.cc b/examples/step-8/step-8.cc index c3dfd3aeb1..1ed0358503 100644 --- a/examples/step-8/step-8.cc +++ b/examples/step-8/step-8.cc @@ -422,10 +422,10 @@ namespace Step8 template void ElasticProblem::solve() { - SolverControl solver_control(1000, 1e-12); - SolverCG<> cg(solver_control); + SolverControl solver_control(1000, 1e-12); + SolverCG> cg(solver_control); - PreconditionSSOR<> preconditioner; + PreconditionSSOR> preconditioner; preconditioner.initialize(system_matrix, 1.2); cg.solve(system_matrix, solution, system_rhs, preconditioner); diff --git a/examples/step-9/step-9.cc b/examples/step-9/step-9.cc index 37f4dbb5dd..4858b995cc 100644 --- a/examples/step-9/step-9.cc +++ b/examples/step-9/step-9.cc @@ -765,11 +765,11 @@ namespace Step9 template void AdvectionProblem::solve() { - SolverControl solver_control(std::max(1000, + SolverControl solver_control(std::max(1000, system_rhs.size() / 10), 1e-10 * system_rhs.l2_norm()); - SolverGMRES<> solver(solver_control); - PreconditionJacobi<> preconditioner; + SolverGMRES> solver(solver_control); + PreconditionJacobi> preconditioner; preconditioner.initialize(system_matrix, 1.0); solver.solve(system_matrix, solution, system_rhs, preconditioner); -- 2.39.5