From 6cae09d5ed07422ab5115ee917526ee435171b3a Mon Sep 17 00:00:00 2001 From: Vladimir Yushutin Date: Fri, 5 Jul 2024 13:49:21 -0400 Subject: [PATCH] the vtk's are outputted now --- tests/examples/step-30.diff | 4 --- tests/examples/step-30.output | 14 +++++++- tests/examples/step-31.diff | 4 --- tests/examples/step-32.diff | 34 ++---------------- ....with_trilinos=true.with_p4est=true.output | 8 ----- tests/examples/step-33.diff | 24 ------------- tests/examples/step-34.diff | 26 -------------- tests/examples/step-35.diff | 36 ------------------- tests/examples/step-36.diff | 6 +--- ...n=1.with_petsc=true.with_slepc=true.output | 2 +- tests/examples/step-37.diff | 4 --- tests/examples/step-38.diff | 4 --- tests/examples/step-39.diff | 4 --- tests/examples/step-39.output | 6 ++++ 14 files changed, 23 insertions(+), 153 deletions(-) diff --git a/tests/examples/step-30.diff b/tests/examples/step-30.diff index 0fd2bd8ec4..8cbd8be268 100644 --- a/tests/examples/step-30.diff +++ b/tests/examples/step-30.diff @@ -8,7 +8,3 @@ --- > //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 index cbbbdd21e9..6a376aaa73 100644 --- a/tests/examples/step-30.output +++ b/tests/examples/step-30.output @@ -3,14 +3,20 @@ Performing a 2D run with isotropic refinement... Cycle 0: Number of active cells: 128 Number of degrees of freedom: 512 + Writing grid to ... + Writing solution to ... Cycle 1: Number of active cells: 239 Number of degrees of freedom: 956 + Writing grid to ... + Writing solution to ... Cycle 2: Number of active cells: 491 Number of degrees of freedom: 1964 + Writing grid to ... + Writing solution to ... Performing a 2D run with anisotropic refinement... @@ -18,12 +24,18 @@ Performing a 2D run with anisotropic refinement... Cycle 0: Number of active cells: 128 Number of degrees of freedom: 512 + Writing grid to ... + Writing solution to ... Cycle 1: Number of active cells: 173 Number of degrees of freedom: 692 + Writing grid to ... + Writing solution to ... Cycle 2: Number of active cells: 265 Number of degrees of freedom: 1060 - + Writing grid to ... + Writing solution to ... + diff --git a/tests/examples/step-31.diff b/tests/examples/step-31.diff index 2dc250924a..3c0208dbdf 100644 --- a/tests/examples/step-31.diff +++ b/tests/examples/step-31.diff @@ -28,10 +28,6 @@ --- > //std::cout << " " << solver_control.last_step() > // << " CG iterations for temperature." << std::endl; -2073c2073 -< output_results(); ---- -> //output_results(); 2095c2095 < while (time <= 100); --- diff --git a/tests/examples/step-32.diff b/tests/examples/step-32.diff index 02e4cf1346..16abdce9ed 100644 --- a/tests/examples/step-32.diff +++ b/tests/examples/step-32.diff @@ -17,7 +17,7 @@ < preconditioner); < --- -> check_solver_within_range(std::cout, +> check_solver_within_range(pcout, > solver.solve(stokes_matrix, distributed_stokes_solution, stokes_rhs, preconditioner), > solver_control.last_step(), > 22, @@ -33,7 +33,7 @@ < *T_preconditioner); < --- -> check_solver_within_range(std::cout, +> check_solver_within_range(pcout, > cg.solve(temperature_matrix, distributed_temperature_solution, temperature_rhs, *T_preconditioner), > solver_control.last_step(), > 16, @@ -44,42 +44,12 @@ --- > //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"; --- 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 index 160473f9e5..bca23987f3 100644 --- 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 @@ -4,11 +4,9 @@ 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 @@ -18,11 +16,9 @@ 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 @@ -32,21 +28,17 @@ 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 index 01a7fa1386..0a1c59bf80 100644 --- a/tests/examples/step-33.diff +++ b/tests/examples/step-33.diff @@ -7,14 +7,6 @@ --- > //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); --- @@ -36,22 +28,6 @@ > // 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) < { diff --git a/tests/examples/step-34.diff b/tests/examples/step-34.diff index 33e553346a..c615463177 100644 --- a/tests/examples/step-34.diff +++ b/tests/examples/step-34.diff @@ -6,28 +6,6 @@ < 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"); --- @@ -37,7 +15,3 @@ < 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-35.diff b/tests/examples/step-35.diff index 831eee15dd..1f01875166 100644 --- a/tests/examples/step-35.diff +++ b/tests/examples/step-35.diff @@ -6,42 +6,6 @@ < 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"); --- diff --git a/tests/examples/step-36.diff b/tests/examples/step-36.diff index 561d79c198..71b14bb77a 100644 --- a/tests/examples/step-36.diff +++ b/tests/examples/step-36.diff @@ -19,7 +19,7 @@ > eigensolver.solve(stiffness_matrix, mass_matrix, eigenvalues, eigenfunctions, eigenfunctions.size());, > solver_control.last_step(), > 56, -> 58); +> 68); 452,453c456,458 < std::cout << " Solver converged in " << n_iterations << " iterations." < << std::endl; @@ -27,10 +27,6 @@ > (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"); --- 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 index baa2dd7d7e..ad4586d2e3 100644 --- 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 @@ -1,7 +1,7 @@ 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 +Solver stopped within 56 - 68 iterations Eigenvalue 0 : 4.93877 Eigenvalue 1 : 12.3707 diff --git a/tests/examples/step-37.diff b/tests/examples/step-37.diff index 9466ff15af..7639c34251 100644 --- a/tests/examples/step-37.diff +++ b/tests/examples/step-37.diff @@ -47,7 +47,3 @@ < 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-38.diff b/tests/examples/step-38.diff index ce83a93753..e69de29bb2 100644 --- a/tests/examples/step-38.diff +++ b/tests/examples/step-38.diff @@ -1,4 +0,0 @@ -516c516 -< output_results(); ---- -> // output_results(); diff --git a/tests/examples/step-39.diff b/tests/examples/step-39.diff index 28ced61b8b..f2b603bf74 100644 --- a/tests/examples/step-39.diff +++ b/tests/examples/step-39.diff @@ -1,7 +1,3 @@ -1042c1042 -< output_results(s); ---- -> // output_results(s); 1061c1061 < test1.run(12); --- diff --git a/tests/examples/step-39.output b/tests/examples/step-39.output index 798b803070..40579e254f 100644 --- a/tests/examples/step-39.output +++ b/tests/examples/step-39.output @@ -11,6 +11,8 @@ 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 @@ -23,6 +25,8 @@ 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 @@ -35,3 +39,5 @@ 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