void make_grid ();
void setup_system();
void assemble_system ();
- void solve ();
+ void solve (int cycle);
Triangulation<dim> triangulation;
FE_Q<dim> fe;
template <int dim>
-void Step4<dim>::solve ()
+void Step4<dim>::solve (int cycle)
{
deallog.push(Utilities::int_to_string(dof_handler.n_dofs(),5));
{
deallog.push("Jacobi");
+ static constexpr std::array<int,2> lower {49,100};
TrilinosWrappers::PreconditionJacobi preconditioner;
solution = 0;
SolverControl solver_control (1000, 1e-10);
SolverCG<> solver (solver_control);
preconditioner.initialize(system_matrix);
- solver.solve (system_matrix, solution, system_rhs,
- preconditioner);
+ check_solver_within_range(solver.solve(system_matrix,solution,system_rhs,preconditioner),
+ solver_control.last_step(), lower[cycle], lower[cycle]+2);
deallog.pop();
}
{
deallog.push("SSOR");
+ static constexpr std::array<int,2> lower {40,77};
TrilinosWrappers::PreconditionSSOR preconditioner;
solution = 0;
SolverControl solver_control (1000, 1e-10);
SolverCG<> solver (solver_control);
preconditioner.initialize(system_matrix);
- solver.solve (system_matrix, solution, system_rhs,
- preconditioner);
+ check_solver_within_range(solver.solve(system_matrix,solution,system_rhs,preconditioner),
+ solver_control.last_step(), lower[cycle], lower[cycle]+2);
deallog.pop();
}
{
deallog.push("SOR");
+ static constexpr std::array<int,2> lower {31,62};
TrilinosWrappers::PreconditionSOR preconditioner;
solution = 0;
SolverControl solver_control (1000, 1e-5);
SolverBicgstab<> solver (solver_control);
preconditioner.initialize(system_matrix);
- solver.solve (system_matrix, solution, system_rhs,
- preconditioner);
+ check_solver_within_range(solver.solve(system_matrix,solution,system_rhs,preconditioner),
+ solver_control.last_step(), lower[cycle], lower[cycle]+2);
deallog.pop();
}
{
deallog.push("BlockJacobi");
+ static constexpr std::array<int,2> lower {73,145};
TrilinosWrappers::PreconditionBlockJacobi preconditioner;
TrilinosWrappers::PreconditionBlockJacobi::AdditionalData data;
data.block_size = 16;
SolverControl solver_control (1000, 1e-10);
SolverCG<> solver (solver_control);
preconditioner.initialize(system_matrix, data);
- solver.solve (system_matrix, solution, system_rhs,
- preconditioner);
+ check_solver_within_range(solver.solve(system_matrix,solution,system_rhs,preconditioner),
+ solver_control.last_step(), lower[cycle], lower[cycle]+2);
deallog.pop();
}
{
deallog.push("BlockSSOR");
+ static constexpr std::array<int,2> lower {30,59};
TrilinosWrappers::PreconditionBlockSSOR preconditioner;
TrilinosWrappers::PreconditionBlockSSOR::AdditionalData data;
data.block_size = 16;
SolverControl solver_control (1000, 1e-10);
SolverCG<> solver (solver_control);
preconditioner.initialize(system_matrix, data);
- solver.solve (system_matrix, solution, system_rhs,
- preconditioner);
+ check_solver_within_range(solver.solve(system_matrix,solution,system_rhs,preconditioner),
+ solver_control.last_step(), lower[cycle], lower[cycle]+2);
deallog.pop();
}
{
deallog.push("BlockSOR");
+ static constexpr std::array<int,2> lower {18,37};
TrilinosWrappers::PreconditionBlockSOR preconditioner;
TrilinosWrappers::PreconditionBlockSOR::AdditionalData data;
data.block_size = 16;
SolverControl solver_control (1000, 1e-5);
SolverBicgstab<> solver (solver_control);
preconditioner.initialize(system_matrix, data);
- solver.solve (system_matrix, solution, system_rhs,
- preconditioner);
+ check_solver_within_range(solver.solve(system_matrix,solution,system_rhs,preconditioner),
+ solver_control.last_step(), lower[cycle], lower[cycle]+2);
deallog.pop();
}
{
deallog.push("IC");
+ static constexpr std::array<int,2> lower {51,69};
TrilinosWrappers::PreconditionIC preconditioner;
solution = 0;
SolverControl solver_control (1000, 1e-10);
SolverCG<> solver (solver_control);
preconditioner.initialize(system_matrix);
- solver.solve (system_matrix, solution, system_rhs,
- preconditioner);
+ check_solver_within_range(solver.solve(system_matrix,solution,system_rhs,preconditioner),
+ solver_control.last_step(), lower[cycle], lower[cycle]+2);
deallog.pop();
}
{
+ static constexpr std::array<int,2> lower {30,56};
deallog.push("ILU");
TrilinosWrappers::PreconditionILU preconditioner;
solution = 0;
SolverControl solver_control (1000, 1e-10);
SolverCG<> solver (solver_control);
preconditioner.initialize(system_matrix);
- solver.solve (system_matrix, solution, system_rhs,
- preconditioner);
+ check_solver_within_range(solver.solve(system_matrix,solution,system_rhs,preconditioner),
+ solver_control.last_step(), lower[cycle], lower[cycle]+2);
deallog.pop();
}
{
deallog.push("ILUT");
+ static constexpr std::array<int,2> lower {11,19};
TrilinosWrappers::PreconditionILUT preconditioner;
TrilinosWrappers::PreconditionILUT::AdditionalData data;
data.ilut_drop = 1e-6;
SolverControl solver_control (1000, 1e-5);
SolverBicgstab<> solver (solver_control);
preconditioner.initialize(system_matrix, data);
- solver.solve (system_matrix, solution, system_rhs,
- preconditioner);
+ check_solver_within_range(solver.solve(system_matrix,solution,system_rhs,preconditioner),
+ solver_control.last_step(), lower[cycle], lower[cycle]+2);
deallog.pop();
}
{
deallog.push("Chebyshev");
+ static constexpr std::array<int,2> lower {23,46};
TrilinosWrappers::PreconditionChebyshev preconditioner;
TrilinosWrappers::PreconditionChebyshev::AdditionalData data;
data.max_eigenvalue = 2.5;
SolverControl solver_control (1000, 1e-10);
SolverCG<> solver (solver_control);
preconditioner.initialize(system_matrix, data);
- solver.solve (system_matrix, solution, system_rhs,
- preconditioner);
+ check_solver_within_range(solver.solve(system_matrix,solution,system_rhs,preconditioner),
+ solver_control.last_step(), lower[cycle], lower[cycle]+2);
deallog.pop();
}
SolverControl solver_control (1000, 1e-10);
SolverCG<> solver (solver_control);
preconditioner.initialize(system_matrix);
- solver.solve (system_matrix, solution, system_rhs,
- preconditioner);
+ check_solver_within_range(solver.solve(system_matrix,solution,system_rhs,preconditioner),
+ solver_control.last_step(), 1, 1);
deallog.pop();
}
setup_system();
assemble_system();
- solve();
+ solve(cycle);
}
}
-DEAL:01089:Jacobi:cg::Starting value 15.4650
-DEAL:01089:Jacobi:cg::Convergence step 50 value 4.48478e-11
-DEAL:01089:SSOR:cg::Starting value 15.4650
-DEAL:01089:SSOR:cg::Convergence step 41 value 4.42998e-11
-DEAL:01089:SOR:Bicgstab::Starting value 15.4650
-DEAL:01089:SOR:Bicgstab::Convergence step 32 value 3.30388e-06
-DEAL:01089:BlockJacobi:cg::Starting value 15.4650
-DEAL:01089:BlockJacobi:cg::Convergence step 74 value 6.73830e-11
-DEAL:01089:BlockSSOR:cg::Starting value 15.4650
-DEAL:01089:BlockSSOR:cg::Convergence step 31 value 7.86992e-11
-DEAL:01089:BlockSOR:Bicgstab::Starting value 15.4650
-DEAL:01089:BlockSOR:Bicgstab::Convergence step 19 value 7.10623e-06
-DEAL:01089:IC:cg::Starting value 15.4650
-DEAL:01089:IC:cg::Convergence step 52 value 8.58018e-11
-DEAL:01089:ILU:cg::Starting value 15.4650
-DEAL:01089:ILU:cg::Convergence step 31 value 4.81299e-11
-DEAL:01089:ILUT:Bicgstab::Starting value 15.4650
-DEAL:01089:ILUT:Bicgstab::Convergence step 12 value 1.37052e-06
-DEAL:01089:Chebyshev:cg::Starting value 15.4650
-DEAL:01089:Chebyshev:cg::Convergence step 24 value 9.92823e-11
-DEAL:01089:Direct:cg::Starting value 15.4650
-DEAL:01089:Direct:cg::Convergence step 1 value 4.94722e-14
-DEAL:04225:Jacobi:cg::Starting value 21.8299
-DEAL:04225:Jacobi:cg::Convergence step 101 value 5.77109e-11
-DEAL:04225:SSOR:cg::Starting value 21.8299
-DEAL:04225:SSOR:cg::Convergence step 78 value 4.50033e-11
-DEAL:04225:SOR:Bicgstab::Starting value 21.8299
-DEAL:04225:SOR:Bicgstab::Convergence step 63 value 7.96877e-06
-DEAL:04225:BlockJacobi:cg::Starting value 21.8299
-DEAL:04225:BlockJacobi:cg::Convergence step 146 value 9.98613e-11
-DEAL:04225:BlockSSOR:cg::Starting value 21.8299
-DEAL:04225:BlockSSOR:cg::Convergence step 60 value 6.80642e-11
-DEAL:04225:BlockSOR:Bicgstab::Starting value 21.8299
-DEAL:04225:BlockSOR:Bicgstab::Convergence step 38 value 9.92349e-06
-DEAL:04225:IC:cg::Starting value 21.8299
-DEAL:04225:IC:cg::Convergence step 69 value 9.23798e-11
-DEAL:04225:ILU:cg::Starting value 21.8299
-DEAL:04225:ILU:cg::Convergence step 57 value 8.22307e-11
-DEAL:04225:ILUT:Bicgstab::Starting value 21.8299
-DEAL:04225:ILUT:Bicgstab::Convergence step 20 value 3.49065e-06
-DEAL:04225:Chebyshev:cg::Starting value 21.8299
-DEAL:04225:Chebyshev:cg::Convergence step 47 value 7.80130e-11
-DEAL:04225:Direct:cg::Starting value 21.8299
-DEAL:04225:Direct:cg::Convergence step 1 value 1.51477e-13
+DEAL:01089:Jacobi::Solver stopped within 49 - 51 iterations
+DEAL:01089:SSOR::Solver stopped within 40 - 42 iterations
+DEAL:01089:SOR::Solver stopped within 31 - 33 iterations
+DEAL:01089:BlockJacobi::Solver stopped within 73 - 75 iterations
+DEAL:01089:BlockSSOR::Solver stopped within 30 - 32 iterations
+DEAL:01089:BlockSOR::Solver stopped within 18 - 20 iterations
+DEAL:01089:IC::Solver stopped within 51 - 53 iterations
+DEAL:01089:ILU::Solver stopped within 30 - 32 iterations
+DEAL:01089:ILUT::Solver stopped within 11 - 13 iterations
+DEAL:01089:Chebyshev::Solver stopped within 23 - 25 iterations
+DEAL:01089:Direct::Solver stopped within 1 - 1 iterations
+DEAL:04225:Jacobi::Solver stopped within 100 - 102 iterations
+DEAL:04225:SSOR::Solver stopped within 77 - 79 iterations
+DEAL:04225:SOR::Solver stopped within 62 - 64 iterations
+DEAL:04225:BlockJacobi::Solver stopped within 145 - 147 iterations
+DEAL:04225:BlockSSOR::Solver stopped within 59 - 61 iterations
+DEAL:04225:BlockSOR::Solver stopped within 37 - 39 iterations
+DEAL:04225:IC::Solver stopped within 69 - 71 iterations
+DEAL:04225:ILU::Solver stopped within 56 - 58 iterations
+DEAL:04225:ILUT::Solver stopped within 19 - 21 iterations
+DEAL:04225:Chebyshev::Solver stopped within 46 - 48 iterations
+DEAL:04225:Direct::Solver stopped within 1 - 1 iterations
+++ /dev/null
-
-DEAL:01089:Jacobi:cg::Starting value 15.4650
-DEAL:01089:Jacobi:cg::Convergence step 50 value 0
-DEAL:01089:SSOR:cg::Starting value 15.4650
-DEAL:01089:SSOR:cg::Convergence step 41 value 0
-DEAL:01089:SOR:Bicgstab::Starting value 15.4650
-DEAL:01089:SOR:Bicgstab::Convergence step 32 value 0
-DEAL:01089:BlockJacobi:cg::Starting value 15.4650
-DEAL:01089:BlockJacobi:cg::Convergence step 74 value 0
-DEAL:01089:BlockSSOR:cg::Starting value 15.4650
-DEAL:01089:BlockSSOR:cg::Convergence step 31 value 0
-DEAL:01089:BlockSOR:Bicgstab::Starting value 15.4650
-DEAL:01089:BlockSOR:Bicgstab::Convergence step 19 value 0
-DEAL:01089:IC:cg::Starting value 15.4650
-DEAL:01089:IC:cg::Convergence step 53 value 0
-DEAL:01089:ILU:cg::Starting value 15.4650
-DEAL:01089:ILU:cg::Convergence step 31 value 0
-DEAL:01089:ILUT:Bicgstab::Starting value 15.4650
-DEAL:01089:ILUT:Bicgstab::Convergence step 12 value 0
-DEAL:01089:Chebyshev:cg::Starting value 15.4650
-DEAL:01089:Chebyshev:cg::Convergence step 24 value 0
-DEAL:01089:Direct:cg::Starting value 15.4650
-DEAL:01089:Direct:cg::Convergence step 1 value 0
-DEAL:04225:Jacobi:cg::Starting value 21.8299
-DEAL:04225:Jacobi:cg::Convergence step 101 value 0
-DEAL:04225:SSOR:cg::Starting value 21.8299
-DEAL:04225:SSOR:cg::Convergence step 78 value 0
-DEAL:04225:SOR:Bicgstab::Starting value 21.8299
-DEAL:04225:SOR:Bicgstab::Convergence step 63 value 0
-DEAL:04225:BlockJacobi:cg::Starting value 21.8299
-DEAL:04225:BlockJacobi:cg::Convergence step 146 value 0
-DEAL:04225:BlockSSOR:cg::Starting value 21.8299
-DEAL:04225:BlockSSOR:cg::Convergence step 60 value 0
-DEAL:04225:BlockSOR:Bicgstab::Starting value 21.8299
-DEAL:04225:BlockSOR:Bicgstab::Convergence step 38 value 0
-DEAL:04225:IC:cg::Starting value 21.8299
-DEAL:04225:IC:cg::Convergence step 70 value 0
-DEAL:04225:ILU:cg::Starting value 21.8299
-DEAL:04225:ILU:cg::Convergence step 57 value 0
-DEAL:04225:ILUT:Bicgstab::Starting value 21.8299
-DEAL:04225:ILUT:Bicgstab::Convergence step 20 value 0
-DEAL:04225:Chebyshev:cg::Starting value 21.8299
-DEAL:04225:Chebyshev:cg::Convergence step 47 value 0
-DEAL:04225:Direct:cg::Starting value 21.8299
-DEAL:04225:Direct:cg::Convergence step 1 value 0
+++ /dev/null
-
-DEAL:01089:Jacobi:cg::Starting value 15.4650
-DEAL:01089:Jacobi:cg::Convergence step 50 value 0
-DEAL:01089:SSOR:cg::Starting value 15.4650
-DEAL:01089:SSOR:cg::Convergence step 41 value 0
-DEAL:01089:SOR:Bicgstab::Starting value 15.4650
-DEAL:01089:SOR:Bicgstab::Convergence step 32 value 0
-DEAL:01089:BlockJacobi:cg::Starting value 15.4650
-DEAL:01089:BlockJacobi:cg::Convergence step 74 value 0
-DEAL:01089:BlockSSOR:cg::Starting value 15.4650
-DEAL:01089:BlockSSOR:cg::Convergence step 31 value 0
-DEAL:01089:BlockSOR:Bicgstab::Starting value 15.4650
-DEAL:01089:BlockSOR:Bicgstab::Convergence step 19 value 0
-DEAL:01089:IC:cg::Starting value 15.4650
-DEAL:01089:IC:cg::Convergence step 53 value 0
-DEAL:01089:ILU:cg::Starting value 15.4650
-DEAL:01089:ILU:cg::Convergence step 31 value 0
-DEAL:01089:ILUT:Bicgstab::Starting value 15.4650
-DEAL:01089:ILUT:Bicgstab::Convergence step 12 value 0
-DEAL:01089:Chebyshev:cg::Starting value 15.4650
-DEAL:01089:Chebyshev:cg::Convergence step 24 value 0
-DEAL:01089:Direct:cg::Starting value 15.4650
-DEAL:01089:Direct:cg::Convergence step 1 value 0
-DEAL:04225:Jacobi:cg::Starting value 21.8299
-DEAL:04225:Jacobi:cg::Convergence step 101 value 0
-DEAL:04225:SSOR:cg::Starting value 21.8299
-DEAL:04225:SSOR:cg::Convergence step 78 value 0
-DEAL:04225:SOR:Bicgstab::Starting value 21.8299
-DEAL:04225:SOR:Bicgstab::Convergence step 63 value 0
-DEAL:04225:BlockJacobi:cg::Starting value 21.8299
-DEAL:04225:BlockJacobi:cg::Convergence step 146 value 0
-DEAL:04225:BlockSSOR:cg::Starting value 21.8299
-DEAL:04225:BlockSSOR:cg::Convergence step 60 value 0
-DEAL:04225:BlockSOR:Bicgstab::Starting value 21.8299
-DEAL:04225:BlockSOR:Bicgstab::Convergence step 38 value 0
-DEAL:04225:IC:cg::Starting value 21.8299
-DEAL:04225:IC:cg::Convergence step 69 value 0
-DEAL:04225:ILU:cg::Starting value 21.8299
-DEAL:04225:ILU:cg::Convergence step 57 value 0
-DEAL:04225:ILUT:Bicgstab::Starting value 21.8299
-DEAL:04225:ILUT:Bicgstab::Convergence step 20 value 0
-DEAL:04225:Chebyshev:cg::Starting value 21.8299
-DEAL:04225:Chebyshev:cg::Convergence step 47 value 0
-DEAL:04225:Direct:cg::Starting value 21.8299
-DEAL:04225:Direct:cg::Convergence step 1 value 0
+++ /dev/null
-
-DEAL:01089:Jacobi:cg::Starting value 15.4650
-DEAL:01089:Jacobi:cg::Convergence step 50 value 0
-DEAL:01089:SSOR:cg::Starting value 15.4650
-DEAL:01089:SSOR:cg::Convergence step 41 value 0
-DEAL:01089:SOR:Bicgstab::Starting value 15.4650
-DEAL:01089:SOR:Bicgstab::Convergence step 32 value 0
-DEAL:01089:BlockJacobi:cg::Starting value 15.4650
-DEAL:01089:BlockJacobi:cg::Convergence step 74 value 0
-DEAL:01089:BlockSSOR:cg::Starting value 15.4650
-DEAL:01089:BlockSSOR:cg::Convergence step 31 value 0
-DEAL:01089:BlockSOR:Bicgstab::Starting value 15.4650
-DEAL:01089:BlockSOR:Bicgstab::Convergence step 19 value 0
-DEAL:01089:IC:cg::Starting value 15.4650
-DEAL:01089:IC:cg::Convergence step 52 value 0
-DEAL:01089:ILU:cg::Starting value 15.4650
-DEAL:01089:ILU:cg::Convergence step 31 value 0
-DEAL:01089:ILUT:Bicgstab::Starting value 15.4650
-DEAL:01089:ILUT:Bicgstab::Convergence step 12 value 0
-DEAL:01089:Chebyshev:cg::Starting value 15.4650
-DEAL:01089:Chebyshev:cg::Convergence step 24 value 0
-DEAL:01089:Direct:cg::Starting value 15.4650
-DEAL:01089:Direct:cg::Convergence step 1 value 0
-DEAL:04225:Jacobi:cg::Starting value 21.8299
-DEAL:04225:Jacobi:cg::Convergence step 101 value 0
-DEAL:04225:SSOR:cg::Starting value 21.8299
-DEAL:04225:SSOR:cg::Convergence step 78 value 0
-DEAL:04225:SOR:Bicgstab::Starting value 21.8299
-DEAL:04225:SOR:Bicgstab::Convergence step 63 value 0
-DEAL:04225:BlockJacobi:cg::Starting value 21.8299
-DEAL:04225:BlockJacobi:cg::Convergence step 146 value 0
-DEAL:04225:BlockSSOR:cg::Starting value 21.8299
-DEAL:04225:BlockSSOR:cg::Convergence step 60 value 0
-DEAL:04225:BlockSOR:Bicgstab::Starting value 21.8299
-DEAL:04225:BlockSOR:Bicgstab::Convergence step 38 value 0
-DEAL:04225:IC:cg::Starting value 21.8299
-DEAL:04225:IC:cg::Convergence step 69 value 0
-DEAL:04225:ILU:cg::Starting value 21.8299
-DEAL:04225:ILU:cg::Convergence step 57 value 0
-DEAL:04225:ILUT:Bicgstab::Starting value 21.8299
-DEAL:04225:ILUT:Bicgstab::Convergence step 20 value 0
-DEAL:04225:Chebyshev:cg::Starting value 21.8299
-DEAL:04225:Chebyshev:cg::Convergence step 47 value 0
-DEAL:04225:Direct:cg::Starting value 21.8299
-DEAL:04225:Direct:cg::Convergence step 1 value 0