From 1eb1c5ba05e7ff0c3cc27fafe27e0ac6f5f36cb4 Mon Sep 17 00:00:00 2001 From: Vladimir Yushutin Date: Wed, 19 Jun 2024 19:59:45 -0400 Subject: [PATCH] Step-30 to Step-39 --- tests/examples/step-30.diff | 14 +++ tests/examples/step-30.output | 29 +++++++ tests/examples/step-31.diff | 38 ++++++++ ...step-31.mpirun=1.with_trilinos=true.output | 84 ++++++++++++++++++ tests/examples/step-32.diff | 86 +++++++++++++++++++ ....with_trilinos=true.with_p4est=true.output | 52 +++++++++++ tests/examples/step-33.diff | 70 +++++++++++++++ ...with_sacado=true.with_muparser=true.output | 43 ++++++++++ tests/examples/step-34.diff | 43 ++++++++++ .../step-34.with_muparser=true.output | 36 ++++++++ tests/examples/step-35.diff | 48 +++++++++++ .../examples/step-35.with_umfpack=true.output | 12 +++ tests/examples/step-36.diff | 37 ++++++++ ...n=1.with_petsc=true.with_slepc=true.output | 12 +++ tests/examples/step-37.diff | 26 +++++- tests/examples/step-37.output | 10 +-- tests/examples/step-38.diff | 4 + tests/examples/step-38.output | 3 + tests/examples/step-39.diff | 6 +- tests/examples/step-39.output | 6 -- 20 files changed, 644 insertions(+), 15 deletions(-) create mode 100644 tests/examples/step-30.diff create mode 100644 tests/examples/step-30.output create mode 100644 tests/examples/step-31.diff create mode 100644 tests/examples/step-31.mpirun=1.with_trilinos=true.output create mode 100644 tests/examples/step-32.diff create mode 100644 tests/examples/step-32.mpirun=2.with_trilinos=true.with_p4est=true.output create mode 100644 tests/examples/step-33.diff create mode 100644 tests/examples/step-33.mpirun=2.with_trilinos_with_sacado=true.with_muparser=true.output create mode 100644 tests/examples/step-34.diff create mode 100644 tests/examples/step-34.with_muparser=true.output create mode 100644 tests/examples/step-35.diff create mode 100644 tests/examples/step-35.with_umfpack=true.output create mode 100644 tests/examples/step-36.diff create mode 100644 tests/examples/step-36.mpirun=1.with_petsc=true.with_slepc=true.output create mode 100644 tests/examples/step-38.diff create mode 100644 tests/examples/step-38.output diff --git a/tests/examples/step-30.diff b/tests/examples/step-30.diff new file mode 100644 index 0000000000..0fd2bd8ec4 --- /dev/null +++ b/tests/examples/step-30.diff @@ -0,0 +1,14 @@ +944c944 +< for (unsigned int cycle = 0; cycle < 6; ++cycle) +--- +> for (unsigned int cycle = 0; cycle < 3; ++cycle) +980,981c980,981 +< std::cout << " Time of assemble_system: " << assemble_timer.cpu_time() +< << std::endl; +--- +> //std::cout << " Time of assemble_system: " << assemble_timer.cpu_time() +> // << std::endl; +984c984 +< output_results(cycle); +--- +> //output_results(cycle); diff --git a/tests/examples/step-30.output b/tests/examples/step-30.output new file mode 100644 index 0000000000..cbbbdd21e9 --- /dev/null +++ b/tests/examples/step-30.output @@ -0,0 +1,29 @@ +Performing a 2D run with isotropic refinement... +------------------------------------------------ +Cycle 0: + Number of active cells: 128 + Number of degrees of freedom: 512 + +Cycle 1: + Number of active cells: 239 + Number of degrees of freedom: 956 + +Cycle 2: + Number of active cells: 491 + Number of degrees of freedom: 1964 + + +Performing a 2D run with anisotropic refinement... +-------------------------------------------------- +Cycle 0: + Number of active cells: 128 + Number of degrees of freedom: 512 + +Cycle 1: + Number of active cells: 173 + Number of degrees of freedom: 692 + +Cycle 2: + Number of active cells: 265 + Number of degrees of freedom: 1060 + diff --git a/tests/examples/step-31.diff b/tests/examples/step-31.diff new file mode 100644 index 0000000000..2dc250924a --- /dev/null +++ b/tests/examples/step-31.diff @@ -0,0 +1,38 @@ +26c26 +< +--- +> #include "../example_test.h" +1723c1723 +< gmres.solve(stokes_matrix, stokes_solution, stokes_rhs, preconditioner); +--- +> check_solver_within_range(std::cout,gmres.solve(stokes_matrix, stokes_solution, stokes_rhs, preconditioner), solver_control.last_step(),1,60); +1727,1728c1727,1728 +< std::cout << " " << solver_control.last_step() +< << " GMRES iterations for Stokes subsystem." << std::endl; +--- +> //std::cout << " " << solver_control.last_step() +> // << " GMRES iterations for Stokes subsystem." << std::endl; +1793,1796c1793,1796 +< cg.solve(temperature_matrix, +< temperature_solution, +< temperature_rhs, +< preconditioner); +--- +> check_solver_within_range(std::cout, +> cg.solve(temperature_matrix, temperature_solution, temperature_rhs, preconditioner), +> solver_control.last_step(), +> 7, 10); +1800,1801c1800,1801 +< std::cout << " " << solver_control.last_step() +< << " CG iterations for temperature." << std::endl; +--- +> //std::cout << " " << solver_control.last_step() +> // << " CG iterations for temperature." << std::endl; +2073c2073 +< output_results(); +--- +> //output_results(); +2095c2095 +< while (time <= 100); +--- +> while (time <= 0.2); diff --git a/tests/examples/step-31.mpirun=1.with_trilinos=true.output b/tests/examples/step-31.mpirun=1.with_trilinos=true.output new file mode 100644 index 0000000000..3cae65d002 --- /dev/null +++ b/tests/examples/step-31.mpirun=1.with_trilinos=true.output @@ -0,0 +1,84 @@ +Number of active cells: 256 (on 5 levels) +Number of degrees of freedom: 3556 (2178+289+1089) + +Timestep 0: t=0 + Assembling... + Rebuilding Stokes preconditioner... + Solving... +Solver stopped after 0 iterations + Time step: 0.919118 +Solver stopped within 7 - 10 iterations + Temperature range: -0.16687 1.30011 + +Number of active cells: 280 (on 6 levels) +Number of degrees of freedom: 4062 (2490+327+1245) + +Timestep 0: t=0 + Assembling... + Rebuilding Stokes preconditioner... + Solving... +Solver stopped after 0 iterations + Time step: 0.459559 +Solver stopped within 7 - 10 iterations + Temperature range: -0.0982971 0.598503 + +Number of active cells: 520 (on 7 levels) +Number of degrees of freedom: 7432 (4562+589+2281) + +Timestep 0: t=0 + Assembling... + Rebuilding Stokes preconditioner... + Solving... +Solver stopped after 0 iterations + Time step: 0.229779 +Solver stopped within 7 - 10 iterations + Temperature range: -0.0551098 0.294493 + +Number of active cells: 1072 (on 8 levels) +Number of degrees of freedom: 15294 (9398+1197+4699) + +Timestep 0: t=0 + Assembling... + Rebuilding Stokes preconditioner... + Solving... +Solver stopped after 0 iterations + Time step: 0.11489 +Solver stopped within 7 - 10 iterations + Temperature range: -0.0273524 0.156861 + +Number of active cells: 2128 (on 9 levels) +Number of degrees of freedom: 30270 (18614+2349+9307) + +Timestep 0: t=0 + Assembling... + Rebuilding Stokes preconditioner... + Solving... +Solver stopped after 0 iterations + Time step: 0.0574449 +Solver stopped within 7 - 10 iterations + Temperature range: -0.014961 0.0738328 + +Timestep 1: t=0.0574449 + Assembling... + Solving... +Solver stopped within 1 - 60 iterations + Time step: 0.0574449 +Solver stopped within 7 - 10 iterations + Temperature range: -0.0273934 0.14488 + +Timestep 2: t=0.11489 + Assembling... + Solving... +Solver stopped within 1 - 60 iterations + Time step: 0.0574449 +Solver stopped within 7 - 10 iterations + Temperature range: -0.0371147 0.212425 + +Timestep 3: t=0.172335 + Assembling... + Solving... +Solver stopped within 1 - 60 iterations + Time step: 0.0574449 +Solver stopped within 7 - 10 iterations + Temperature range: -0.044128 0.276515 + diff --git a/tests/examples/step-32.diff b/tests/examples/step-32.diff new file mode 100644 index 0000000000..02e4cf1346 --- /dev/null +++ b/tests/examples/step-32.diff @@ -0,0 +1,86 @@ +32c32 +< +--- +> #include "../example_test.h" +1113c1113 +< end_time = prm.get_double("End time"); +--- +> end_time = 1;//prm.get_double("End time"); +2775c2775 +< pcout << " Solving Stokes system... " << std::flush; +--- +> //pcout << " Solving Stokes system... " << std::flush; +2815,2819c2815,2819 +< solver.solve(stokes_matrix, +< distributed_stokes_solution, +< stokes_rhs, +< preconditioner); +< +--- +> check_solver_within_range(std::cout, +> solver.solve(stokes_matrix, distributed_stokes_solution, stokes_rhs, preconditioner), +> solver_control.last_step(), +> 22, +> 45); +2856c2856 +< pcout << n_iterations << " iterations." << std::endl; +--- +> (void)n_iterations;//pcout << n_iterations << " iterations." << std::endl; +2915,2919c2915,2919 +< cg.solve(temperature_matrix, +< distributed_temperature_solution, +< temperature_rhs, +< *T_preconditioner); +< +--- +> check_solver_within_range(std::cout, +> cg.solve(temperature_matrix, distributed_temperature_solution, temperature_rhs, *T_preconditioner), +> solver_control.last_step(), +> 16, +> 19); +2923,2924c2923,2924 +< pcout << " " << solver_control.last_step() +< << " CG iterations for temperature" << std::endl; +--- +> //pcout << " " << solver_control.last_step() +> // << " CG iterations for temperature" << std::endl; +3213,3220c3213,3220 +< DataOut data_out; +< data_out.attach_dof_handler(joint_dof_handler); +< data_out.add_data_vector(locally_relevant_joint_solution, postprocessor); +< data_out.build_patches(); +< +< static int out_index = 0; +< data_out.write_vtu_with_pvtu_record( +< "./", "solution", out_index, MPI_COMM_WORLD, 5); +--- +> //DataOut data_out; +> //data_out.attach_dof_handler(joint_dof_handler); +> //data_out.add_data_vector(locally_relevant_joint_solution, postprocessor); +> //data_out.build_patches(); +> +> //static int out_index = 0; +> //data_out.write_vtu_with_pvtu_record( +> // "./", "solution", out_index, MPI_COMM_WORLD, 5); +3222c3222 +< ++out_index; +--- +> //++out_index; +3494,3495c3494,3495 +< if ((timestep_number > 0) && (timestep_number % 100 == 0)) +< computing_timer.print_summary(); +--- +> //if ((timestep_number > 0) && (timestep_number % 100 == 0)) +> computing_timer.disable_output();// computing_timer.print_summary(); +3504,3506c3504,3506 +< if ((parameters.generate_graphical_output == true) && +< !((timestep_number - 1) % parameters.graphical_output_interval == 0)) +< output_results(); +--- +> //if ((parameters.generate_graphical_output == true) && +> // !((timestep_number - 1) % parameters.graphical_output_interval == 0)) +> // output_results(); +3538c3538 +< parameter_filename = "step-32.prm"; +--- +> parameter_filename = "../../../source/step-32/step-32.prm"; diff --git a/tests/examples/step-32.mpirun=2.with_trilinos=true.with_p4est=true.output b/tests/examples/step-32.mpirun=2.with_trilinos=true.with_p4est=true.output new file mode 100644 index 0000000000..160473f9e5 --- /dev/null +++ b/tests/examples/step-32.mpirun=2.with_trilinos=true.with_p4est=true.output @@ -0,0 +1,52 @@ +Number of active cells: 12288 (on 6 levels) +Number of degrees of freedom: 186624 (99840+36864+49920) + +Timestep 0: t=0 years + + Rebuilding Stokes preconditioner... +Solver stopped within 22 - 45 iterations +Solver stopped within 22 - 45 iterations + Maximal velocity: 62.8733 cm/year + Time step: 17994.4 years +Solver stopped within 16 - 19 iterations +Solver stopped within 16 - 19 iterations + Temperature range: 973 4273.16 + +Number of active cells: 17622 (on 7 levels) +Number of degrees of freedom: 276660 (149196+52866+74598) + +Timestep 0: t=0 years + + Rebuilding Stokes preconditioner... +Solver stopped within 22 - 45 iterations +Solver stopped within 22 - 45 iterations + Maximal velocity: 60.4718 cm/year + Time step: 10157 years +Solver stopped within 16 - 19 iterations +Solver stopped within 16 - 19 iterations + Temperature range: 973 4273.16 + +Number of active cells: 20742 (on 8 levels) +Number of degrees of freedom: 337536 (183540+62226+91770) + +Timestep 0: t=0 years + + Rebuilding Stokes preconditioner... +Solver stopped within 22 - 45 iterations +Solver stopped within 22 - 45 iterations + Maximal velocity: 60.5356 cm/year + Time step: 5078.11 years +Solver stopped within 16 - 19 iterations +Solver stopped within 16 - 19 iterations + Temperature range: 973 4273.43 + +Timestep 1: t=5078.11 years + +Solver stopped within 22 - 45 iterations +Solver stopped within 22 - 45 iterations + Maximal velocity: 61.6599 cm/year + Time step: 4985.32 years +Solver stopped within 16 - 19 iterations +Solver stopped within 16 - 19 iterations + Temperature range: 973 4273.43 + diff --git a/tests/examples/step-33.diff b/tests/examples/step-33.diff new file mode 100644 index 0000000000..01a7fa1386 --- /dev/null +++ b/tests/examples/step-33.diff @@ -0,0 +1,70 @@ +1205c1205 +< final_time = prm.get_double("final time"); +--- +> final_time = 0.04;//prm.get_double("final time"); +2373c2373,2374 +< std::ifstream input_file(parameters.mesh_filename); +--- +> //std::ifstream input_file(parameters.mesh_filename); +> std::ifstream input_file("../../../source/step-33/slide.inp"); +2412c2413 +< output_results(); +--- +> // output_results(); +2421c2422 +< double next_output = time + parameters.output_step; +--- +> // double next_output = time + parameters.output_step; +2471c2472 +< std::printf(" %-16.3e (converged)\n\n", res_norm); +--- +> std::printf(" %-16.1e (converged)\n\n", res_norm); +2483c2484,2488 +< std::printf(" %-16.3e %04d %-5.2e\n", +--- +> std::string output; +> if( (convergence.first < 10)&&(convergence.first > 6)) +> output="within"; +> else output="outside"; +> std::printf(" %-16.1e %s %-5.1e\n", +2485c2490 +< convergence.first, +--- +> output.c_str(), +2486a2492,2495 +> // std::printf(" %-16.3e %04d %-5.2e\n", +> // res_norm, +> // convergence.first, +> // convergence.second); +2510,2516c2519,2525 +< if (parameters.output_step < 0) +< output_results(); +< else if (time >= next_output) +< { +< output_results(); +< next_output += parameters.output_step; +< } +--- +> // if (parameters.output_step < 0) +> // output_results(); +> // else if (time >= next_output) +> // { +> // output_results(); +> // next_output += parameters.output_step; +> // } +2550,2554c2559,2563 +< if (argc != 2) +< { +< std::cout << "Usage:" << argv[0] << " input_file" << std::endl; +< std::exit(1); +< } +--- +> //{ +> // std::cout << "Usage:" << argv[0] << " input_file" << std::endl; +> //std::exit(1); +> //} +> const char *input_file="../../../source/step-33/input.prm"; +2559c2568 +< ConservationLaw<2> cons(argv[1]); +--- +> ConservationLaw<2> cons(input_file); diff --git a/tests/examples/step-33.mpirun=2.with_trilinos_with_sacado=true.with_muparser=true.output b/tests/examples/step-33.mpirun=2.with_trilinos_with_sacado=true.with_muparser=true.output new file mode 100644 index 0000000000..4e17099e1d --- /dev/null +++ b/tests/examples/step-33.mpirun=2.with_trilinos_with_sacado=true.with_muparser=true.output @@ -0,0 +1,43 @@ +T=0 + Number of active cells: 1702 + Number of degrees of freedom: 7288 + + NonLin Res Lin Iter Lin Res + _____________________________________ +T=0 + Number of active cells: 1702 + Number of degrees of freedom: 7288 + + NonLin Res Lin Iter Lin Res + _____________________________________ + 5.1e-02 within 5.7e-13 + 5.1e-02 within 5.7e-13 + 4.4e-04 within 1.2e-14 + 4.4e-04 within 1.2e-14 + 2.2e-07 within 7.0e-18 + 2.2e-07 within 7.0e-18 + 2.5e-13 (converged) + + 2.5e-13 (converged) + +T=0.02 + Number of active cells: 1792 + Number of degrees of freedom: 7660 + + NonLin Res Lin Iter Lin Res + _____________________________________ +T=0.02 + Number of active cells: 1792 + Number of degrees of freedom: 7660 + + NonLin Res Lin Iter Lin Res + _____________________________________ + 2.0e-02 within 1.5e-12 + 2.0e-02 within 1.5e-12 + 1.1e-04 within 3.6e-15 + 1.1e-04 within 3.6e-15 + 2.2e-08 within 8.0e-19 + 2.2e-08 within 8.0e-19 + 2.1e-15 (converged) + + 2.1e-15 (converged) \ No newline at end of file diff --git a/tests/examples/step-34.diff b/tests/examples/step-34.diff new file mode 100644 index 0000000000..33e553346a --- /dev/null +++ b/tests/examples/step-34.diff @@ -0,0 +1,43 @@ +497c497 +< in.open("coarse_circle.inp"); +--- +> in.open("../../../source/step-34/coarse_circle.inp"); +501c501 +< in.open("coarse_sphere.inp"); +--- +> in.open("../../../source/step-34/coarse_sphere.inp"); +974,983c974,983 +< DataOut data_out; +< +< data_out.attach_dof_handler(external_dh); +< data_out.add_data_vector(external_phi, "external_phi"); +< data_out.build_patches(); +< +< const std::string filename = std::to_string(dim) + "d_external.vtk"; +< std::ofstream file(filename); +< +< data_out.write_vtk(file); +--- +> // DataOut data_out; +> // +> // data_out.attach_dof_handler(external_dh); +> // data_out.add_data_vector(external_phi, "external_phi"); +> // data_out.build_patches(); +> // +> // const std::string filename = std::to_string(dim) + "d_external.vtk"; +> // std::ofstream file(filename); +> // +> // data_out.write_vtk(file); +1036c1036,1037 +< read_parameters("parameters.prm"); +--- +> //read_parameters("parameters.prm"); +> read_parameters("../../../source/step-34/parameters.prm"); +1047c1048 +< for (unsigned int cycle = 0; cycle < n_cycles; ++cycle) +--- +> for (unsigned int cycle = 0; cycle < 3; ++cycle) +1053c1054 +< output_results(cycle); +--- +> //output_results(cycle); diff --git a/tests/examples/step-34.with_muparser=true.output b/tests/examples/step-34.with_muparser=true.output new file mode 100644 index 0000000000..599cf3c515 --- /dev/null +++ b/tests/examples/step-34.with_muparser=true.output @@ -0,0 +1,36 @@ +DEAL:: +DEAL::Parsing parameter file ../../../source/step-34/parameters.prm +DEAL::for a 2 dimensional simulation. +DEAL:GMRES::Starting value 2.21576 +DEAL:GMRES::Convergence step 2 value 2.26240e-15 +DEAL::Cycle 0: +DEAL:: Number of active cells: 20 +DEAL:: Number of degrees of freedom: 20 +DEAL:GMRES::Starting value 3.15543 +DEAL:GMRES::Convergence step 2 value 1.06169e-15 +DEAL::Cycle 1: +DEAL:: Number of active cells: 40 +DEAL:: Number of degrees of freedom: 40 +DEAL:GMRES::Starting value 4.46977 +DEAL:GMRES::Convergence step 2 value 3.97965e-16 +DEAL::Cycle 2: +DEAL:: Number of active cells: 80 +DEAL:: Number of degrees of freedom: 80 +DEAL:: +DEAL::Parsing parameter file ../../../source/step-34/parameters.prm +DEAL::for a 3 dimensional simulation. +DEAL:GMRES::Starting value 1.42333 +DEAL:GMRES::Convergence step 3 value 0.00000 +DEAL::Cycle 0: +DEAL:: Number of active cells: 24 +DEAL:: Number of degrees of freedom: 26 +DEAL:GMRES::Starting value 3.17156 +DEAL:GMRES::Convergence step 5 value 6.61025e-12 +DEAL::Cycle 1: +DEAL:: Number of active cells: 96 +DEAL:: Number of degrees of freedom: 98 +DEAL:GMRES::Starting value 6.48904 +DEAL:GMRES::Convergence step 5 value 1.44933e-11 +DEAL::Cycle 2: +DEAL:: Number of active cells: 384 +DEAL:: Number of degrees of freedom: 386 diff --git a/tests/examples/step-35.diff b/tests/examples/step-35.diff new file mode 100644 index 0000000000..831eee15dd --- /dev/null +++ b/tests/examples/step-35.diff @@ -0,0 +1,48 @@ +726c726 +< std::string filename = "nsbench2.inp"; +--- +> std::string filename = "../../../source/step-35/nsbench2.inp"; +975c975 +< for (unsigned int n = 2; n <= n_steps; ++n) +--- +> for (unsigned int n = 2; n <= 4; ++n) +1346,1362c1346,1362 +< DataOut data_out; +< data_out.attach_dof_handler(joint_dof_handler); +< std::vector +< component_interpretation( +< dim + 2, DataComponentInterpretation::component_is_part_of_vector); +< component_interpretation[dim] = +< DataComponentInterpretation::component_is_scalar; +< component_interpretation[dim + 1] = +< DataComponentInterpretation::component_is_scalar; +< data_out.add_data_vector(joint_solution, +< joint_solution_names, +< DataOut::type_dof_data, +< component_interpretation); +< data_out.build_patches(deg + 1); +< std::ofstream output("solution-" + Utilities::int_to_string(step, 5) + +< ".vtk"); +< data_out.write_vtk(output); +--- +> // DataOut data_out; +> // data_out.attach_dof_handler(joint_dof_handler); +> // std::vector +> // component_interpretation( +> // dim + 2, DataComponentInterpretation::component_is_part_of_vector); +> // component_interpretation[dim] = +> // DataComponentInterpretation::component_is_scalar; +> // component_interpretation[dim + 1] = +> // DataComponentInterpretation::component_is_scalar; +> // data_out.add_data_vector(joint_solution, +> // joint_solution_names, +> // DataOut::type_dof_data, +> // component_interpretation); +> // data_out.build_patches(deg + 1); +> // std::ofstream output("solution-" + Utilities::int_to_string(step, 5) + +> // ".vtk"); +> // data_out.write_vtk(output); +1427c1427 +< data.read_data("parameter-file.prm"); +--- +> data.read_data("../../../source/step-35/parameter-file.prm"); diff --git a/tests/examples/step-35.with_umfpack=true.output b/tests/examples/step-35.with_umfpack=true.output new file mode 100644 index 0000000000..d0d89fb794 --- /dev/null +++ b/tests/examples/step-35.with_umfpack=true.output @@ -0,0 +1,12 @@ +Number of refines = 3 +Number of active cells: 3840 +dim (X_h) = 31424 +dim (M_h) = 4016 +Re = 100 + +Step = 2 Time = 0.01 +Step = 3 Time = 0.015 +Step = 4 Time = 0.02 +---------------------------------------------------- +Apparently everything went fine! +Don't forget to brush your teeth :-) \ No newline at end of file diff --git a/tests/examples/step-36.diff b/tests/examples/step-36.diff new file mode 100644 index 0000000000..561d79c198 --- /dev/null +++ b/tests/examples/step-36.diff @@ -0,0 +1,37 @@ +55c55 +< +--- +> #include "../example_test.h" +356,361c356,365 +< eigensolver.solve(stiffness_matrix, +< mass_matrix, +< eigenvalues, +< eigenfunctions, +< eigenfunctions.size()); +< +--- +> // eigensolver.solve(stiffness_matrix, +> // mass_matrix, +> // eigenvalues, +> // eigenfunctions, +> // eigenfunctions.size()); +> check_solver_within_range(std::cout, +> eigensolver.solve(stiffness_matrix, mass_matrix, eigenvalues, eigenfunctions, eigenfunctions.size());, +> solver_control.last_step(), +> 56, +> 58); +452,453c456,458 +< std::cout << " Solver converged in " << n_iterations << " iterations." +< << std::endl; +--- +> (void)n_iterations; +> // std::cout << " Solver converged in " << n_iterations << " iterations." +> // << std::endl; +455c460 +< output_results(); +--- +> // output_results(); +480c485 +< EigenvalueProblem<2> problem("step-36.prm"); +--- +> EigenvalueProblem<2> problem("../../../source/step-36/step-36.prm"); diff --git a/tests/examples/step-36.mpirun=1.with_petsc=true.with_slepc=true.output b/tests/examples/step-36.mpirun=1.with_petsc=true.with_slepc=true.output new file mode 100644 index 0000000000..baa2dd7d7e --- /dev/null +++ b/tests/examples/step-36.mpirun=1.with_petsc=true.with_slepc=true.output @@ -0,0 +1,12 @@ + Number of active cells: 1024 + Number of degrees of freedom: 1089 + Spurious eigenvalues are all in the interval [1536,1536] +Solver stopped within 56 - 58 iterations + + Eigenvalue 0 : 4.93877 + Eigenvalue 1 : 12.3707 + Eigenvalue 2 : 12.3707 + Eigenvalue 3 : 19.8027 + Eigenvalue 4 : 24.837 + + Job done. diff --git a/tests/examples/step-37.diff b/tests/examples/step-37.diff index 8450386e70..9466ff15af 100644 --- a/tests/examples/step-37.diff +++ b/tests/examples/step-37.diff @@ -1,3 +1,7 @@ +24c24 +< +--- +> #include "../example_test.h" 1003,1005c1003,1006 < smoother_data[0].smoothing_range = 1e-3; < smoother_data[0].degree = numbers::invalid_unsigned_int; @@ -12,12 +16,24 @@ > internal::EigenvalueAlgorithm::power_iteration; 1082d1084 < pcout << "Total setup time (wall) " << setup_time << "s\n"; -1092,1093c1094 +1087,1088c1089,1094 +< cg.solve(system_matrix, solution, system_rhs, preconditioner); +< +--- +> //cg.solve(system_matrix, solution, system_rhs, preconditioner); +> check_solver_within_range(std::cout, +> cg.solve(system_matrix, solution, system_rhs, preconditioner);, +> solver_control.last_step(), +> 4, +> 7); +1091,1093c1097,1098 +< pcout << "Time solve (" << solver_control.last_step() << " iterations)" < << (solver_control.last_step() < 10 ? " " : " ") << "(CPU/wall) " < << time.cpu_time() << "s/" << time.wall_time() << "s\n"; --- -> << std::endl; -1151,1161c1152 +> // pcout << "Time solve (" << solver_control.last_step() << " iterations)" +> // << std::endl; +1151,1161c1156 < { < const unsigned int n_vect_doubles = VectorizedArray::size(); < const unsigned int n_vect_bits = 8 * sizeof(double) * n_vect_doubles; @@ -31,3 +47,7 @@ < for (unsigned int cycle = 0; cycle < 9 - dim; ++cycle) --- > for (unsigned int cycle = 0; cycle < 5; ++cycle) +1174c1169 +< output_results(cycle); +--- +> // output_results(cycle); diff --git a/tests/examples/step-37.output b/tests/examples/step-37.output index cda4bbc678..30f72b77f6 100644 --- a/tests/examples/step-37.output +++ b/tests/examples/step-37.output @@ -1,20 +1,20 @@ Cycle 0 Number of degrees of freedom: 125 -Time solve (5 iterations) +Solver stopped within 4 - 7 iterations Cycle 1 Number of degrees of freedom: 729 -Time solve (6 iterations) +Solver stopped within 4 - 7 iterations Cycle 2 Number of degrees of freedom: 4913 -Time solve (6 iterations) +Solver stopped within 4 - 7 iterations Cycle 3 Number of degrees of freedom: 35937 -Time solve (6 iterations) +Solver stopped within 4 - 7 iterations Cycle 4 Number of degrees of freedom: 274625 -Time solve (6 iterations) +Solver stopped within 4 - 7 iterations diff --git a/tests/examples/step-38.diff b/tests/examples/step-38.diff new file mode 100644 index 0000000000..ce83a93753 --- /dev/null +++ b/tests/examples/step-38.diff @@ -0,0 +1,4 @@ +516c516 +< output_results(); +--- +> // output_results(); diff --git a/tests/examples/step-38.output b/tests/examples/step-38.output new file mode 100644 index 0000000000..48f11d4a0c --- /dev/null +++ b/tests/examples/step-38.output @@ -0,0 +1,3 @@ +Surface mesh has 1280 cells. +Surface mesh has 5185 degrees of freedom. +H1 error = 0.0212436 diff --git a/tests/examples/step-39.diff b/tests/examples/step-39.diff index 99f8dcb308..28ced61b8b 100644 --- a/tests/examples/step-39.diff +++ b/tests/examples/step-39.diff @@ -1,4 +1,8 @@ -991c991 +1042c1042 +< output_results(s); +--- +> // output_results(s); +1061c1061 < test1.run(12); --- > test1.run(3); diff --git a/tests/examples/step-39.output b/tests/examples/step-39.output index 40579e254f..798b803070 100644 --- a/tests/examples/step-39.output +++ b/tests/examples/step-39.output @@ -11,8 +11,6 @@ DEAL:cg::Convergence step 13 value 1.64974e-13 DEAL::energy-error: 0.297419 DEAL::L2-error: 0.00452447 DEAL::Estimate 0.990460 -DEAL::Writing solution to ... -DEAL:: DEAL::Step 1 DEAL::Triangulation 25 cells, 3 levels DEAL::DoFHandler 400 dofs, level dofs 64 256 192 @@ -25,8 +23,6 @@ DEAL:cg::Convergence step 14 value 3.72262e-13 DEAL::energy-error: 0.258559 DEAL::L2-error: 0.00288510 DEAL::Estimate 0.738624 -DEAL::Writing solution to ... -DEAL:: DEAL::Step 2 DEAL::Triangulation 34 cells, 4 levels DEAL::DoFHandler 544 dofs, level dofs 64 256 256 128 @@ -39,5 +35,3 @@ DEAL:cg::Convergence step 15 value 1.91610e-13 DEAL::energy-error: 0.189234 DEAL::L2-error: 0.00147954 DEAL::Estimate 0.657507 -DEAL::Writing solution to ... -DEAL:: -- 2.39.5