]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove most <> from tutorials 9926/head
authorPeter Munch <peterrmuench@gmail.com>
Sat, 18 Apr 2020 21:54:53 +0000 (23:54 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Sun, 19 Apr 2020 20:34:27 +0000 (22:34 +0200)
35 files changed:
examples/step-11/step-11.cc
examples/step-12/step-12.cc
examples/step-12b/step-12b.cc
examples/step-13/step-13.cc
examples/step-14/step-14.cc
examples/step-15/step-15.cc
examples/step-16/step-16.cc
examples/step-16b/step-16b.cc
examples/step-20/doc/intro.dox
examples/step-20/step-20.cc
examples/step-21/step-21.cc
examples/step-22/step-22.cc
examples/step-23/step-23.cc
examples/step-24/step-24.cc
examples/step-25/step-25.cc
examples/step-26/step-26.cc
examples/step-27/step-27.cc
examples/step-28/step-28.cc
examples/step-3/step-3.cc
examples/step-30/step-30.cc
examples/step-35/step-35.cc
examples/step-38/step-38.cc
examples/step-4/step-4.cc
examples/step-5/step-5.cc
examples/step-51/step-51.cc
examples/step-56/step-56.cc
examples/step-57/step-57.cc
examples/step-6/doc/results.dox
examples/step-6/step-6.cc
examples/step-61/step-61.cc
examples/step-63/step-63.cc
examples/step-65/step-65.cc
examples/step-7/step-7.cc
examples/step-8/step-8.cc
examples/step-9/step-9.cc

index 2424e1abfaa2fd78ac9ded1062565f1eede22ea9..5f848fc1aec0589121fe6178c81c3289e861cbc7 100644 (file)
@@ -388,10 +388,10 @@ namespace Step11
   template <int dim>
   void LaplaceProblem<dim>::solve()
   {
-    SolverControl solver_control(1000, 1e-12);
-    SolverCG<>    cg(solver_control);
+    SolverControl            solver_control(1000, 1e-12);
+    SolverCG<Vector<double>> cg(solver_control);
 
-    PreconditionSSOR<> preconditioner;
+    PreconditionSSOR<SparseMatrix<double>> preconditioner;
     preconditioner.initialize(system_matrix, 1.2);
 
     cg.solve(system_matrix, solution, system_rhs, preconditioner);
index 9817b2636aca7cff18e8f647cb54df6ed2542ec7..f77d524135d4ab120d7e5a3ac17df20ab4fb34d5 100644 (file)
@@ -469,8 +469,8 @@ namespace Step12
   template <int dim>
   void AdvectionProblem<dim>::solve()
   {
-    SolverControl      solver_control(1000, 1e-12);
-    SolverRichardson<> solver(solver_control);
+    SolverControl                    solver_control(1000, 1e-12);
+    SolverRichardson<Vector<double>> solver(solver_control);
 
     // Here we create the preconditioner,
     PreconditionBlockSSOR<SparseMatrix<double>> preconditioner;
index 5c02885ecdb27ffa4f9d129a02ce627d858993e0..c5081bee3a28f28b9c5b74145743ea48f1b01485 100644 (file)
@@ -508,8 +508,8 @@ namespace Step12
   template <int dim>
   void AdvectionProblem<dim>::solve(Vector<double> &solution)
   {
-    SolverControl      solver_control(1000, 1e-12);
-    SolverRichardson<> solver(solver_control);
+    SolverControl                    solver_control(1000, 1e-12);
+    SolverRichardson<Vector<double>> solver(solver_control);
 
     // Here we create the preconditioner,
     PreconditionBlockSSOR<SparseMatrix<double>> preconditioner;
index 5235bcd596c6388188ae7dca9dc48b0676b561d5..d77583bc2de72907f3a031479e2b15c4aec64ba2 100644 (file)
@@ -734,7 +734,7 @@ namespace Step13
     template <int dim>
     void Solver<dim>::assemble_linear_system(LinearSystem &linear_system)
     {
-      Threads::Task<> rhs_task =
+      Threads::Task<void> rhs_task =
         Threads::new_task(&Solver<dim>::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<void> 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 <int dim>
     void Solver<dim>::LinearSystem::solve(Vector<double> &solution) const
     {
-      SolverControl solver_control(1000, 1e-12);
-      SolverCG<>    cg(solver_control);
+      SolverControl            solver_control(1000, 1e-12);
+      SolverCG<Vector<double>> cg(solver_control);
 
-      PreconditionSSOR<> preconditioner;
+      PreconditionSSOR<SparseMatrix<double>> preconditioner;
       preconditioner.initialize(matrix, 1.2);
 
       cg.solve(matrix, solution, rhs, preconditioner);
index f4144a66a9b26b71f9c137b59fcd887cc4916655..e6274798927d88a307be91f6474c4d7f76817790 100644 (file)
@@ -519,7 +519,7 @@ namespace Step14
     template <int dim>
     void Solver<dim>::assemble_linear_system(LinearSystem &linear_system)
     {
-      Threads::Task<> rhs_task =
+      Threads::Task<void> rhs_task =
         Threads::new_task(&Solver<dim>::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<void> 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 <int dim>
     void Solver<dim>::LinearSystem::solve(Vector<double> &solution) const
     {
-      SolverControl solver_control(5000, 1e-12);
-      SolverCG<>    cg(solver_control);
+      SolverControl            solver_control(5000, 1e-12);
+      SolverCG<Vector<double>> cg(solver_control);
 
-      PreconditionSSOR<> preconditioner;
+      PreconditionSSOR<SparseMatrix<double>> preconditioner;
       preconditioner.initialize(matrix, 1.2);
 
       cg.solve(matrix, solution, rhs, preconditioner);
@@ -1996,7 +1996,7 @@ namespace Step14
     template <int dim>
     void WeightedResidual<dim>::solve_problem()
     {
-      Threads::TaskGroup<> tasks;
+      Threads::TaskGroup<void> tasks;
       tasks +=
         Threads::new_task(&WeightedResidual<dim>::solve_primal_problem, *this);
       tasks +=
index 8f19362f410a46427b7e12eebcd616310485fea9..cbc9197de5c46ba0c35d2167632e5e84001d6492 100644 (file)
@@ -343,11 +343,11 @@ namespace Step15
   template <int dim>
   void MinimalSurfaceProblem<dim>::solve()
   {
-    SolverControl solver_control(system_rhs.size(),
+    SolverControl            solver_control(system_rhs.size(),
                                  system_rhs.l2_norm() * 1e-6);
-    SolverCG<>    solver(solver_control);
+    SolverCG<Vector<double>> solver(solver_control);
 
-    PreconditionSSOR<> preconditioner;
+    PreconditionSSOR<SparseMatrix<double>> preconditioner;
     preconditioner.initialize(system_matrix, 1.2);
 
     solver.solve(system_matrix, newton_update, system_rhs, preconditioner);
index c5a850d50082570341fa49bb1ee6f501392154a9..e01f42dd3df904fb6baf39de5dd3028a770a3322 100644 (file)
@@ -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 <int dim>
@@ -433,7 +433,7 @@ namespace Step16
     MappingQ1<dim>     mapping;
     const unsigned int n_levels = triangulation.n_levels();
 
-    std::vector<AffineConstraints<>> boundary_constraints(n_levels);
+    std::vector<AffineConstraints<double>> boundary_constraints(n_levels);
     for (unsigned int level = 0; level < n_levels; ++level)
       {
         IndexSet dofset;
@@ -527,7 +527,7 @@ namespace Step16
 
     FullMatrix<double> coarse_matrix;
     coarse_matrix.copy_from(mg_matrices[0]);
-    MGCoarseGridHouseholder<> coarse_grid_solver;
+    MGCoarseGridHouseholder<double, Vector<double>> 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<Vector<double>> solver(solver_control);
 
     solution = 0;
 
index 4c368a89ac04345f8591499cc56564c86033de47..947c6cfb74b0ce7d67de759640a5a1d6489bdbd7 100644 (file)
@@ -478,7 +478,7 @@ namespace Step16
 
     FullMatrix<double> coarse_matrix;
     coarse_matrix.copy_from(mg_matrices[0]);
-    MGCoarseGridHouseholder<> coarse_grid_solver;
+    MGCoarseGridHouseholder<double, Vector<double>> 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<Vector<double>> solver(solver_control);
 
     solution = 0;
 
index bda18d18e11690ad923ba64908754fbb5e2bf0c1..246eb87f694e5b5b4903986cbf248e013a7448ff 100644 (file)
@@ -563,11 +563,11 @@ we can write:
 @code
     const auto op_M = linear_operator(M);
 
-    PreconditionJacobi<> preconditioner_M;
+    PreconditionJacobi<SparseMatrix<double>> preconditioner_M;
     preconditioner_M.initialize(M);
 
     ReductionControl reduction_control_M(2000, 1.0e-18, 1.0e-10);
-    SolverCG<>    solver_M(reduction_control_M);
+    SolverCG<Vector<double>>    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<Vector<double>>    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<Vector<double>>           solver_aS(iteration_number_control_aS);
     PreconditionIdentity preconditioner_aS;
     const auto preconditioner_S =
       inverse_operator(op_aS, solver_aS, preconditioner_aS);
index 5735bc81b4ec9eaa1bd6a6e3604ab773cf29a727..f8107970665079b989d250e50c3de4ac81793ab4 100644 (file)
@@ -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<Vector<double>> solver_M(reduction_control_M);
+    PreconditionJacobi<SparseMatrix<double>> preconditioner_M;
 
     preconditioner_M.initialize(M);
 
@@ -625,8 +625,8 @@ namespace Step20
 
     // We now create a preconditioner out of <code>op_aS</code> 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<Vector<double>> 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<Vector<double>> solver_S(solver_control_S);
 
     const auto op_S_inv = inverse_operator(op_S, solver_S, preconditioner_S);
 
index ef1d9eabdd3832a795697799bd8d5acc7e1d6270..6c22304499dd46f4beb5dc79234030a1a37179c9 100644 (file)
@@ -424,7 +424,7 @@ namespace Step21
     {
       SolverControl solver_control(std::max<unsigned int>(src.size(), 200),
                                    1e-8 * src.l2_norm());
-      SolverCG<>    cg(solver_control);
+      SolverCG<Vector<double>> 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<Vector<double>> 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<Vector<double>> cg(solver_control);
       cg.solve(system_matrix.block(2, 2),
                solution.block(2),
                system_rhs.block(2),
index 71576aa9c039f182f8db53de65b9170b91a02782..8acedcae3df391228cb7b0439e4a14f51be98e60 100644 (file)
@@ -308,8 +308,8 @@ namespace Step22
     Vector<double> &      dst,
     const Vector<double> &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<Vector<double>> 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<Vector<double>> 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
index 9fe93cf14ca9835c4cd5f2e7887b57332e642013..d0ef39b30a28c8c0a69b584af6535860c6b0f4e0 100644 (file)
@@ -362,8 +362,8 @@ namespace Step23
   template <int dim>
   void WaveEquation<dim>::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<Vector<double>> cg(solver_control);
 
     cg.solve(matrix_u, solution_u, system_rhs, PreconditionIdentity());
 
@@ -376,8 +376,8 @@ namespace Step23
   template <int dim>
   void WaveEquation<dim>::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<Vector<double>> cg(solver_control);
 
     cg.solve(matrix_v, solution_v, system_rhs, PreconditionIdentity());
 
index e56ca18bcc0043d7f9faf8085250e588fdbd5da2..dc6dda347be5b3f070af7b21161e6219851b115e 100644 (file)
@@ -393,7 +393,7 @@ namespace Step24
   void TATForwardProblem<dim>::solve_p()
   {
     SolverControl solver_control(1000, 1e-8 * system_rhs_p.l2_norm());
-    SolverCG<>    cg(solver_control);
+    SolverCG<Vector<double>> cg(solver_control);
 
     cg.solve(system_matrix, solution_p, system_rhs_p, PreconditionIdentity());
 
@@ -407,7 +407,7 @@ namespace Step24
   void TATForwardProblem<dim>::solve_v()
   {
     SolverControl solver_control(1000, 1e-8 * system_rhs_v.l2_norm());
-    SolverCG<>    cg(solver_control);
+    SolverCG<Vector<double>> cg(solver_control);
 
     cg.solve(mass_matrix, solution_v, system_rhs_v, PreconditionIdentity());
 
index 057d813f8d25605175b8f268e2d10e123846ea21..3e1e37f257e7f0e32ddf911ecd16dba0179a95b1 100644 (file)
@@ -531,10 +531,10 @@ namespace Step25
   template <int dim>
   unsigned int SineGordonProblem<dim>::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<Vector<double>> cg(solver_control);
 
-    PreconditionSSOR<> preconditioner;
+    PreconditionSSOR<SparseMatrix<double>> preconditioner;
     preconditioner.initialize(system_matrix, 1.2);
 
     cg.solve(system_matrix, solution_update, system_rhs, preconditioner);
index 8c2f7ef4a358cdab898ab614713128340eacf2fb..02479f90ac883f98e3ccce920e3652897507ec5f 100644 (file)
@@ -273,10 +273,10 @@ namespace Step26
   template <int dim>
   void HeatEquation<dim>::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<Vector<double>> cg(solver_control);
 
-    PreconditionSSOR<> preconditioner;
+    PreconditionSSOR<SparseMatrix<double>> preconditioner;
     preconditioner.initialize(system_matrix, 1.0);
 
     cg.solve(system_matrix, solution, system_rhs, preconditioner);
index 3152116caef08774557be8646962613017420cf8..c5b4eec35fd9e94ad6f00d62d46f2e56e169494e 100644 (file)
@@ -374,11 +374,11 @@ namespace Step27
   template <int dim>
   void LaplaceProblem<dim>::solve()
   {
-    SolverControl solver_control(system_rhs.size(),
+    SolverControl            solver_control(system_rhs.size(),
                                  1e-12 * system_rhs.l2_norm());
-    SolverCG<>    cg(solver_control);
+    SolverCG<Vector<double>> cg(solver_control);
 
-    PreconditionSSOR<> preconditioner;
+    PreconditionSSOR<SparseMatrix<double>> preconditioner;
     preconditioner.initialize(system_matrix, 1.2);
 
     cg.solve(system_matrix, solution, system_rhs, preconditioner);
index f3e3be760e4cef567a2cbe179b2e2d5f265cf975..f930c5f8145a666ff7f34f9f4129a1edded71e21 100644 (file)
@@ -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<Vector<double>> cg(solver_control);
 
-    PreconditionSSOR<> preconditioner;
+    PreconditionSSOR<SparseMatrix<double>> preconditioner;
     preconditioner.initialize(system_matrix, 1.2);
 
     cg.solve(system_matrix, solution, system_rhs, preconditioner);
@@ -1525,7 +1525,7 @@ namespace Step28
     BlockVector<float> group_error_indicators(n_cells);
 
     {
-      Threads::ThreadGroup<> threads;
+      Threads::ThreadGroup<void> threads;
       for (unsigned int group = 0; group < parameters.n_groups; ++group)
         threads += Threads::new_thread(&EnergyGroup<dim>::estimate_errors,
                                        *energy_groups[group],
@@ -1538,7 +1538,7 @@ namespace Step28
     const float coarsen_threshold = 0.01 * max_error;
 
     {
-      Threads::ThreadGroup<> threads;
+      Threads::ThreadGroup<void> threads;
       for (unsigned int group = 0; group < parameters.n_groups; ++group)
         threads += Threads::new_thread(&EnergyGroup<dim>::refine_grid,
                                        *energy_groups[group],
@@ -1612,7 +1612,7 @@ namespace Step28
         std::cout << std::endl << std::endl;
 
 
-        Threads::ThreadGroup<> threads;
+        Threads::ThreadGroup<void> threads;
         for (unsigned int group = 0; group < parameters.n_groups; ++group)
           threads +=
             Threads::new_thread(&EnergyGroup<dim>::assemble_system_matrix,
index c9a1f2ee6ec208ff758197da49bcb73bad14485d..71472edbcf2af302d0c9d829f4bb1666621d9608 100644 (file)
@@ -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
   // <code>Vector@<double@></code>):
-  SolverCG<> solver(solver_control);
+  SolverCG<Vector<double>> 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
index d3cd72b61292672c3d2cd6a41b551b951bb80e84..a25766ff87cafebabd4732f15bfb70257968f7a5 100644 (file)
@@ -641,8 +641,8 @@ namespace Step30
   template <int dim>
   void DGMethod<dim>::solve(Vector<double> &solution)
   {
-    SolverControl      solver_control(1000, 1e-12, false, false);
-    SolverRichardson<> solver(solver_control);
+    SolverControl                    solver_control(1000, 1e-12, false, false);
+    SolverRichardson<Vector<double>> solver(solver_control);
 
     PreconditionBlockSSOR<SparseMatrix<double>> preconditioner;
 
index 8a7f0b6bfe81df8b238718bd0040e2af3f51b452..bfda44b687eccf4a292e63d45500ce23b20165d0 100644 (file)
@@ -1117,8 +1117,9 @@ namespace Step35
   NavierStokesProjection<dim>::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<Vector<double>> gmres(
+      solver_control,
+      SolverGMRES<Vector<double>>::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<Vector<double>> cg(solvercontrol);
     cg.solve(pres_iterative, phi_n, pres_tmp, prec_pres_Laplace);
 
     phi_n *= 1.5 / dt;
index 0427b2e0893c0a7c27d17fefb5be9bbc30e446b9..c9de79bc91d4b7ff0ac6aafd831caf0637c2a916 100644 (file)
@@ -424,9 +424,9 @@ namespace Step38
   void LaplaceBeltramiProblem<spacedim>::solve()
   {
     SolverControl solver_control(solution.size(), 1e-7 * system_rhs.l2_norm());
-    SolverCG<>    cg(solver_control);
+    SolverCG<Vector<double>> cg(solver_control);
 
-    PreconditionSSOR<> preconditioner;
+    PreconditionSSOR<SparseMatrix<double>> preconditioner;
     preconditioner.initialize(system_matrix, 1.2);
 
     cg.solve(system_matrix, solution, system_rhs, preconditioner);
index f9aed11544f0aa81a2903443bd18a83b3e845d61..c68a6640825794fc8607d1a6a57e44c5c8a0dd73 100644 (file)
@@ -453,8 +453,8 @@ void Step4<dim>::assemble_system()
 template <int dim>
 void Step4<dim>::solve()
 {
-  SolverControl solver_control(1000, 1e-12);
-  SolverCG<>    solver(solver_control);
+  SolverControl            solver_control(1000, 1e-12);
+  SolverCG<Vector<double>> solver(solver_control);
   solver.solve(system_matrix, solution, system_rhs, PreconditionIdentity());
 
   // We have made one addition, though: since we suppress output from the
index fd191d71639346277be4177f4d1a815248f22e28..4da722c5b1d1c438e5192f09744cf691c42e7dfd 100644 (file)
@@ -264,10 +264,10 @@ void Step5<dim>::assemble_system()
 template <int dim>
 void Step5<dim>::solve()
 {
-  SolverControl solver_control(1000, 1e-12);
-  SolverCG<>    solver(solver_control);
+  SolverControl            solver_control(1000, 1e-12);
+  SolverCG<Vector<double>> solver(solver_control);
 
-  PreconditionSSOR<> preconditioner;
+  PreconditionSSOR<SparseMatrix<double>> preconditioner;
   preconditioner.initialize(system_matrix, 1.2);
 
   solver.solve(system_matrix, solution, system_rhs, preconditioner);
index b3bdb43b8183b9829bcca94ba7bb39f88659f92f..f9ab7dcf339bd0ade0e02c1d06302d941d386fd5 100644 (file)
@@ -969,9 +969,9 @@ namespace Step51
   template <int dim>
   void HDG<dim>::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<Vector<double>> solver(solver_control);
     solver.solve(system_matrix, solution, system_rhs, PreconditionIdentity());
 
     std::cout << "   Number of BiCGStab iterations: "
index e02b9780c11bcd705eae6d41a19ef5a0646fb85a..b3e1d4518245f30d720ee3e78f1a005584f9ec0d 100644 (file)
@@ -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<Vector<double>> 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<Vector<double>> 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<double> coarse_matrix;
         coarse_matrix.copy_from(mg_matrices[0]);
-        MGCoarseGridHouseholder<> coarse_grid_solver;
+        MGCoarseGridHouseholder<double, Vector<double>> coarse_grid_solver;
         coarse_grid_solver.initialize(coarse_matrix);
 
         using Smoother = PreconditionSOR<SparseMatrix<double>>;
index 31327e3295db529d4964b51cc411f6a5ee4a0256..c5255bf90c633721709f66ef303586e70a4042d1 100644 (file)
@@ -235,7 +235,7 @@ namespace Step57
 
     {
       SolverControl solver_control(1000, 1e-6 * src.block(1).l2_norm());
-      SolverCG<>    cg(solver_control);
+      SolverCG<Vector<double>> cg(solver_control);
 
       dst.block(1) = 0.0;
       cg.solve(pressure_mass_matrix,
index 8cf353f81c6141e9cf819c8721d5086a437f14de..b86c603ec58e8d473f9c3b507ff3d39f196f57b4 100644 (file)
@@ -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<SparseMatrix<double>> preconditioner;
   preconditioner.initialize(system_matrix, 1.2);
 @endcode
 into
 @code
-  PreconditionSSOR<> preconditioner;
+  PreconditionSSOR<SparseMatrix<double>> preconditioner;
   preconditioner.initialize(system_matrix, 1.0);
 @endcode
 we can try out different relaxation parameters for SSOR. By using
 @code
-  PreconditionJacobi<> preconditioner;
+  PreconditionJacobi<SparseMatrix<double>> preconditioner;
   preconditioner.initialize(system_matrix);
 @endcode
 we can use Jacobi as a preconditioner. And by using
index a8cf3bf413abb66eac1f797ce08a86ec66342db2..f88995e82b677f0da3f03e6163a157adc5b5e770 100644 (file)
@@ -335,10 +335,10 @@ void Step6<dim>::assemble_system()
 template <int dim>
 void Step6<dim>::solve()
 {
-  SolverControl solver_control(1000, 1e-12);
-  SolverCG<>    solver(solver_control);
+  SolverControl            solver_control(1000, 1e-12);
+  SolverCG<Vector<double>> solver(solver_control);
 
-  PreconditionSSOR<> preconditioner;
+  PreconditionSSOR<SparseMatrix<double>> preconditioner;
   preconditioner.initialize(system_matrix, 1.2);
 
   solver.solve(system_matrix, solution, system_rhs, preconditioner);
index 1e987d2decbae2fd7ec90b498122280f7eea758d..7f8f027c3797282e0d8b30167365642a835b07b9 100644 (file)
@@ -603,8 +603,8 @@ namespace Step61
   template <int dim>
   void WGDarcyEquation<dim>::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<Vector<double>> solver(solver_control);
     solver.solve(system_matrix, solution, system_rhs, PreconditionIdentity());
     constraints.distribute(solution);
   }
index 88937cc992cf4a219f06813c7355b8cdaf00f7c8..977cabe30fce559264a55180a854205e6548b70b 100644 (file)
@@ -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<Vector<double>> solver(
+      solver_control, SolverGMRES<Vector<double>>::AdditionalData(50, true));
 
     Timer time;
     time.start();
index 9ea786db42477427cac6d01f0b0b3c066703cb6b..6e70e4140f5020a362154ab03cf2544a62c53cfb 100644 (file)
@@ -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<Vector<double>> solver(solver_control);
 
-    PreconditionJacobi<> preconditioner;
+    PreconditionJacobi<SparseMatrix<double>> preconditioner;
     preconditioner.initialize(system_matrix);
 
     solver.solve(system_matrix, solution, system_rhs, preconditioner);
index 71d612aa134ecd3d91145f11959ae1866a6d5b02..c413a50eae70dac755d9a72933e25deea1a09bec 100644 (file)
@@ -724,10 +724,10 @@ namespace Step7
   template <int dim>
   void HelmholtzProblem<dim>::solve()
   {
-    SolverControl solver_control(1000, 1e-12);
-    SolverCG<>    cg(solver_control);
+    SolverControl            solver_control(1000, 1e-12);
+    SolverCG<Vector<double>> cg(solver_control);
 
-    PreconditionSSOR<> preconditioner;
+    PreconditionSSOR<SparseMatrix<double>> preconditioner;
     preconditioner.initialize(system_matrix, 1.2);
 
     cg.solve(system_matrix, solution, system_rhs, preconditioner);
index c3dfd3aeb18d7a814cab677716c9e0f33e316b1f..1ed035850338f13adf1573870daec4bf297ebb98 100644 (file)
@@ -422,10 +422,10 @@ namespace Step8
   template <int dim>
   void ElasticProblem<dim>::solve()
   {
-    SolverControl solver_control(1000, 1e-12);
-    SolverCG<>    cg(solver_control);
+    SolverControl            solver_control(1000, 1e-12);
+    SolverCG<Vector<double>> cg(solver_control);
 
-    PreconditionSSOR<> preconditioner;
+    PreconditionSSOR<SparseMatrix<double>> preconditioner;
     preconditioner.initialize(system_matrix, 1.2);
 
     cg.solve(system_matrix, solution, system_rhs, preconditioner);
index 37f4dbb5ddae3d110986639883ef3f5098d5f9ae..4858b995cc721c0cf8fcc1661b13503c13f130e0 100644 (file)
@@ -765,11 +765,11 @@ namespace Step9
   template <int dim>
   void AdvectionProblem<dim>::solve()
   {
-    SolverControl        solver_control(std::max<std::size_t>(1000,
+    SolverControl               solver_control(std::max<std::size_t>(1000,
                                                        system_rhs.size() / 10),
                                  1e-10 * system_rhs.l2_norm());
-    SolverGMRES<>        solver(solver_control);
-    PreconditionJacobi<> preconditioner;
+    SolverGMRES<Vector<double>> solver(solver_control);
+    PreconditionJacobi<SparseMatrix<double>> preconditioner;
     preconditioner.initialize(system_matrix, 1.0);
     solver.solve(system_matrix, solution, system_rhs, preconditioner);
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.