void TriangulationOnCAD::read_domain()
{
TopoDS_Shape bow_surface = OpenCASCADE::read_IGES(cad_file_name, 1e-3);
+ std::cout << " Read " << cad_file_name << std::endl;
// Each CAD geometrical object is defined along with a tolerance,
// which indicates possible inaccuracy of its placement. For
{
const std::string filename =
(output_filename + "_" + Utilities::int_to_string(cycle) + ".vtk");
- std::ofstream logfile(filename);
+ std::ofstream vtk_file(filename);
GridOut grid_out;
- grid_out.write_vtk(tria, logfile);
+ grid_out.write_vtk(tria, vtk_file);
+ std::cout << " Wrote " << filename << std::endl;
}
*/
#include <deal.II/base/exceptions.h>
+#include <deal.II/base/logstream.h>
#include <fstream>
#include <iostream>
} \
}
+std::string deallogname;
+std::ofstream deallogfile;
+
+void
+initlog(const bool console = false,
+ const std::ios_base::fmtflags flags = std::ios::showpoint |
+ std::ios::left)
+{
+ deallogname = "output";
+ deallogfile.open(deallogname);
+ dealii::deallog.attach(deallogfile, true, flags);
+ dealii::deallog.depth_console(console ? 10 : 0);
+}
#endif // dealii_example_test_h
--- /dev/null
+45c45
+<
+---
+> #include "../example_test.h"
+1181,1184c1181,1190
+< solver.solve(system_matrix,
+< solution,
+< right_hand_side,
+< preconditioner);
+---
+> // solver.solve(system_matrix,
+> // solution,
+> // right_hand_side,
+> // preconditioner);
+> check_solver_within_range(pcout,
+> solver.solve(system_matrix,
+> solution,
+> right_hand_side,
+> preconditioner)
+> , solver_control.last_step(), 1, 33);
+1195,1196c1201,1202
+< pcout << " Number of CG iterations: " << solver_control.last_step()
+< << std::endl;
+---
+> // pcout << " Number of CG iterations: " << solver_control.last_step()
+> // << std::endl;
+1466c1472
+< for (unsigned int cycle = 0; cycle < settings.n_steps; ++cycle)
+---
+> for (unsigned int cycle = 0; cycle < 8; ++cycle)
+1526,1527c1532,1533
+< computing_timer.print_summary();
+< computing_timer.reset();
+---
+> //computing_timer.print_summary();
+> //computing_timer.reset();
+1544c1550
+< if (!settings.try_parse((argc > 1) ? (argv[1]) : ""))
+---
+> if (!settings.try_parse((argc > 1) ? (argv[1]) : "../../../source/step-50/amg_2d.prm"))
--- /dev/null
+Cycle 0:
+ Number of active cells: 12
+ Number of degrees of freedom: 65
+Solver stopped within 1 - 33 iterations
+ Global error estimate: 0.350774
+ Wrote solution_00.pvtu
+Cycle 1:
+ Number of active cells: 24
+ Number of degrees of freedom: 139
+Solver stopped within 1 - 33 iterations
+ Global error estimate: 0.21433
+ Wrote solution_01.pvtu
+Cycle 2:
+ Number of active cells: 51
+ Number of degrees of freedom: 245
+Solver stopped within 1 - 33 iterations
+ Global error estimate: 0.110282
+ Wrote solution_02.pvtu
+Cycle 3:
+ Number of active cells: 105
+ Number of degrees of freedom: 531
+Solver stopped within 1 - 33 iterations
+ Global error estimate: 0.056739
+ Wrote solution_03.pvtu
+Cycle 4:
+ Number of active cells: 207
+ Number of degrees of freedom: 1009
+Solver stopped within 1 - 33 iterations
+ Global error estimate: 0.0328678
+ Wrote solution_04.pvtu
+Cycle 5:
+ Number of active cells: 414
+ Number of degrees of freedom: 1953
+Solver stopped within 1 - 33 iterations
+ Global error estimate: 0.0195039
+ Wrote solution_05.pvtu
+Cycle 6:
+ Number of active cells: 837
+ Number of degrees of freedom: 3769
+Solver stopped within 1 - 33 iterations
+ Global error estimate: 0.0112093
+ Wrote solution_06.pvtu
+Cycle 7:
+ Number of active cells: 1683
+ Number of degrees of freedom: 7415
+Solver stopped within 1 - 33 iterations
+ Global error estimate: 0.00670352
+ Wrote solution_07.pvtu
\ No newline at end of file
--- /dev/null
+47c47
+<
+---
+> #include "../example_test.h"
+975,978c975,980
+< solver.solve(system_matrix, solution, system_rhs, PreconditionIdentity());
+<
+< std::cout << " Number of BiCGStab iterations: "
+< << solver_control.last_step() << std::endl;
+---
+> //solver.solve(system_matrix, solution, system_rhs, PreconditionIdentity());
+> check_solver_within_range(std::cout,
+> solver.solve(system_matrix, solution, system_rhs, PreconditionIdentity())
+> , solver_control.last_step(), 34, 163);
+> // std::cout << " Number of BiCGStab iterations: "
+> // << solver_control.last_step() << std::endl;
+1356c1358
+< for (unsigned int cycle = 0; cycle < 10; ++cycle)
+---
+> for (unsigned int cycle = 0; cycle < 5; ++cycle)
--- /dev/null
+Solving with Q1 elements, adaptive refinement
+=============================================
+
+Cycle 0:
+ Number of degrees of freedom: 80
+Solver stopped within 34 - 163 iterations
+Cycle 1:
+ Number of degrees of freedom: 148
+Solver stopped within 34 - 163 iterations
+Cycle 2:
+ Number of degrees of freedom: 248
+Solver stopped within 34 - 163 iterations
+Cycle 3:
+ Number of degrees of freedom: 516
+Solver stopped within 34 - 163 iterations
+Cycle 4:
+ Number of degrees of freedom: 992
+Solver stopped within 34 - 163 iterations
+cells dofs val L2 grad L2 val L2-post
+ 16 80 1.804e+01 2.207e+01 1.798e+01
+ 28 148 1.151e+01 1.484e+01 1.144e+01
+ 52 248 9.875e-01 4.266e+00 7.229e-01
+ 97 516 3.814e-01 1.608e+00 3.181e-01
+ 193 992 1.325e-01 1.085e+00 7.341e-02
+
+Solving with Q1 elements, global refinement
+===========================================
+
+Cycle 0:
+ Number of degrees of freedom: 80
+Solver stopped within 34 - 163 iterations
+Cycle 1:
+ Number of degrees of freedom: 168
+Solver stopped within 34 - 163 iterations
+Cycle 2:
+ Number of degrees of freedom: 288
+Solver stopped within 34 - 163 iterations
+Cycle 3:
+ Number of degrees of freedom: 624
+Solver stopped within 34 - 163 iterations
+Cycle 4:
+ Number of degrees of freedom: 1088
+Solver stopped within 34 - 163 iterations
+cells dofs val L2 grad L2 val L2-post
+ 16 80 1.804e+01 - 2.207e+01 - 1.798e+01 -
+ 36 168 6.125e+00 2.66 9.472e+00 2.09 6.084e+00 2.67
+ 64 288 9.785e-01 6.38 4.260e+00 2.78 7.102e-01 7.47
+ 144 624 2.730e-01 3.15 1.866e+00 2.04 6.115e-02 6.05
+ 256 1088 1.493e-01 2.10 1.046e+00 2.01 2.880e-02 2.62
+
+Solving with Q3 elements, global refinement
+===========================================
+
+Cycle 0:
+ Number of degrees of freedom: 160
+Solver stopped within 34 - 163 iterations
+Cycle 1:
+ Number of degrees of freedom: 336
+Solver stopped within 34 - 163 iterations
+Cycle 2:
+ Number of degrees of freedom: 576
+Solver stopped within 34 - 163 iterations
+Cycle 3:
+ Number of degrees of freedom: 1248
+Solver stopped within 34 - 163 iterations
+Cycle 4:
+ Number of degrees of freedom: 2176
+Solver stopped within 34 - 163 iterations
+cells dofs val L2 grad L2 val L2-post
+ 16 160 3.613e-01 - 1.891e+00 - 3.020e-01 -
+ 36 336 6.411e-02 4.26 5.081e-01 3.24 3.238e-02 5.51
+ 64 576 3.480e-02 2.12 2.533e-01 2.42 5.277e-03 6.31
+ 144 1248 8.297e-03 3.54 5.924e-02 3.58 6.330e-04 5.23
+ 256 2176 2.254e-03 4.53 1.636e-02 4.47 1.403e-04 5.24
+
--- /dev/null
+774c774
+< std::cout << " Dopri: error=" << solution.l2_norm()
+---
+> std::cout << " Dopri: error=" << ((solution.l2_norm()<1.0e-4) ? "is within 1e-4" : "is NOT within 1e-4")
+782c782
+< std::cout << " Fehlberg: error=" << solution.l2_norm()
+---
+> std::cout << " Fehlberg: error=" << ((solution.l2_norm()<1.0e-2) ? "is within 1e-2" : "is NOT within 1e-2")
+790c790
+< std::cout << " Cash-Karp: error=" << solution.l2_norm()
+---
+> std::cout << " Cash-Karp: error=" << ((solution.l2_norm()<1.0e-3) ? "is within 1e-3" : "is NOT within 1e-3")
--- /dev/null
+Explicit methods:
+ Forward Euler: error=1.00883
+ Third order Runge-Kutta: error=0.000227982
+ Fourth order Runge-Kutta: error=1.90541e-06
+
+Implicit methods:
+ Backward Euler: error=1.03428
+ Implicit Midpoint: error=0.00862702
+ Crank-Nicolson: error=0.00862675
+ SDIRK: error=0.0042349
+
+Embedded explicit methods:
+ Heun-Euler: error=0.0073012
+ steps performed=284
+ Bogacki-Shampine: error=0.000401145
+ steps performed=181
+ Dopri: error=is within 1e-4
+ steps performed=121
+ Fehlberg: error=is within 1e-2
+ steps performed=106
+ Cash-Karp: error=is within 1e-3
+ steps performed=107
--- /dev/null
+Refinement step 1: 16 cells, 657.326km minimal cell diameter
+Refinement step 2: 72 cells, 337.24km minimal cell diameter
+Refinement step 3: 296 cells, 170.738km minimal cell diameter
+Refinement step 4: 1192 cells, 85.8949km minimal cell diameter
+Refinement step 5: 4776 cells, 43.0785km minimal cell diameter
+Refinement step 6: 19112 cells, 21.572km minimal cell diameter
\ No newline at end of file
--- /dev/null
+29c29
+<
+---
+> #include "../example_test.h"
+173c173
+< std::cout << " Read " << cad_file_name << std::endl;
+---
+> deallog << " Read " << cad_file_name << std::endl;
+357c357
+< std::cout << " Wrote " << filename << std::endl;
+---
+> deallog << " Wrote " << filename << std::endl;
+389,391c389,391
+<
+< const std::string in_mesh_filename = "input/initial_mesh_3d.vtk";
+< const std::string cad_file_name = "input/DTMB-5415_bulbous_bow.iges";
+---
+> initlog();
+> const std::string in_mesh_filename = "../../../source/step-54/input/initial_mesh_3d.vtk";
+> const std::string cad_file_name = "../../../source/step-54/input/DTMB-5415_bulbous_bow.iges";
+395c395
+< std::cout << "Testing projection in direction normal to CAD surface"
+---
+> deallog << "Testing projection in direction normal to CAD surface"
+412c412
+< std::cout << "Testing projection in y-axis direction" << std::endl;
+---
+> deallog << "Testing projection in y-axis direction" << std::endl;
+429c429
+< std::cout << "Testing projection in direction normal to mesh elements"
+---
+> deallog << "Testing projection in direction normal to mesh elements"
--- /dev/null
+
+DEAL::Testing projection in direction normal to CAD surface
+DEAL:: Read ../../../source/step-54/input/DTMB-5415_bulbous_bow.iges
+DEAL:: Wrote 3d_mesh_normal_projection_0.vtk
+DEAL:: Wrote 3d_mesh_normal_projection_1.vtk
+DEAL:: Wrote 3d_mesh_normal_projection_2.vtk
+DEAL:: Wrote 3d_mesh_normal_projection_3.vtk
+DEAL:: Wrote 3d_mesh_normal_projection_4.vtk
+DEAL:: Wrote 3d_mesh_normal_projection_5.vtk
+DEAL::Testing projection in y-axis direction
+DEAL:: Read ../../../source/step-54/input/DTMB-5415_bulbous_bow.iges
+DEAL:: Wrote 3d_mesh_directional_projection_0.vtk
+DEAL:: Wrote 3d_mesh_directional_projection_1.vtk
+DEAL:: Wrote 3d_mesh_directional_projection_2.vtk
+DEAL:: Wrote 3d_mesh_directional_projection_3.vtk
+DEAL:: Wrote 3d_mesh_directional_projection_4.vtk
+DEAL:: Wrote 3d_mesh_directional_projection_5.vtk
+DEAL::Testing projection in direction normal to mesh elements
+DEAL:: Read ../../../source/step-54/input/DTMB-5415_bulbous_bow.iges
+DEAL:: Wrote 3d_mesh_normal_to_mesh_projection_0.vtk
+DEAL:: Wrote 3d_mesh_normal_to_mesh_projection_1.vtk
+DEAL:: Wrote 3d_mesh_normal_to_mesh_projection_2.vtk
+DEAL:: Wrote 3d_mesh_normal_to_mesh_projection_3.vtk
+DEAL:: Wrote 3d_mesh_normal_to_mesh_projection_4.vtk
+DEAL:: Wrote 3d_mesh_normal_to_mesh_projection_5.vtk
--- /dev/null
+74c74
+<
+---
+> #include "../example_test.h"
+639,645c639,651
+< solver.solve(system_matrix,
+< distributed_solution,
+< system_rhs,
+< preconditioner);
+<
+< pcout << " Solved in " << solver_control.last_step() << " iterations."
+< << std::endl;
+---
+> // solver.solve(system_matrix,
+> // distributed_solution,
+> // system_rhs,
+> // preconditioner);
+> check_solver_within_range(pcout,
+> solver.solve(system_matrix,
+> distributed_solution,
+> system_rhs,
+> preconditioner),
+> solver_control.last_step(),
+> 48, 60);
+> // pcout << " Solved in " << solver_control.last_step() << " iterations."
+> // << std::endl;
+794,795c800,801
+< computing_timer.print_summary();
+< computing_timer.reset();
+---
+> // computing_timer.print_summary();
+> // computing_timer.reset();
--- /dev/null
+Running using PETSc.
+Cycle 0:
+ Number of degrees of freedom: 659 (578+81)
+Solver stopped within 48 - 60 iterations
+error: u_0: 0.0806514 p_0: 0.348625
+
+Cycle 1:
+ Number of degrees of freedom: 2467 (2178+289)
+Solver stopped within 48 - 60 iterations
+error: u_0: 0.0079449 p_0: 0.0907971
+
+Cycle 2:
+ Number of degrees of freedom: 9539 (8450+1089)
+Solver stopped within 48 - 60 iterations
+error: u_0: 0.000806428 p_0: 0.0226065
+
+Cycle 3:
+ Number of degrees of freedom: 37507 (33282+4225)
+Solver stopped within 48 - 60 iterations
+error: u_0: 9.27217e-05 p_0: 0.0056287
+
+Cycle 4:
+ Number of degrees of freedom: 148739 (132098+16641)
+Solver stopped within 48 - 60 iterations
+error: u_0: 1.13218e-05 p_0: 0.00140512
+
-1064c1064
+67c67
+<
+---
+> #include "../example_test.h"
+833c833,834
+<
+---
+> (void)n_iterations_A;
+> (void)n_iterations_S;
+869c870,874
+< solver.solve(system_matrix, solution, system_rhs, preconditioner);
+---
+> // solver.solve(system_matrix, solution, system_rhs, preconditioner);
+> check_solver_within_range(std::cout,
+> solver.solve(system_matrix, solution, system_rhs, preconditioner),
+> solver_control.last_step(),
+> 13, 17);
+931c936,940
+< solver.solve(system_matrix, solution, system_rhs, preconditioner);
+---
+> //solver.solve(system_matrix, solution, system_rhs, preconditioner);
+> check_solver_within_range(std::cout,
+> solver.solve(system_matrix, solution, system_rhs, preconditioner),
+> solver_control.last_step(),
+> 13, 17);
+939,947c948,956
+< std::cout
+< << std::endl
+< << "\tNumber of FGMRES iterations: " << solver_control.last_step()
+< << std::endl
+< << "\tTotal number of iterations used for approximation of A inverse: "
+< << n_iterations_A << std::endl
+< << "\tTotal number of iterations used for approximation of S inverse: "
+< << n_iterations_S << std::endl
+< << std::endl;
+---
+> // std::cout
+> // << std::endl
+> // << "\tNumber of FGMRES iterations: " << solver_control.last_step()
+> // << std::endl
+> // << "\tTotal number of iterations used for approximation of A inverse: "
+> // << n_iterations_A << std::endl
+> // << "\tTotal number of iterations used for approximation of S inverse: "
+> // << n_iterations_S << std::endl
+> // << std::endl;
+966,967c975,976
+< std::cout << " Note: The mean value was adjusted by " << -mean_pressure
+< << std::endl;
+---
+> // std::cout << " Note: The mean value was adjusted by " << -mean_pressure
+> // << std::endl;
+1060c1069
< triangulation.refine_global(6 - dim);
---
> triangulation.refine_global(2);
-1104c1104
+1100c1109
< std::cout << " VM Peak: " << mem.VmPeak << std::endl;
---
> // std::cout << " VM Peak: " << mem.VmPeak << std::endl;
-1106c1106
+1102c1111
< computing_timer.print_summary();
---
> // computing_timer.print_summary();
-1120c1120
+1116c1125
< const int dim = 3;
---
> const int dim = 2;
-1122,1124c1122,1129
+1118,1120c1127,1134
< StokesProblem<dim> flow_problem(degree, SolverType::FGMRES_GMG);
<
< flow_problem.run();
Number of degrees of freedom: 187 (162+25)
Assembling...
Assembling Multigrid...
- Solving...
- Number of FGMRES iterations: 14
- Total number of iterations used for approximation of A inverse: 42
- Total number of iterations used for approximation of S inverse: 14
-
- Note: The mean value was adjusted by 8.58753e-15
+ Solving...Solver stopped within 13 - 17 iterations
Velocity L2 Error: 0.00340778
Pressure L2 Error: 0.017624
Number of degrees of freedom: 659 (578+81)
Assembling...
Assembling Multigrid...
- Solving...
- Number of FGMRES iterations: 16
- Total number of iterations used for approximation of A inverse: 49
- Total number of iterations used for approximation of S inverse: 16
-
- Note: The mean value was adjusted by -1.77281e-14
+ Solving...Solver stopped within 13 - 17 iterations
Velocity L2 Error: 0.000426317
Pressure L2 Error: 0.00414007
Number of degrees of freedom: 2467 (2178+289)
Assembling...
Assembling Multigrid...
- Solving...
- Number of FGMRES iterations: 16
- Total number of iterations used for approximation of A inverse: 49
- Total number of iterations used for approximation of S inverse: 16
-
- Note: The mean value was adjusted by -2.39441e-14
+ Solving...Solver stopped within 13 - 17 iterations
Velocity L2 Error: 5.33246e-05
Pressure L2 Error: 0.00102063
Number of degrees of freedom: 187 (162+25)
Assembling...
Solving... Computing preconditioner...
-
- Number of FGMRES iterations: 14
- Total number of iterations used for approximation of A inverse: 70
- Total number of iterations used for approximation of S inverse: 14
-
- Note: The mean value was adjusted by 3.04715e-15
+Solver stopped within 13 - 17 iterations
Velocity L2 Error: 0.00340778
Pressure L2 Error: 0.017624
Number of degrees of freedom: 659 (578+81)
Assembling...
Solving... Computing preconditioner...
-
- Number of FGMRES iterations: 16
- Total number of iterations used for approximation of A inverse: 126
- Total number of iterations used for approximation of S inverse: 16
-
- Note: The mean value was adjusted by -3.40459e-15
+Solver stopped within 13 - 17 iterations
Velocity L2 Error: 0.000426317
Pressure L2 Error: 0.00414007
Number of degrees of freedom: 2467 (2178+289)
Assembling...
Solving... Computing preconditioner...
-
- Number of FGMRES iterations: 16
- Total number of iterations used for approximation of A inverse: 216
- Total number of iterations used for approximation of S inverse: 16
-
- Note: The mean value was adjusted by -1.33296e-15
+Solver stopped within 13 - 17 iterations
Velocity L2 Error: 5.33247e-05
Pressure L2 Error: 0.00102063
--- /dev/null
+25c25
+<
+---
+> #include "../example_test.h"
+262c262
+< : viscosity(1.0 / 7500.0)
+---
+> : viscosity(1.0 / 750.0)
+562,563c562,567
+< gmres.solve(system_matrix, newton_update, system_rhs, preconditioner);
+< std::cout << "FGMRES steps: " << solver_control.last_step() << std::endl;
+---
+> //gmres.solve(system_matrix, newton_update, system_rhs, preconditioner);
+> check_solver_within_range(std::cout,
+> gmres.solve(system_matrix, newton_update, system_rhs, preconditioner),
+> solver_control.last_step(),
+> 2, 7);
+> // std::cout << "FGMRES steps: " << solver_control.last_step() << std::endl;
+844c848
+< newton_iteration(1e-12, 50, refinement, true, true);
+---
+> newton_iteration(1e-3, 50, refinement, true, true);
+856c860
+< flow.run(4);
+---
+> flow.run(2);
--- /dev/null
+grid refinements: 0
+viscosity: 0.00133333
+Number of active cells: 1024
+Number of degrees of freedom: 9539 (8450 + 1089)
+Solver stopped within 2 - 7 iterations
+The residual of initial guess is 0.00744886
+Solver stopped within 2 - 7 iterations
+ alpha: 1 residual: 0.00884171
+ alpha: 0.5 residual: 0.00493275
+ number of line searches: 0 residual: 0.00493275
+Solver stopped within 2 - 7 iterations
+ alpha: 1 residual: 0.0020156
+ number of line searches: 1 residual: 0.0020156
+Solver stopped within 2 - 7 iterations
+ alpha: 1 residual: 0.00134521
+ number of line searches: 2 residual: 0.00134521
+Solver stopped within 2 - 7 iterations
+ alpha: 1 residual: 0.000639533
+ number of line searches: 3 residual: 0.000639533
+Number of active cells: 2176
+Number of degrees of freedom: 20753 (18398 + 2355)
+grid refinements: 1
+viscosity: 0.00133333
+Solver stopped within 2 - 7 iterations
+ alpha: 1 residual: 0.00128952
+ number of line searches: 0 residual: 0.00128952
+Solver stopped within 2 - 7 iterations
+ alpha: 1 residual: 6.38976e-05
+ number of line searches: 1 residual: 6.38976e-05
+Number of active cells: 4840
+Number of degrees of freedom: 46315 (41086 + 5229)
+grid refinements: 2
+viscosity: 0.00133333
+Solver stopped within 2 - 7 iterations
+ alpha: 1 residual: 0.000567482
+ number of line searches: 0 residual: 0.000567482
--- /dev/null
+602c602
+< const double end_time = 1;
+---
+> const double end_time = 0.1;
--- /dev/null
+Number of active cells: 4096
+Number of degrees of freedom: 16641
+
+Time step 1 at t=0
+Time step 2 at t=0.0078125
+Time step 3 at t=0.015625
+Time step 4 at t=0.0234375
+Time step 5 at t=0.03125
+Time step 6 at t=0.0390625
+Time step 7 at t=0.046875
+Time step 8 at t=0.0546875
+Time step 9 at t=0.0625
+Time step 10 at t=0.0703125
+Time step 11 at t=0.078125
+Time step 12 at t=0.0859375
+Time step 13 at t=0.09375
\ No newline at end of file
-74c74
+26c26
+<
+---
+> #include "../example_test.h"
+73c73
< const unsigned int degree_finite_element = 8;
---
> const unsigned int degree_finite_element = 5;
-1232c1232
+1231c1231
< smoother_data[level].eig_cg_n_iterations = 10;
---
> smoother_data[level].eig_cg_n_iterations = 15;
-1236,1237c1236,1238
+1235,1236c1235,1237
< smoother_data[0].smoothing_range = 2e-2;
< smoother_data[0].degree = numbers::invalid_unsigned_int;
---
> smoother_data[0].smoothing_range = 100;
> smoother_data[0].degree = 15;
> smoother_data[0].max_eigenvalue = 4;
-1239a1241,1242
+1238a1240,1241
> smoother_data[level].eigenvalue_algorithm =
> internal::EigenvalueAlgorithm::power_iteration;
-1266d1268
+1265d1267
< pcout << "Total setup time " << setup_time << " s\n";
-1272,1273c1274,1275
+1269,1272c1271,1277
+< cg.solve(system_matrix, solution, system_rhs, preconditioner);
+<
< pcout << "Time solve (" << solver_control.last_step() << " iterations) "
< << time.wall_time() << " s" << std::endl;
---
-> pcout << "Time solve (" << solver_control.last_step() << " iterations) "
-> << std::endl;
-1320c1322
+> //cg.solve(system_matrix, solution, system_rhs, preconditioner);
+> check_solver_within_range(pcout,
+> cg.solve(system_matrix, solution, system_rhs, preconditioner),
+> solver_control.last_step(),
+> 12, 15);
+> // pcout << "Time solve (" << solver_control.last_step() << " iterations) "
+> // << std::endl;
+1319c1324
< for (unsigned int cycle = 0; cycle < 9 - dim; ++cycle)
---
> for (unsigned int cycle = 0; cycle < 3; ++cycle)
Cycle 0
Number of degrees of freedom: 1728
-Time solve (13 iterations)
+Solver stopped within 12 - 15 iterations
Verification via L2 error: 0.667141
Cycle 1
Number of degrees of freedom: 13824
-Time solve (14 iterations)
+Solver stopped within 12 - 15 iterations
Verification via L2 error: 0.0232412
Cycle 2
Number of degrees of freedom: 110592
-Time solve (14 iterations)
+Solver stopped within 12 - 15 iterations
Verification via L2 error: 0.00034861