From 168a1b555170b414d22ed8028800dc07926ce78e Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 15 Aug 2021 17:12:46 -0600 Subject: [PATCH] Change post- to pre-increment statements in foor loops (tests/). --- .../basic_function_gradient_hessian_taped.cc | 12 ++--- .../adolc/basic_function_gradient_tapeless.cc | 6 +-- ...sic_functions_jacobian_taped-cpp_vector.cc | 12 ++--- tests/adolc/basic_functions_jacobian_taped.cc | 10 ++-- .../basic_functions_jacobian_tapeless.cc | 8 ++-- .../parpack_advection_diffusion_petsc.cc | 8 ++-- .../parpack_advection_diffusion_trilinos.cc | 8 ++-- tests/arpack/step-36_ar.cc | 2 +- tests/arpack/step-36_ar_shift.cc | 2 +- tests/arpack/step-36_ar_with_iterations.cc | 2 +- tests/arpack/step-36_parpack.cc | 12 ++--- tests/arpack/step-36_parpack_mf.cc | 6 +-- tests/arpack/step-36_parpack_mf_02.cc | 6 +-- tests/arpack/step-36_parpack_mf_03.cc | 6 +-- tests/arpack/step-36_parpack_trilinos.cc | 12 ++--- tests/base/bounding_box_1.cc | 4 +- tests/base/bounding_box_2.cc | 4 +- tests/base/bounding_box_3.cc | 10 ++-- tests/base/cell_data_storage_01.cc | 4 +- tests/base/cell_data_storage_02.cc | 4 +- tests/base/coordinate_restriction.cc | 2 +- tests/base/function_level_set.cc | 2 +- tests/base/functions_03.cc | 6 +-- tests/base/functions_14.cc | 6 +-- tests/base/functions_cspline.cc | 2 +- tests/base/functions_cspline_02.cc | 2 +- tests/base/functions_spherical_01.cc | 10 ++-- tests/base/functions_spherical_02.cc | 2 +- tests/base/geometric_utilities_01.cc | 4 +- tests/base/geometric_utilities_02.cc | 2 +- tests/base/geometry_info_9.cc | 2 +- tests/base/index_set_19.cc | 4 +- tests/base/index_set_22.cc | 2 +- .../base/mpi_noncontiguous_partitioner_01.cc | 4 +- .../base/mpi_noncontiguous_partitioner_02.cc | 20 ++++---- .../base/mpi_noncontiguous_partitioner_03.cc | 6 +-- tests/base/point_restriction.cc | 2 +- tests/base/polynomial_jacobi_roots.cc | 2 +- tests/base/polynomial_jacobi_roots_ld.cc | 2 +- tests/base/polynomial_minus_equals.cc | 2 +- tests/base/quadrature_point_data.cc | 4 +- tests/base/quadrature_point_data_02.cc | 4 +- tests/base/quadrature_point_data_03.cc | 4 +- tests/base/table_05.cc | 2 +- tests/base/taylor_estimate_function_bounds.cc | 10 ++-- tests/base/utilities_02b.cc | 4 +- tests/base/vectorization_11.cc | 2 +- tests/base/vectorization_13.cc | 4 +- tests/base/vectorization_14.cc | 2 +- tests/base/vectorization_15.cc | 2 +- tests/base/vectorization_iterator_01.cc | 2 +- tests/bits/anna_1.cc | 6 +-- tests/bits/anna_2.cc | 6 +-- tests/bits/count_dofs_per_component_hp_01.cc | 2 +- tests/bits/count_dofs_per_component_hp_02.cc | 2 +- tests/bits/find_cell_alt_6.cc | 2 +- tests/bits/find_cell_alt_7.cc | 2 +- tests/bits/find_cells_adjacent_to_vertex_1.cc | 4 +- tests/bits/find_cells_adjacent_to_vertex_2.cc | 4 +- tests/bits/find_cells_adjacent_to_vertex_3.cc | 4 +- tests/bits/find_cells_adjacent_to_vertex_4.cc | 4 +- tests/bits/find_cells_adjacent_to_vertex_5.cc | 4 +- tests/bits/find_cells_adjacent_to_vertex_6.cc | 4 +- tests/bits/find_closest_vertex_1.cc | 2 +- tests/bits/joa_1.cc | 2 +- .../bits/map_dofs_to_support_points_hp_01.cc | 2 +- .../bits/map_dofs_to_support_points_hp_02.cc | 2 +- tests/bits/periodicity_06.cc | 6 +-- tests/bits/point_inside_1.cc | 2 +- tests/bits/point_inside_2.cc | 2 +- tests/bits/roy_1.cc | 2 +- tests/bits/sparse_matrix_iterator_10.cc | 2 +- tests/bits/step-4_dg_periodic.cc | 4 +- tests/bits/step-4_dg_periodic_coupling.cc | 4 +- tests/codim_one/data_out_03.cc | 2 +- tests/codim_one/integrate_log.cc | 2 +- tests/codim_one/projection.cc | 2 +- tests/codim_one/projection_dgp.cc | 2 +- tests/codim_one/solution_transfer_01.cc | 4 +- tests/codim_one/tensor_matrix_conversion.cc | 28 +++++------ tests/cuda/parallel_vector_03a.cu | 2 +- .../data_out_complex_postprocessor_01.cc | 2 +- .../data_out_complex_postprocessor_02.cc | 2 +- tests/dofs/dof_tools_21_b.cc | 4 +- tests/dofs/dof_tools_21_c.cc | 4 +- tests/dofs/dof_tools_23.cc | 2 +- tests/fail/abf_approximation_01.cc | 10 ++-- tests/fail/fe_nothing_04.cc | 2 +- tests/fail/rt_distorted_01.cc | 8 ++-- tests/fail/rt_distorted_02.cc | 8 ++-- tests/fe/br_approximation_01.cc | 10 ++-- tests/fe/curl_curl_01.cc | 4 +- tests/fe/deformed_projection.h | 2 +- tests/fe/fe_enriched_04.cc | 4 +- tests/fe/fe_enriched_05.cc | 4 +- tests/fe/fe_enriched_06.cc | 6 +-- tests/fe/fe_enriched_07.cc | 4 +- tests/fe/fe_enriched_08.cc | 4 +- tests/fe/fe_enriched_color_05.cc | 4 +- tests/fe/fe_enriched_color_07.cc | 2 +- tests/fe/fe_enriched_color_08.cc | 2 +- tests/fe/fe_enriched_compare_to_fe_system.cc | 6 +-- .../fe/fe_enriched_compare_to_fe_system_2.cc | 8 ++-- tests/fe/fe_enriched_step-36.cc | 14 +++--- tests/fe/fe_enriched_step-36b.cc | 14 +++--- tests/fe/fe_nedelec_sz_non_rect_face.cc | 4 +- tests/fe/fe_series_01.cc | 4 +- tests/fe/fe_series_02.cc | 4 +- tests/fe/fe_series_03.cc | 6 +-- tests/fe/fe_series_04.cc | 14 +++--- tests/fe/fe_series_05.cc | 46 +++++++++--------- tests/fe/fe_series_06.cc | 8 ++-- tests/fe/fe_series_07.cc | 6 +-- tests/fe/fe_series_08.cc | 2 +- tests/fe/fe_values_view_21.cc | 2 +- tests/fe/fe_values_view_21_nonsymmetric.cc | 2 +- tests/fe/fe_values_view_22.cc | 6 +-- tests/fe/fe_values_view_tensor_01.cc | 6 +-- tests/fe/nedelec_non_rect_face.cc | 4 +- tests/fe/rt_approximation_01.cc | 10 ++-- tests/full_matrix/full_matrix_57.cc | 8 ++-- tests/full_matrix/full_matrix_common.h | 12 ++--- tests/full_matrix/full_matrix_invert_01.cc | 4 +- .../copy_distributed_tria_03.cc | 2 +- .../copy_serial_tria_08.cc | 2 +- .../copy_serial_tria_09.cc | 6 +-- .../repartitioning_02.cc | 2 +- .../repartitioning_03.cc | 2 +- .../repartitioning_04.cc | 2 +- tests/fullydistributed_grids/tests.h | 8 ++-- .../distributed_compute_point_locations_02.cc | 2 +- tests/grid/grid_tools_guess_pt_owner_01.cc | 4 +- tests/grid/grid_tools_guess_pt_owner_02.cc | 4 +- tests/grid/grid_transform_03.cc | 2 +- tests/hp/fe_nothing_01.cc | 2 +- tests/hp/fe_nothing_02.cc | 4 +- tests/hp/fe_nothing_03.cc | 2 +- tests/hp/fe_nothing_05.cc | 4 +- tests/hp/fe_nothing_06.cc | 4 +- tests/hp/fe_nothing_07.cc | 6 +-- tests/hp/fe_nothing_08.cc | 2 +- tests/hp/fe_nothing_09.cc | 2 +- tests/hp/fe_nothing_11.cc | 2 +- tests/hp/fe_nothing_12.cc | 2 +- tests/hp/fe_nothing_13.cc | 2 +- tests/hp/fe_nothing_14.cc | 2 +- tests/hp/fe_nothing_18.cc | 4 +- .../hp/hp_constraints_neither_dominate_01.cc | 10 ++-- .../hp/hp_constraints_neither_dominate_02.cc | 20 ++++---- tests/hp/hp_q_hierarchical_constraints.cc | 2 +- tests/hp/laplace.h | 12 ++--- tests/hp/laplace_mitchell2014_04_peak.cc | 2 +- tests/hp/solution_transfer_13.cc | 2 +- tests/lac/constraints_block_01.cc | 6 +-- tests/lac/inhomogeneous_constraints_04.cc | 4 +- tests/lac/quickmatrix.h | 2 +- tests/lac/solver_fire_rosenbrock_01.cc | 2 +- tests/lac/utilities_02.cc | 6 +-- tests/manifold/spherical_manifold_01.cc | 2 +- tests/manifold/spherical_manifold_04.cc | 2 +- tests/manifold/transfinite_manifold_07.cc | 10 ++-- tests/mappings/mapping_q_convergence.cc | 2 +- tests/mappings/mapping_q_eulerian.cc | 6 +-- tests/mappings/mapping_real_to_unit_02.cc | 4 +- tests/matrix_free/advect_1d.cc | 4 +- tests/matrix_free/advect_1d_system.cc | 4 +- .../advect_1d_vectorization_mask.cc | 4 +- tests/matrix_free/compare_faces_by_cells.cc | 4 +- tests/matrix_free/compute_diagonal_03.cc | 4 +- tests/matrix_free/compute_diagonal_util.h | 6 +-- tests/matrix_free/ecl_01.cc | 2 +- tests/matrix_free/ecl_02.cc | 12 ++--- tests/matrix_free/faces_value_optimization.cc | 2 +- .../faces_value_optimization_02.cc | 2 +- tests/matrix_free/fe_evaluation_print_01.cc | 8 ++-- tests/matrix_free/get_functions_common.h | 2 +- tests/matrix_free/get_functions_faces.cc | 2 +- tests/matrix_free/get_functions_multife.cc | 4 +- tests/matrix_free/get_functions_multife2.cc | 6 +-- tests/matrix_free/iterators.cc | 6 +-- tests/matrix_free/laplace_operator_02.cc | 2 +- .../matrix_free/matrix_vector_faces_common.h | 12 ++--- tests/matrix_free/multigrid_dg_periodic.cc | 8 ++-- tests/matrix_free/multigrid_dg_sip_01.cc | 8 ++-- tests/matrix_free/multigrid_dg_sip_02.cc | 4 +- tests/matrix_free/partitioner_01.cc | 8 ++-- tests/matrix_free/read_cell_data_01.cc | 10 ++-- tests/matrix_free/read_cell_data_02.cc | 4 +- tests/mpi/compute_index_owner_01.cc | 2 +- tests/mpi/crash_04.cc | 2 +- tests/mpi/has_hanging_nodes.cc | 2 +- tests/mpi/muelu_periodicity.cc | 4 +- tests/mpi/parallel_partitioner_08.cc | 2 +- tests/mpi/parallel_vector_03a.cc | 2 +- tests/mpi/parallel_vector_24.cc | 2 +- tests/mpi/periodicity_01.cc | 10 ++-- tests/mpi/periodicity_02.cc | 4 +- tests/mpi/periodicity_06.cc | 2 +- tests/mpi/periodicity_07.cc | 2 +- tests/mpi/petsc_step-27.cc | 4 +- tests/mpi/point_value_01.cc | 8 ++-- tests/mpi/trilinos_step-27.cc | 4 +- ...create_geometric_coarsening_sequence_01.cc | 4 +- ...reate_polynomial_coarsening_sequence_01.cc | 2 +- .../mg_transfer_a_01.cc | 2 +- .../mg_transfer_a_03.cc | 2 +- .../mg_transfer_p_01.cc | 2 +- .../mg_transfer_p_02.cc | 2 +- .../mg_transfer_p_04.cc | 2 +- .../mg_transfer_p_05.cc | 2 +- .../mg_transfer_support_01.cc | 4 +- .../mg_transfer_util.h | 8 ++-- .../multigrid_p_01.cc | 4 +- .../multigrid_util.h | 2 +- tests/multigrid/renumbering_06.cc | 4 +- tests/multigrid/renumbering_07.cc | 2 +- .../non_matching/face_quadrature_generator.cc | 2 +- .../find_best_height_direction.cc | 2 +- tests/non_matching/quadrature_printing.h | 6 +-- tests/non_matching/root_finder.cc | 2 +- tests/numerics/error_estimator_02.cc | 42 ++++++++-------- tests/numerics/error_estimator_02_complex.cc | 42 ++++++++-------- tests/numerics/history.cc | 18 +++---- tests/numerics/point_value_history_01.cc | 2 +- tests/numerics/point_value_history_02.cc | 4 +- tests/numerics/point_value_history_03.cc | 4 +- tests/numerics/project_bv_curl_conf_04.cc | 6 +-- tests/numerics/project_parallel_qp_common.h | 2 +- tests/numerics/project_parallel_qpmf_common.h | 2 +- tests/numerics/smoothness_estimator_01.cc | 48 +++++++++---------- tests/numerics/smoothness_estimator_02.cc | 12 ++--- tests/petsc/petsc_mf_testmatrix.h | 4 +- tests/petsc/slowness_01.cc | 8 ++-- tests/petsc/slowness_02.cc | 4 +- tests/petsc/slowness_03.cc | 8 ++-- tests/petsc/slowness_04.cc | 12 ++--- tests/petsc_complex/fe_get_function_values.cc | 2 +- .../parallel_sparse_matrix_01.cc | 2 +- tests/physics/elasticity-kinematics_02.cc | 26 +++++----- tests/quick_tests/adolc.cc | 12 ++--- tests/quick_tests/arpack.cc | 2 +- tests/quick_tests/gsl.cc | 2 +- tests/quick_tests/step-slepc.cc | 2 +- .../vector_tools_evaluate_at_points_01.cc | 2 +- tests/rol/vector_adaptor_apply_binary_01.cc | 4 +- tests/rol/vector_adaptor_no_ghost_01.cc | 6 +-- tests/rol/vector_adaptor_with_ghost_01.cc | 6 +-- tests/serialization/table_1.cc | 2 +- tests/simplex/fe_lib_02.cc | 6 +-- tests/simplex/fe_p_bubbles_01.cc | 6 +-- tests/simplex/matrix_free_04.cc | 4 +- tests/simplex/poisson_02.cc | 4 +- tests/simplex/polynomials_01.cc | 2 +- tests/slepc/solve_01.cc | 4 +- tests/slepc/solve_04.cc | 4 +- tests/slepc/step-36_parallel.cc | 6 +-- tests/slepc/step-36_parallel_02.cc | 6 +-- tests/slepc/step-36_parallel_03.cc | 6 +-- tests/slepc/testmatrix.h | 16 +++---- tests/symengine/basic_04.cc | 8 ++-- tests/symengine/basic_05.cc | 14 +++--- tests/symengine/cse_01.cc | 4 +- tests/symengine/cse_02.cc | 4 +- tests/symengine/cse_04.cc | 2 +- tests/tensors/symmetric_tensor_39.cc | 10 ++-- tests/tensors/tensor.cc | 2 +- tests/tensors/tensor_complex.cc | 2 +- tests/tensors/tensor_float.cc | 2 +- tests/testmatrix.h | 24 +++++----- tests/tests.h | 6 +-- tests/trilinos/renumbering_01.cc | 2 +- tests/trilinos/slowness_01.cc | 8 ++-- tests/trilinos/slowness_02.cc | 4 +- tests/trilinos/slowness_03.cc | 4 +- tests/trilinos/slowness_04.cc | 8 ++-- tests/trilinos/solver_control_05.cc | 4 +- tests/vector/vector_58.cc | 2 +- tests/zoltan/zoltan_02.cc | 2 +- tests/zoltan/zoltan_03.cc | 2 +- tests/zoltan/zoltan_04.cc | 2 +- 280 files changed, 761 insertions(+), 761 deletions(-) diff --git a/tests/adolc/basic_function_gradient_hessian_taped.cc b/tests/adolc/basic_function_gradient_hessian_taped.cc index b35338a99f..a9d0bf6baa 100644 --- a/tests/adolc/basic_function_gradient_hessian_taped.cc +++ b/tests/adolc/basic_function_gradient_hessian_taped.cc @@ -39,11 +39,11 @@ main(void) adouble *x = new adouble[n]; adouble y = 1.0; - for (unsigned int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; ++i) xp[i] = (i + 1.0) / (2.0 + i); trace_on(1); - for (unsigned int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; ++i) { x[i] <<= xp[i]; y *= x[i]; @@ -69,7 +69,7 @@ main(void) gradient(1, n, xp, g); double err_grad = 0; - for (unsigned int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; ++i) err_grad += std::abs(g[i] - yp / xp[i]); deallog << "Error (gradient): " << err_grad << std::endl; @@ -83,8 +83,8 @@ main(void) hessian(1, n, xp, H); double error_hess = 0; - for (unsigned int i = 0; i < n; i++) - for (unsigned int j = 0; j < n; j++) + for (unsigned int i = 0; i < n; ++i) + for (unsigned int j = 0; j < n; ++j) if (i > j) error_hess += std::abs(H[i][j] - g[i] / xp[j]); @@ -98,7 +98,7 @@ main(void) delete[] g; g = nullptr; - for (unsigned int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; ++i) delete[] H[i]; delete[] H; H = nullptr; diff --git a/tests/adolc/basic_function_gradient_tapeless.cc b/tests/adolc/basic_function_gradient_tapeless.cc index 7e08d08175..3103cfa157 100644 --- a/tests/adolc/basic_function_gradient_tapeless.cc +++ b/tests/adolc/basic_function_gradient_tapeless.cc @@ -35,14 +35,14 @@ main(void) adtl::setNumDir(n); adtl::adouble *x = new adtl::adouble[n]; - for (unsigned int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; ++i) { x[i] = (i + 1.0) / (2.0 + i); x[i].setADValue(i, 1); } adtl::adouble y = 1.0; - for (unsigned int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; ++i) y *= x[i]; // --- Function --- @@ -54,7 +54,7 @@ main(void) // --- Gradient --- double err_grad = 0; - for (unsigned int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; ++i) err_grad += std::abs(y.getADValue(i) - y.getValue() / x[i].getValue()); deallog << "Error (gradient): " << err_grad << std::endl; diff --git a/tests/adolc/basic_functions_jacobian_taped-cpp_vector.cc b/tests/adolc/basic_functions_jacobian_taped-cpp_vector.cc index 7e1312a9d2..e87d011e59 100644 --- a/tests/adolc/basic_functions_jacobian_taped-cpp_vector.cc +++ b/tests/adolc/basic_functions_jacobian_taped-cpp_vector.cc @@ -41,11 +41,11 @@ test_reset_vector_values(const bool reset_values, const int tape_index) std::vector y(m, 1.0); if (reset_values == false) - for (unsigned int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; ++i) xp[i] = (i + 1.0) / (2.0 + i); trace_on(tape_index); - for (unsigned int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; ++i) { x[i] <<= xp[i]; for (unsigned int j = 0; j < m; ++j) @@ -59,7 +59,7 @@ test_reset_vector_values(const bool reset_values, const int tape_index) // --- Change values --- if (reset_values == true) - for (unsigned int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; ++i) xp[i] = (i + 1.0) / (2.0 + i); // --- Functions --- @@ -84,9 +84,9 @@ test_reset_vector_values(const bool reset_values, const int tape_index) jacobian(tape_index, m, n, xp.data(), J); deallog << "Function jacobian J:" << std::endl; - for (unsigned int j = 0; j < m; j++) + for (unsigned int j = 0; j < m; ++j) { - for (unsigned int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; ++i) deallog << J[j][i] << (i < n - 1 ? "," : ""); deallog << std::endl; @@ -97,7 +97,7 @@ test_reset_vector_values(const bool reset_values, const int tape_index) delete[] f; f = nullptr; - for (unsigned int j = 0; j < m; j++) + for (unsigned int j = 0; j < m; ++j) delete[] J[j]; delete[] J; J = nullptr; diff --git a/tests/adolc/basic_functions_jacobian_taped.cc b/tests/adolc/basic_functions_jacobian_taped.cc index 8708143680..16ac4de056 100644 --- a/tests/adolc/basic_functions_jacobian_taped.cc +++ b/tests/adolc/basic_functions_jacobian_taped.cc @@ -39,14 +39,14 @@ main(void) adouble *x = new adouble[n]; adouble *y = new adouble[m]; - for (unsigned int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; ++i) xp[i] = (i + 1.0) / (2.0 + i); for (unsigned int j = 0; j < m; ++j) y[j] = 1.0; trace_on(1); - for (unsigned int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; ++i) { x[i] <<= xp[i]; for (unsigned int j = 0; j < m; ++j) @@ -83,9 +83,9 @@ main(void) jacobian(1, m, n, xp, J); deallog << "Function jacobian J:" << std::endl; - for (unsigned int j = 0; j < m; j++) + for (unsigned int j = 0; j < m; ++j) { - for (unsigned int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; ++i) deallog << J[j][i] << (i < n - 1 ? "," : ""); deallog << std::endl; @@ -99,7 +99,7 @@ main(void) delete[] f; f = nullptr; - for (unsigned int j = 0; j < m; j++) + for (unsigned int j = 0; j < m; ++j) delete[] J[j]; delete[] J; J = nullptr; diff --git a/tests/adolc/basic_functions_jacobian_tapeless.cc b/tests/adolc/basic_functions_jacobian_tapeless.cc index faa3af7e09..921c790d5a 100644 --- a/tests/adolc/basic_functions_jacobian_tapeless.cc +++ b/tests/adolc/basic_functions_jacobian_tapeless.cc @@ -36,7 +36,7 @@ main(void) adtl::setNumDir(n); adtl::adouble *x = new adtl::adouble[n]; - for (unsigned int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; ++i) { x[i] = (i + 1.0) / (2.0 + i); x[i].setADValue(i, 1); @@ -46,7 +46,7 @@ main(void) for (unsigned int j = 0; j < m; ++j) y[j] = 1.0; - for (unsigned int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; ++i) for (unsigned int j = 0; j < m; ++j) y[j] *= (j + 1) * x[i]; @@ -63,9 +63,9 @@ main(void) // --- Jacobian --- deallog << "Function jacobian J:" << std::endl; - for (unsigned int j = 0; j < m; j++) + for (unsigned int j = 0; j < m; ++j) { - for (unsigned int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; ++i) deallog << y[j].getADValue(i) << (i < n - 1 ? "," : ""); deallog << std::endl; diff --git a/tests/arpack/parpack_advection_diffusion_petsc.cc b/tests/arpack/parpack_advection_diffusion_petsc.cc index f1d9a89475..181b9f719d 100644 --- a/tests/arpack/parpack_advection_diffusion_petsc.cc +++ b/tests/arpack/parpack_advection_diffusion_petsc.cc @@ -102,7 +102,7 @@ locally_owned_dofs_per_subdomain(const DoFHandler &dof_handler) index_sets[this_subdomain].add_range(i_min, subdomain_association.size()); } - for (unsigned int i = 0; i < n_subdomains; i++) + for (unsigned int i = 0; i < n_subdomains; ++i) index_sets[i].compress(); return index_sets; @@ -207,7 +207,7 @@ test() /* keep constrained dofs */ true); std::vector n_locally_owned_dofs( n_mpi_processes); - for (unsigned int i = 0; i < n_mpi_processes; i++) + for (unsigned int i = 0; i < n_mpi_processes; ++i) n_locally_owned_dofs[i] = locally_owned_dofs_per_processor[i].n_elements(); dealii::SparsityTools::distribute_sparsity_pattern(csp, @@ -310,7 +310,7 @@ test() { std::vector> lambda(eigenfunctions.size()); - for (unsigned int i = 0; i < eigenvalues.size(); i++) + for (unsigned int i = 0; i < eigenvalues.size(); ++i) eigenfunctions[i] = PetscScalar(); dealii::SolverControl solver_control(dof_handler.n_dofs(), @@ -356,7 +356,7 @@ test() } } - for (unsigned int i = 0; i < eigenvalues.size(); i++) + for (unsigned int i = 0; i < eigenvalues.size(); ++i) dealii::deallog << eigenvalues[i] << std::endl; // make sure that we have eigenvectors and they are mass-normal: diff --git a/tests/arpack/parpack_advection_diffusion_trilinos.cc b/tests/arpack/parpack_advection_diffusion_trilinos.cc index 2d90d82fde..7cbb7ec21a 100644 --- a/tests/arpack/parpack_advection_diffusion_trilinos.cc +++ b/tests/arpack/parpack_advection_diffusion_trilinos.cc @@ -100,7 +100,7 @@ locally_owned_dofs_per_subdomain(const DoFHandler &dof_handler) index_sets[this_subdomain].add_range(i_min, subdomain_association.size()); } - for (unsigned int i = 0; i < n_subdomains; i++) + for (unsigned int i = 0; i < n_subdomains; ++i) index_sets[i].compress(); return index_sets; @@ -181,7 +181,7 @@ test() constraints, /* keep constrained dofs */ true); std::vector n_locally_owned_dofs(n_mpi_processes); - for (unsigned int i = 0; i < n_mpi_processes; i++) + for (unsigned int i = 0; i < n_mpi_processes; ++i) n_locally_owned_dofs[i] = locally_owned_dofs_per_processor[i].n_elements(); SparsityTools::distribute_sparsity_pattern(csp, @@ -281,7 +281,7 @@ test() const double shift = 4.0; std::vector> lambda(eigenfunctions.size()); - for (unsigned int i = 0; i < eigenvalues.size(); i++) + for (unsigned int i = 0; i < eigenvalues.size(); ++i) eigenfunctions[i] = 0.; @@ -348,7 +348,7 @@ test() } } - for (unsigned int i = 0; i < eigenvalues.size(); i++) + for (unsigned int i = 0; i < eigenvalues.size(); ++i) deallog << eigenvalues[i] << std::endl; // make sure that we have eigenvectors and they are mass-normal: diff --git a/tests/arpack/step-36_ar.cc b/tests/arpack/step-36_ar.cc index 67e6ddae5e..d54ccceedf 100644 --- a/tests/arpack/step-36_ar.cc +++ b/tests/arpack/step-36_ar.cc @@ -241,7 +241,7 @@ namespace Step36 { mass_matrix.vmult(Bx, eigenfunctions[i]); - for (unsigned int j = 0; j < eigenfunctions.size(); j++) + for (unsigned int j = 0; j < eigenfunctions.size(); ++j) if (std::abs(eigenfunctions[j] * Bx - (i == j)) > 1e-8) deallog << "Eigenvectors " + Utilities::int_to_string(i) + " and " + Utilities::int_to_string(j) + diff --git a/tests/arpack/step-36_ar_shift.cc b/tests/arpack/step-36_ar_shift.cc index a670d43e80..6376bd8cbe 100644 --- a/tests/arpack/step-36_ar_shift.cc +++ b/tests/arpack/step-36_ar_shift.cc @@ -246,7 +246,7 @@ namespace Step36 { mass_matrix.vmult(Bx, eigenfunctions[i]); - for (unsigned int j = 0; j < eigenfunctions.size(); j++) + for (unsigned int j = 0; j < eigenfunctions.size(); ++j) if (std::abs(eigenfunctions[j] * Bx - (i == j)) > 1e-8) deallog << "Eigenvectors " + Utilities::int_to_string(i) + " and " + Utilities::int_to_string(j) + diff --git a/tests/arpack/step-36_ar_with_iterations.cc b/tests/arpack/step-36_ar_with_iterations.cc index 67e6ddae5e..d54ccceedf 100644 --- a/tests/arpack/step-36_ar_with_iterations.cc +++ b/tests/arpack/step-36_ar_with_iterations.cc @@ -241,7 +241,7 @@ namespace Step36 { mass_matrix.vmult(Bx, eigenfunctions[i]); - for (unsigned int j = 0; j < eigenfunctions.size(); j++) + for (unsigned int j = 0; j < eigenfunctions.size(); ++j) if (std::abs(eigenfunctions[j] * Bx - (i == j)) > 1e-8) deallog << "Eigenvectors " + Utilities::int_to_string(i) + " and " + Utilities::int_to_string(j) + diff --git a/tests/arpack/step-36_parpack.cc b/tests/arpack/step-36_parpack.cc index 85572ca87e..4203cd1a2b 100644 --- a/tests/arpack/step-36_parpack.cc +++ b/tests/arpack/step-36_parpack.cc @@ -105,7 +105,7 @@ locally_owned_dofs_per_subdomain(const DoFHandler &dof_handler) index_sets[this_subdomain].add_range(i_min, subdomain_association.size()); } - for (unsigned int i = 0; i < n_subdomains; i++) + for (unsigned int i = 0; i < n_subdomains; ++i) index_sets[i].compress(); return index_sets; @@ -209,7 +209,7 @@ test() /* keep constrained dofs */ true); std::vector n_locally_owned_dofs( n_mpi_processes); - for (unsigned int i = 0; i < n_mpi_processes; i++) + for (unsigned int i = 0; i < n_mpi_processes; ++i) n_locally_owned_dofs[i] = locally_owned_dofs_per_processor[i].n_elements(); dealii::SparsityTools::distribute_sparsity_pattern(csp, @@ -298,7 +298,7 @@ test() { std::vector> lambda(eigenfunctions.size()); - for (unsigned int i = 0; i < eigenvalues.size(); i++) + for (unsigned int i = 0; i < eigenvalues.size(); ++i) eigenfunctions[i] = PetscScalar(); dealii::SolverControl solver_control(dof_handler.n_dofs(), @@ -326,10 +326,10 @@ test() eigenfunctions, eigenvalues.size()); - for (unsigned int i = 0; i < lambda.size(); i++) + for (unsigned int i = 0; i < lambda.size(); ++i) eigenvalues[i] = lambda[i].real(); - for (unsigned int i = 0; i < eigenvalues.size(); i++) + for (unsigned int i = 0; i < eigenvalues.size(); ++i) dealii::deallog << eigenvalues[i] << std::endl; // make sure that we have eigenvectors and they are mass-orthonormal: @@ -342,7 +342,7 @@ test() { mass_matrix.vmult(Bx, eigenfunctions[i]); - for (unsigned int j = 0; j < eigenfunctions.size(); j++) + for (unsigned int j = 0; j < eigenfunctions.size(); ++j) Assert(std::abs(eigenfunctions[j] * Bx - (i == j)) < precision, ExcMessage("Eigenvectors " + Utilities::int_to_string(i) + " and " + Utilities::int_to_string(j) + diff --git a/tests/arpack/step-36_parpack_mf.cc b/tests/arpack/step-36_parpack_mf.cc index cba4984387..3e608b0a24 100644 --- a/tests/arpack/step-36_parpack_mf.cc +++ b/tests/arpack/step-36_parpack_mf.cc @@ -180,10 +180,10 @@ test() eigenvalues.size()); deallog.depth_file(previous_depth); - for (unsigned int i = 0; i < lambda.size(); i++) + for (unsigned int i = 0; i < lambda.size(); ++i) eigenvalues[i] = lambda[i].real(); - for (unsigned int i = 0; i < eigenvalues.size(); i++) + for (unsigned int i = 0; i < eigenvalues.size(); ++i) deallog << eigenvalues[i] << std::endl; // make sure that we have eigenvectors and they are mass-orthonormal: @@ -197,7 +197,7 @@ test() { mass.vmult(Bx, eigenfunctions[i]); - for (unsigned int j = 0; j < eigenfunctions.size(); j++) + for (unsigned int j = 0; j < eigenfunctions.size(); ++j) Assert(std::abs(eigenfunctions[j] * Bx - (i == j)) < precision, ExcMessage("Eigenvectors " + Utilities::int_to_string(i) + " and " + Utilities::int_to_string(j) + diff --git a/tests/arpack/step-36_parpack_mf_02.cc b/tests/arpack/step-36_parpack_mf_02.cc index 2dc273a173..7d62acd873 100644 --- a/tests/arpack/step-36_parpack_mf_02.cc +++ b/tests/arpack/step-36_parpack_mf_02.cc @@ -177,10 +177,10 @@ test() laplace, mass, invert, lambda, eigenfunctions, eigenvalues.size()); deallog.depth_file(previous_depth); - for (unsigned int i = 0; i < lambda.size(); i++) + for (unsigned int i = 0; i < lambda.size(); ++i) eigenvalues[i] = lambda[i].real(); - for (unsigned int i = 0; i < eigenvalues.size(); i++) + for (unsigned int i = 0; i < eigenvalues.size(); ++i) deallog << eigenvalues[i] << std::endl; // make sure that we have eigenvectors and they are mass-orthonormal: @@ -194,7 +194,7 @@ test() { mass.vmult(Bx, eigenfunctions[i]); - for (unsigned int j = 0; j < eigenfunctions.size(); j++) + for (unsigned int j = 0; j < eigenfunctions.size(); ++j) { const double err = std::abs(eigenfunctions[j] * Bx - (i == j)); Assert(err < precision, diff --git a/tests/arpack/step-36_parpack_mf_03.cc b/tests/arpack/step-36_parpack_mf_03.cc index f325daa6a2..4b99c29950 100644 --- a/tests/arpack/step-36_parpack_mf_03.cc +++ b/tests/arpack/step-36_parpack_mf_03.cc @@ -178,10 +178,10 @@ test() laplace, mass, invert, lambda, eigenfunctions, eigenvalues.size()); deallog.depth_file(previous_depth); - for (unsigned int i = 0; i < lambda.size(); i++) + for (unsigned int i = 0; i < lambda.size(); ++i) eigenvalues[i] = lambda[i].real(); - for (unsigned int i = 0; i < eigenvalues.size(); i++) + for (unsigned int i = 0; i < eigenvalues.size(); ++i) deallog << eigenvalues[i] << std::endl; // make sure that we have eigenvectors and they are mass-orthonormal: @@ -192,7 +192,7 @@ test() LinearAlgebra::distributed::Vector Ax(eigenfunctions[0]); for (unsigned int i = 0; i < eigenfunctions.size(); ++i) { - for (unsigned int j = 0; j < eigenfunctions.size(); j++) + for (unsigned int j = 0; j < eigenfunctions.size(); ++j) { const double err = std::abs(eigenfunctions[j] * eigenfunctions[i] - (i == j)); diff --git a/tests/arpack/step-36_parpack_trilinos.cc b/tests/arpack/step-36_parpack_trilinos.cc index 5168fe5fd9..9fcbc6ad27 100644 --- a/tests/arpack/step-36_parpack_trilinos.cc +++ b/tests/arpack/step-36_parpack_trilinos.cc @@ -103,7 +103,7 @@ locally_owned_dofs_per_subdomain(const DoFHandler &dof_handler) index_sets[this_subdomain].add_range(i_min, subdomain_association.size()); } - for (unsigned int i = 0; i < n_subdomains; i++) + for (unsigned int i = 0; i < n_subdomains; ++i) index_sets[i].compress(); return index_sets; @@ -183,7 +183,7 @@ test() constraints, /* keep constrained dofs */ true); std::vector n_locally_owned_dofs(n_mpi_processes); - for (unsigned int i = 0; i < n_mpi_processes; i++) + for (unsigned int i = 0; i < n_mpi_processes; ++i) n_locally_owned_dofs[i] = locally_owned_dofs_per_processor[i].n_elements(); SparsityTools::distribute_sparsity_pattern(csp, @@ -270,7 +270,7 @@ test() const double shift = 4.0; std::vector> lambda(eigenfunctions.size()); - for (unsigned int i = 0; i < eigenvalues.size(); i++) + for (unsigned int i = 0; i < eigenvalues.size(); ++i) eigenfunctions[i] = 0.; static ReductionControl inner_control_c(/*maxiter*/ stiffness_matrix.m(), @@ -318,10 +318,10 @@ test() eigenvalues.size()); deallog.depth_file(previous_depth); - for (unsigned int i = 0; i < lambda.size(); i++) + for (unsigned int i = 0; i < lambda.size(); ++i) eigenvalues[i] = lambda[i].real(); - for (unsigned int i = 0; i < eigenvalues.size(); i++) + for (unsigned int i = 0; i < eigenvalues.size(); ++i) deallog << eigenvalues[i] << std::endl; // make sure that we have eigenvectors and they are mass-orthonormal: @@ -335,7 +335,7 @@ test() { mass_matrix.vmult(Bx, eigenfunctions[i]); - for (unsigned int j = 0; j < eigenfunctions.size(); j++) + for (unsigned int j = 0; j < eigenfunctions.size(); ++j) Assert(std::abs(eigenfunctions[j] * Bx - (i == j)) < precision, ExcMessage("Eigenvectors " + Utilities::int_to_string(i) + " and " + Utilities::int_to_string(j) + diff --git a/tests/base/bounding_box_1.cc b/tests/base/bounding_box_1.cc index 54fb19d7d1..8daaf493e7 100644 --- a/tests/base/bounding_box_1.cc +++ b/tests/base/bounding_box_1.cc @@ -33,7 +33,7 @@ test_bounding_box() std::pair, Point> boundaries; - for (int i = 0; i < spacedim; i++) + for (int i = 0; i < spacedim; ++i) { boundaries.first[i] = 0.2 - i * 0.2; boundaries.second[i] = 0.8 + i * 0.8; @@ -111,7 +111,7 @@ test_unitary() { std::pair, Point<3>> boundaries; - for (int i = 0; i < 3; i++) + for (int i = 0; i < 3; ++i) { boundaries.second[i] = 1.0; } diff --git a/tests/base/bounding_box_2.cc b/tests/base/bounding_box_2.cc index a496b65af0..041115f286 100644 --- a/tests/base/bounding_box_2.cc +++ b/tests/base/bounding_box_2.cc @@ -32,7 +32,7 @@ test_bounding_box() std::pair, Point> unit; - for (int i = 0; i < spacedim; i++) + for (int i = 0; i < spacedim; ++i) { unit.first[i] = 0.0; unit.second[i] = 1.0; @@ -50,7 +50,7 @@ test_bounding_box() deallog << b.get_boundary_points().second << std::endl; std::pair, Point> boundaries; - for (int i = 0; i < spacedim; i++) + for (int i = 0; i < spacedim; ++i) { unit.first[i] = 1.0; unit.second[i] = 2.0 + i; diff --git a/tests/base/bounding_box_3.cc b/tests/base/bounding_box_3.cc index 4188bbc297..ca5b343326 100644 --- a/tests/base/bounding_box_3.cc +++ b/tests/base/bounding_box_3.cc @@ -27,7 +27,7 @@ void test_bounding_box() { std::pair, Point> unit; - for (int i = 0; i < spacedim; i++) + for (int i = 0; i < spacedim; ++i) { unit.first[i] = 0.0; unit.second[i] = 1.0; @@ -43,7 +43,7 @@ test_bounding_box() // This is a simple neighbor std::pair, Point> second; - for (int i = 0; i < spacedim; i++) + for (int i = 0; i < spacedim; ++i) { second.first[i] = 1.0; second.second[i] = 2.0; @@ -68,7 +68,7 @@ test_bounding_box() std::pair, Point> second_1; second_1.first[0] = 0.0; second_1.second[0] = 1.0; - for (int i = 1; i < spacedim; i++) + for (int i = 1; i < spacedim; ++i) { second_1.first[i] = 1.0; second_1.second[i] = 2.0; @@ -160,7 +160,7 @@ test_bounding_box() deallog << "Is neighbor D with D: " << (int)d.get_neighbor_type(d) << std::endl; - for (int i = 0; i < spacedim; i++) + for (int i = 0; i < spacedim; ++i) { second.first[i] = -10.0; second.second[i] = -8.0; @@ -189,7 +189,7 @@ test_bounding_box() << std::endl; // A and F are mergeable because one next to the other - for (int i = 0; i < spacedim; i++) + for (int i = 0; i < spacedim; ++i) { second.first[i] = 0.0; second.second[i] = 1.0; diff --git a/tests/base/cell_data_storage_01.cc b/tests/base/cell_data_storage_01.cc index 87852df312..05a4455431 100644 --- a/tests/base/cell_data_storage_01.cc +++ b/tests/base/cell_data_storage_01.cc @@ -108,7 +108,7 @@ check_qph(Triangulation &tr, qpd_const_optional = manager_const.try_get_data(cell); AssertThrow(qpd_optional, ExcInternalError()); AssertThrow(qpd_const_optional, ExcInternalError()); - for (unsigned int q = 0; q < q_points.size(); q++) + for (unsigned int q = 0; q < q_points.size(); ++q) { const double correct_value = func.value(q_points[q]); const double value = qpd[q]->value; @@ -167,7 +167,7 @@ test() data_storage.initialize(cell, rhs.size()); std::vector> qpd = data_storage.get_data(cell); - for (unsigned int q = 0; q < rhs.size(); q++) + for (unsigned int q = 0; q < rhs.size(); ++q) qpd[q]->value = my_func.value(q_points[q]); { // before initialization of the next cell, try_get_data must diff --git a/tests/base/cell_data_storage_02.cc b/tests/base/cell_data_storage_02.cc index 700d33bb10..2a69f5b4c0 100644 --- a/tests/base/cell_data_storage_02.cc +++ b/tests/base/cell_data_storage_02.cc @@ -110,7 +110,7 @@ test() { std::vector> qpd = data_storage.get_data(cell); - for (unsigned int q = 0; q < rhs.size(); q++) + for (unsigned int q = 0; q < rhs.size(); ++q) qpd[q]->value = my_func.value(q_points[q]); } @@ -123,7 +123,7 @@ test() { std::vector> qpd = data_storage.get_data(cell); - for (unsigned int q = 0; q < rhs.size(); q++) + for (unsigned int q = 0; q < rhs.size(); ++q) AssertThrow(qpd[q]->value == default_value, ExcWrongValue(qpd[q]->value, default_value, diff --git a/tests/base/coordinate_restriction.cc b/tests/base/coordinate_restriction.cc index 91df745309..836f52d568 100644 --- a/tests/base/coordinate_restriction.cc +++ b/tests/base/coordinate_restriction.cc @@ -100,7 +100,7 @@ namespace test_all_coordinate_directions() { deallog << "dim = " << dim << std::endl; - for (unsigned int direction = 0; direction < dim; direction++) + for (unsigned int direction = 0; direction < dim; ++direction) test_truncates_derivatives_correctly(direction); } diff --git a/tests/base/function_level_set.cc b/tests/base/function_level_set.cc index 6402edede4..7ef37054a4 100644 --- a/tests/base/function_level_set.cc +++ b/tests/base/function_level_set.cc @@ -71,7 +71,7 @@ namespace const Functions::LevelSet::Plane level_set(point_in_plane, normal); Point point; - for (unsigned int i = 0; i < dim; i++) + for (unsigned int i = 0; i < dim; ++i) point[i] = 1; print_derivatives_at_point(level_set, point); diff --git a/tests/base/functions_03.cc b/tests/base/functions_03.cc index 87e07fc754..915d5e75c4 100644 --- a/tests/base/functions_03.cc +++ b/tests/base/functions_03.cc @@ -34,7 +34,7 @@ void check_value(const Function &f) { Point p; - for (unsigned int i = 0; i < dim; i++) + for (unsigned int i = 0; i < dim; ++i) p[i] = i; deallog << f.value(p) << std::endl; @@ -71,7 +71,7 @@ void check_gradient(const Function &f) { Point p; - for (unsigned int i = 0; i < dim; i++) + for (unsigned int i = 0; i < dim; ++i) p[i] = i; deallog << f.gradient(p) << std::endl; @@ -108,7 +108,7 @@ void check_laplacian(const Function &f) { Point p; - for (unsigned int i = 0; i < dim; i++) + for (unsigned int i = 0; i < dim; ++i) p[i] = i; deallog << f.laplacian(p) << std::endl; diff --git a/tests/base/functions_14.cc b/tests/base/functions_14.cc index 43edd767d1..0ba3d57553 100644 --- a/tests/base/functions_14.cc +++ b/tests/base/functions_14.cc @@ -37,7 +37,7 @@ check_value(const Function &f) { deallog << " d = " << d << std::endl; Point p; - for (unsigned int i = 0; i < dim; i++) + for (unsigned int i = 0; i < dim; ++i) p[i] = i; deallog << f.value(p, d) << std::endl; @@ -82,7 +82,7 @@ check_gradient(const Function &f) { deallog << " d = " << d << std::endl; Point p; - for (unsigned int i = 0; i < dim; i++) + for (unsigned int i = 0; i < dim; ++i) p[i] = i; deallog << f.gradient(p, d) << std::endl; @@ -127,7 +127,7 @@ check_laplacian(const Function &f) { deallog << " d = " << d << std::endl; Point p; - for (unsigned int i = 0; i < dim; i++) + for (unsigned int i = 0; i < dim; ++i) p[i] = i; deallog << f.laplacian(p, d) << std::endl; diff --git a/tests/base/functions_cspline.cc b/tests/base/functions_cspline.cc index 0e8a092d7d..e0ddef91e3 100644 --- a/tests/base/functions_cspline.cc +++ b/tests/base/functions_cspline.cc @@ -28,7 +28,7 @@ check() { const unsigned int n_points = 10; std::vector x(n_points), y(n_points); - for (unsigned int i = 0; i < n_points; i++) + for (unsigned int i = 0; i < n_points; ++i) { x[i] = i + 0.5 * std::sin(i); y[i] = i + std::cos(i * i); diff --git a/tests/base/functions_cspline_02.cc b/tests/base/functions_cspline_02.cc index b6bdf89375..5f4a060996 100644 --- a/tests/base/functions_cspline_02.cc +++ b/tests/base/functions_cspline_02.cc @@ -29,7 +29,7 @@ check() { const unsigned int n_points = 10; std::vector x(n_points), y(n_points); - for (unsigned int i = 0; i < n_points; i++) + for (unsigned int i = 0; i < n_points; ++i) { x[i] = i + 0.5 * std::sin(i); y[i] = i + std::cos(i * i); diff --git a/tests/base/functions_spherical_01.cc b/tests/base/functions_spherical_01.cc index b355e3c0e6..54dec7fd30 100644 --- a/tests/base/functions_spherical_01.cc +++ b/tests/base/functions_spherical_01.cc @@ -60,8 +60,8 @@ public: Assert(r > 0.0, ExcMessage("r is not positive")); dir /= r; SymmetricTensor<2, dim> dir_x_dir; - for (unsigned int i = 0; i < dim; i++) - for (unsigned int j = i; j < dim; j++) + for (unsigned int i = 0; i < dim; ++i) + for (unsigned int j = i; j < dim; ++j) dir_x_dir[i][j] = dir[i] * dir[j]; return Z * std::exp(-Z * r) * @@ -96,7 +96,7 @@ private: { std::array res; res[0] = -Z * std::exp(-Z * sp[0]); - for (unsigned int i = 1; i < dim; i++) + for (unsigned int i = 1; i < dim; ++i) res[i] = 0.; return res; } @@ -106,7 +106,7 @@ private: { std::array res; res[0] = Z * Z * std::exp(-Z * sp[0]); - for (unsigned int i = 1; i < 6; i++) + for (unsigned int i = 1; i < 6; ++i) res[i] = 0.; return res; } @@ -136,7 +136,7 @@ check() sp[1] = theta; sp[2] = phi; Point p = GeometricUtilities::Coordinates::from_spherical(sp); - for (unsigned int i = 0; i < dim; i++) + for (unsigned int i = 0; i < dim; ++i) p[i] += center[i]; // check values: diff --git a/tests/base/functions_spherical_02.cc b/tests/base/functions_spherical_02.cc index 15b5741dd9..5f093bdcc6 100644 --- a/tests/base/functions_spherical_02.cc +++ b/tests/base/functions_spherical_02.cc @@ -186,7 +186,7 @@ check() sp[1] = theta; sp[2] = phi; Point p = GeometricUtilities::Coordinates::from_spherical(sp); - for (unsigned int i = 0; i < dim; i++) + for (unsigned int i = 0; i < dim; ++i) p[i] += center[i]; // check values: diff --git a/tests/base/geometric_utilities_01.cc b/tests/base/geometric_utilities_01.cc index 6addbe91a6..8c52cc3fa2 100644 --- a/tests/base/geometric_utilities_01.cc +++ b/tests/base/geometric_utilities_01.cc @@ -49,11 +49,11 @@ test() const Point origin; std::array sorigin; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) sorigin[d] = 0.; Point one; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) one[d] = 1.; std::array sone; diff --git a/tests/base/geometric_utilities_02.cc b/tests/base/geometric_utilities_02.cc index 957551e074..be5aa4e195 100644 --- a/tests/base/geometric_utilities_02.cc +++ b/tests/base/geometric_utilities_02.cc @@ -49,7 +49,7 @@ test() Point p = GeometricUtilities::Coordinates::from_spherical(sp); const std::array sp2 = GeometricUtilities::Coordinates::to_spherical(p); - for (unsigned int i = 0; i < dim; i++) + for (unsigned int i = 0; i < dim; ++i) AssertThrow(std::fabs(sp[i] - sp2[i]) <= std::fabs(sp[i]) * 1e-10, DifferentComponent(i, sp[i], sp2[i])); } diff --git a/tests/base/geometry_info_9.cc b/tests/base/geometry_info_9.cc index e541d602b6..ffdd7dd9c6 100644 --- a/tests/base/geometry_info_9.cc +++ b/tests/base/geometry_info_9.cc @@ -36,7 +36,7 @@ test() GeometryInfo::unit_normal_vector[i]; deallog << "Direction " << i << " = " << unit_normal_vector << std::endl; // check consistency with other arrays within GeometryInfo - for (unsigned int j = 0; j < dim; j++) + for (unsigned int j = 0; j < dim; ++j) { const double obtained = unit_normal_vector[j]; const double expected = diff --git a/tests/base/index_set_19.cc b/tests/base/index_set_19.cc index 3c1a9c32d8..3a0981357a 100644 --- a/tests/base/index_set_19.cc +++ b/tests/base/index_set_19.cc @@ -41,11 +41,11 @@ test() is1.print(deallog); deallog << "List of indices: " << std::endl; - for (unsigned int i = 0; i < indices.size(); i++) + for (unsigned int i = 0; i < indices.size(); ++i) deallog << indices[i] << ' '; deallog << std::endl; - for (unsigned int i = 0; i < indices.size(); i++) + for (unsigned int i = 0; i < indices.size(); ++i) Assert(is1.index_within_set(indices[i]) == i, ExcInternalError()); deallog << "OK" << std::endl; diff --git a/tests/base/index_set_22.cc b/tests/base/index_set_22.cc index a1b8494fa8..a6eef8e565 100644 --- a/tests/base/index_set_22.cc +++ b/tests/base/index_set_22.cc @@ -40,7 +40,7 @@ test() deallog << "Original index set: " << std::endl; is1.print(deallog); - for (unsigned int i = 0; i < is1.size(); i++) + for (unsigned int i = 0; i < is1.size(); ++i) Assert(is1.is_element(i) == zeros_and_ones[i], ExcInternalError()); deallog << "OK" << std::endl; diff --git a/tests/base/mpi_noncontiguous_partitioner_01.cc b/tests/base/mpi_noncontiguous_partitioner_01.cc index c7bd832f79..914944e68b 100644 --- a/tests/base/mpi_noncontiguous_partitioner_01.cc +++ b/tests/base/mpi_noncontiguous_partitioner_01.cc @@ -53,10 +53,10 @@ test(const MPI_Comm comm) src.size()), ArrayView(dst.data(), dst.size())); - for (size_t i = 0; i < src.size(); i++) + for (size_t i = 0; i < src.size(); ++i) deallog << static_cast(src[i]) << " "; deallog << std::endl; - for (size_t i = 0; i < dst.size(); i++) + for (size_t i = 0; i < dst.size(); ++i) deallog << static_cast(dst[i]) << " "; deallog << std::endl; } diff --git a/tests/base/mpi_noncontiguous_partitioner_02.cc b/tests/base/mpi_noncontiguous_partitioner_02.cc index 4814fba27f..3d82e53e58 100644 --- a/tests/base/mpi_noncontiguous_partitioner_02.cc +++ b/tests/base/mpi_noncontiguous_partitioner_02.cc @@ -78,7 +78,7 @@ test(const MPI_Comm &comm, const bool do_revert, const unsigned int dir) if (cell->is_active() && cell->is_locally_owned()) { auto c = cell->center(); - for (unsigned int i = 0; i < dim; i++) + for (unsigned int i = 0; i < dim; ++i) c[i] = c[i] / delta; const auto lid = static_cast(norm_point_to_lex(c)); @@ -98,14 +98,14 @@ test(const MPI_Comm &comm, const bool do_revert, const unsigned int dir) if (dim == 2 && dir == 0) { - for (unsigned int j = 0, c = start * n_points_face; j < end; j++) - for (unsigned int i = start; i < n_points_1D; i++) + for (unsigned int j = 0, c = start * n_points_face; j < end; ++j) + for (unsigned int i = start; i < n_points_1D; ++i) indices_want.push_back(c++); } else if (dim == 2 && dir == 1) { - for (unsigned int j = 0; j < n_points_1D; j++) - for (unsigned int i = start; i < end; i++) + for (unsigned int j = 0; j < n_points_1D; ++j) + for (unsigned int i = start; i < end; ++i) indices_want.push_back(j * n_points_face + i); } else @@ -119,7 +119,7 @@ test(const MPI_Comm &comm, const bool do_revert, const unsigned int dir) comm); AlignedVector src(indices_has.size()); - for (unsigned int i = 0; i < indices_has.size(); i++) + for (unsigned int i = 0; i < indices_has.size(); ++i) src[i] = indices_has[i]; @@ -129,15 +129,15 @@ test(const MPI_Comm &comm, const bool do_revert, const unsigned int dir) src.size()), ArrayView(dst.data(), dst.size())); - for (size_t i = 0; i < src.size(); i++) + for (size_t i = 0; i < src.size(); ++i) deallog << static_cast(src[i]) << " "; deallog << std::endl; - for (size_t i = 0; i < dst.size(); i++) + for (size_t i = 0; i < dst.size(); ++i) deallog << static_cast(dst[i]) << " "; deallog << std::endl << std::endl; - for (size_t i = 0; i < dst.size(); i++) + for (size_t i = 0; i < dst.size(); ++i) AssertDimension(dst[i], indices_want[i]); } @@ -145,7 +145,7 @@ template void test_dim(const MPI_Comm &comm, const bool do_revert) { - for (int dir = 0; dir < dim; dir++) + for (int dir = 0; dir < dim; ++dir) test(comm, do_revert, dir); } diff --git a/tests/base/mpi_noncontiguous_partitioner_03.cc b/tests/base/mpi_noncontiguous_partitioner_03.cc index 103892f4de..b456fb2316 100644 --- a/tests/base/mpi_noncontiguous_partitioner_03.cc +++ b/tests/base/mpi_noncontiguous_partitioner_03.cc @@ -33,17 +33,17 @@ test(const MPI_Comm comm, AlignedVector src(index_set_has.size(), 0); AlignedVector dst(index_set_want.size(), 0); - for (unsigned int i = 0; i < index_set_has.size(); i++) + for (unsigned int i = 0; i < index_set_has.size(); ++i) src[i] = Utilities::MPI::this_mpi_process(comm) * 100 + i; vector.export_to_ghosted_array(ArrayView(src.data(), src.size()), ArrayView(dst.data(), dst.size())); - for (size_t i = 0; i < src.size(); i++) + for (size_t i = 0; i < src.size(); ++i) deallog << static_cast(src[i]) << " "; deallog << std::endl; - for (size_t i = 0; i < dst.size(); i++) + for (size_t i = 0; i < dst.size(); ++i) deallog << static_cast(dst[i]) << " "; deallog << std::endl; } diff --git a/tests/base/point_restriction.cc b/tests/base/point_restriction.cc index d8850b6f9c..acc9fc78d1 100644 --- a/tests/base/point_restriction.cc +++ b/tests/base/point_restriction.cc @@ -109,7 +109,7 @@ namespace { deallog << "dim = " << dim << std::endl; - for (unsigned int direction = 0; direction < dim; direction++) + for (unsigned int direction = 0; direction < dim; ++direction) test_truncates_derivatives_correctly(direction); } diff --git a/tests/base/polynomial_jacobi_roots.cc b/tests/base/polynomial_jacobi_roots.cc index 15e4baeb6a..7169c9a046 100644 --- a/tests/base/polynomial_jacobi_roots.cc +++ b/tests/base/polynomial_jacobi_roots.cc @@ -43,7 +43,7 @@ main() AssertDimension(roots.size(), degree); Vector roots_reference(degree); LAPACKFullMatrix eigenvalue_mat(degree, degree); - for (unsigned int k = 1; k < degree; k++) + for (unsigned int k = 1; k < degree; ++k) { eigenvalue_mat(k - 1, k) = std::sqrt( 4. * k * (k + alpha) * (k + beta) * (k + alpha + beta) / diff --git a/tests/base/polynomial_jacobi_roots_ld.cc b/tests/base/polynomial_jacobi_roots_ld.cc index a1b8aaeae7..e0045bfded 100644 --- a/tests/base/polynomial_jacobi_roots_ld.cc +++ b/tests/base/polynomial_jacobi_roots_ld.cc @@ -43,7 +43,7 @@ main() AssertDimension(roots.size(), degree); Vector roots_reference(degree); LAPACKFullMatrix eigenvalue_mat(degree, degree); - for (unsigned int k = 1; k < degree; k++) + for (unsigned int k = 1; k < degree; ++k) { eigenvalue_mat(k - 1, k) = std::sqrt( 4. * k * (k + alpha) * (k + beta) * (k + alpha + beta) / diff --git a/tests/base/polynomial_minus_equals.cc b/tests/base/polynomial_minus_equals.cc index 2c9db7c420..30591eb587 100644 --- a/tests/base/polynomial_minus_equals.cc +++ b/tests/base/polynomial_minus_equals.cc @@ -45,7 +45,7 @@ main() // arbitrary point double evalutation_number = 12.123; - for (unsigned int pp = 0; pp < p_dim; pp++) + for (unsigned int pp = 0; pp < p_dim; ++pp) { coefficients_a.push_back(pp); diff --git a/tests/base/quadrature_point_data.cc b/tests/base/quadrature_point_data.cc index b794779fe6..458a5005a3 100644 --- a/tests/base/quadrature_point_data.cc +++ b/tests/base/quadrature_point_data.cc @@ -123,7 +123,7 @@ check_qph(parallel::distributed::Triangulation &tr, fe_values.get_quadrature_points(); const std::vector> qpd = manager.get_data(cell); - for (unsigned int q = 0; q < q_points.size(); q++) + for (unsigned int q = 0; q < q_points.size(); ++q) { const double value = func.value(q_points[q]); const double value2 = qpd[q]->value; @@ -171,7 +171,7 @@ test() data_storage.initialize(cell, rhs.size()); std::vector> qpd = data_storage.get_data(cell); - for (unsigned int q = 0; q < rhs.size(); q++) + for (unsigned int q = 0; q < rhs.size(); ++q) qpd[q]->value = my_func.value(q_points[q]); } dof_handler.clear(); diff --git a/tests/base/quadrature_point_data_02.cc b/tests/base/quadrature_point_data_02.cc index 8438534171..ba0ffbc5eb 100644 --- a/tests/base/quadrature_point_data_02.cc +++ b/tests/base/quadrature_point_data_02.cc @@ -127,7 +127,7 @@ check_qph(parallel::distributed::Triangulation &tr, fe_values.get_quadrature_points(); const std::vector> qpd = manager.get_data(cell); - for (unsigned int q = 0; q < q_points.size(); q++) + for (unsigned int q = 0; q < q_points.size(); ++q) { const double f_1 = func.value(q_points[q], 0); const double f_2 = func.value(q_points[q], 1); @@ -180,7 +180,7 @@ test() data_storage.initialize(cell, rhs.size()); std::vector> qpd = data_storage.get_data(cell); - for (unsigned int q = 0; q < rhs.size(); q++) + for (unsigned int q = 0; q < rhs.size(); ++q) { qpd[q]->value1 = my_func.value(q_points[q], 0); qpd[q]->value2 = my_func.value(q_points[q], 1); diff --git a/tests/base/quadrature_point_data_03.cc b/tests/base/quadrature_point_data_03.cc index 556afd4361..2355ecf37c 100644 --- a/tests/base/quadrature_point_data_03.cc +++ b/tests/base/quadrature_point_data_03.cc @@ -134,7 +134,7 @@ check_qph(parallel::distributed::Triangulation &tr, fe_values.get_quadrature_points(); const std::vector> qpd = manager.template get_data(cell); - for (unsigned int q = 0; q < q_points.size(); q++) + for (unsigned int q = 0; q < q_points.size(); ++q) { const double f_1 = func.value(q_points[q], 0); const double f_2 = func.value(q_points[q], 1); @@ -186,7 +186,7 @@ test() data_storage.template initialize(cell, rhs.size()); std::vector> qpd = data_storage.template get_data(cell); - for (unsigned int q = 0; q < rhs.size(); q++) + for (unsigned int q = 0; q < rhs.size(); ++q) { qpd[q]->value1 = my_func.value(q_points[q], 0); qpd[q]->value2 = my_func.value(q_points[q], 1); diff --git a/tests/base/table_05.cc b/tests/base/table_05.cc index bdb9cc305a..9109c2f393 100644 --- a/tests/base/table_05.cc +++ b/tests/base/table_05.cc @@ -25,7 +25,7 @@ void test() { dealii::TableIndices new_size; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) new_size[d] = 5; dealii::Table unrolled; diff --git a/tests/base/taylor_estimate_function_bounds.cc b/tests/base/taylor_estimate_function_bounds.cc index 2904529df2..a400ddb6ff 100644 --- a/tests/base/taylor_estimate_function_bounds.cc +++ b/tests/base/taylor_estimate_function_bounds.cc @@ -36,7 +36,7 @@ namespace create_box() { std::pair, Point> lower_upper_corner; - for (unsigned int i = 0; i < dim; i++) + for (unsigned int i = 0; i < dim; ++i) { lower_upper_corner.first[i] = -1.0 / (i + 1); lower_upper_corner.second[i] = 1.0 / (i + 1); @@ -72,7 +72,7 @@ namespace gradient(const Point &, const unsigned int) const override { Tensor<1, dim> grad; - for (unsigned int i = 0; i < dim; i++) + for (unsigned int i = 0; i < dim; ++i) grad[i] = i + 1; return grad; @@ -82,8 +82,8 @@ namespace hessian(const Point &, const unsigned int) const { SymmetricTensor<2, dim> hess; - for (unsigned int i = 0; i < dim; i++) - for (unsigned int j = 0; j < dim; j++) + for (unsigned int i = 0; i < dim; ++i) + for (unsigned int j = 0; j < dim; ++j) hess[i][j] = (i + 1) * (j + 1); return hess; @@ -123,7 +123,7 @@ namespace deallog << "value: "; print_bounds(value_bounds); - for (unsigned int i = 0; i < dim; i++) + for (unsigned int i = 0; i < dim; ++i) { deallog << "gradient[" << i << "]: "; print_bounds(gradient_bounds[i]); diff --git a/tests/base/utilities_02b.cc b/tests/base/utilities_02b.cc index c78d196d17..3606ec4e31 100644 --- a/tests/base/utilities_02b.cc +++ b/tests/base/utilities_02b.cc @@ -30,13 +30,13 @@ do_test(const VectorizedArrayType array) auto exponentiated_array = Utilities::fixed_power<3>(array); - for (unsigned int i = 0; i < VectorizedArrayType::size(); i++) + for (unsigned int i = 0; i < VectorizedArrayType::size(); ++i) deallog << exponentiated_array[i] << " "; deallog << std::endl; exponentiated_array = Utilities::fixed_power<-3>(array); - for (unsigned int i = 0; i < VectorizedArrayType::size(); i++) + for (unsigned int i = 0; i < VectorizedArrayType::size(); ++i) deallog << exponentiated_array[i] << " "; deallog << std::endl; } diff --git a/tests/base/vectorization_11.cc b/tests/base/vectorization_11.cc index 50085f79fc..4b8dde362e 100644 --- a/tests/base/vectorization_11.cc +++ b/tests/base/vectorization_11.cc @@ -31,7 +31,7 @@ do_test(const VectorizedArrayType array, { deallog << " test " << VectorizedArrayType::size() << " array elements" << std::endl; - for (unsigned int i = 0; i < VectorizedArrayType::size(); i++) + for (unsigned int i = 0; i < VectorizedArrayType::size(); ++i) if (array[i] != number) deallog << " problem in element " << i << std::endl; } diff --git a/tests/base/vectorization_13.cc b/tests/base/vectorization_13.cc index a85dfae652..ab84e66ed6 100644 --- a/tests/base/vectorization_13.cc +++ b/tests/base/vectorization_13.cc @@ -31,7 +31,7 @@ do_test(const VectorizedArrayType array, auto exponentiated_array = std::pow(array, number); - for (unsigned int i = 0; i < VectorizedArrayType::size(); i++) + for (unsigned int i = 0; i < VectorizedArrayType::size(); ++i) deallog << exponentiated_array[i] << " "; deallog << std::endl; } @@ -46,7 +46,7 @@ do_test(const VectorizedArrayType array, const VectorizedArrayType number) auto exponentiated_array = std::pow(array, number); - for (unsigned int i = 0; i < VectorizedArrayType::size(); i++) + for (unsigned int i = 0; i < VectorizedArrayType::size(); ++i) deallog << exponentiated_array[i] << " "; deallog << std::endl; } diff --git a/tests/base/vectorization_14.cc b/tests/base/vectorization_14.cc index ee8d224075..41bbf856d8 100644 --- a/tests/base/vectorization_14.cc +++ b/tests/base/vectorization_14.cc @@ -29,7 +29,7 @@ do_test() << std::endl; VectorizedArrayType left; - for (unsigned int i = 0; i < VectorizedArrayType::size(); i++) + for (unsigned int i = 0; i < VectorizedArrayType::size(); ++i) left[i] = i + 1.; VectorizedArrayType right(3.); diff --git a/tests/base/vectorization_15.cc b/tests/base/vectorization_15.cc index 294ee67058..8c1d441da1 100644 --- a/tests/base/vectorization_15.cc +++ b/tests/base/vectorization_15.cc @@ -39,7 +39,7 @@ do_test() offsets[v] = v * n_numbers; std::array other_and_offset; - for (unsigned int v = 0; v < width; v++) + for (unsigned int v = 0; v < width; ++v) other_and_offset[v] = other + offsets[v]; for (unsigned int i = 0; i < n_vectors; ++i) diff --git a/tests/base/vectorization_iterator_01.cc b/tests/base/vectorization_iterator_01.cc index da85b477ff..05c11d39dd 100644 --- a/tests/base/vectorization_iterator_01.cc +++ b/tests/base/vectorization_iterator_01.cc @@ -49,7 +49,7 @@ test() { VectorizedArray vector; - for (unsigned int v = 0; v < VectorizedArray::size(); v++) + for (unsigned int v = 0; v < VectorizedArray::size(); ++v) vector[v] = v; test_const(vector); diff --git a/tests/bits/anna_1.cc b/tests/bits/anna_1.cc index 2340aa953d..c687fb55d4 100644 --- a/tests/bits/anna_1.cc +++ b/tests/bits/anna_1.cc @@ -95,7 +95,7 @@ SystemTest::shape_to_components() // (i.e. the first component of the FESystem) // 1 for yes, 0 for no. - for (unsigned int i = 0; i < fe.dofs_per_cell; i++) + for (unsigned int i = 0; i < fe.dofs_per_cell; ++i) deallog << " shapefunction " << i << " is Nedelec: " << (fe.is_primitive(i) ? "false" : "true") << std::endl; @@ -115,7 +115,7 @@ SystemTest::check_numbering() for (; cell != endc; ++cell) { cell->get_dof_indices(local_dof_indices); - for (unsigned int i = 0; i < fe.dofs_per_cell; i++) + for (unsigned int i = 0; i < fe.dofs_per_cell; ++i) deallog << " DoF " << local_dof_indices[i] << " belongs to base element " << fe.system_to_base_index(i).first.first << ", instance " @@ -136,7 +136,7 @@ SystemTest::check_numbering() for (; cell != endc; ++cell) { cell->get_dof_indices(local_dof_indices); - for (unsigned int i = 0; i < fe.dofs_per_cell; i++) + for (unsigned int i = 0; i < fe.dofs_per_cell; ++i) deallog << " DoF " << local_dof_indices[i] << " belongs to base " << fe.system_to_base_index(i).first.first << ", instance " << fe.system_to_base_index(i).first.second << std::endl; diff --git a/tests/bits/anna_2.cc b/tests/bits/anna_2.cc index d0c93d860a..93e71f2d4a 100644 --- a/tests/bits/anna_2.cc +++ b/tests/bits/anna_2.cc @@ -99,7 +99,7 @@ SystemTest::shape_to_components() // (i.e. the first component of the FESystem) // 1 for yes, 0 for no. - for (unsigned int i = 0; i < fe.dofs_per_cell; i++) + for (unsigned int i = 0; i < fe.dofs_per_cell; ++i) deallog << " shapefunction " << i << " is Nedelec: " << (fe.is_primitive(i) ? "false" : "true") << std::endl; @@ -119,7 +119,7 @@ SystemTest::check_numbering() for (; cell != endc; ++cell) { cell->get_dof_indices(local_dof_indices); - for (unsigned int i = 0; i < fe.dofs_per_cell; i++) + for (unsigned int i = 0; i < fe.dofs_per_cell; ++i) deallog << " DoF " << local_dof_indices[i] << " belongs to base element " << fe.system_to_base_index(i).first.first << ", instance " @@ -143,7 +143,7 @@ SystemTest::check_numbering() for (; cell != endc; ++cell) { cell->get_dof_indices(local_dof_indices); - for (unsigned int i = 0; i < fe.dofs_per_cell; i++) + for (unsigned int i = 0; i < fe.dofs_per_cell; ++i) deallog << " DoF " << local_dof_indices[i] << " belongs to base " << fe.system_to_base_index(i).first.first << ", instance " << fe.system_to_base_index(i).first.second << std::endl; diff --git a/tests/bits/count_dofs_per_component_hp_01.cc b/tests/bits/count_dofs_per_component_hp_01.cc index 65d5fbb3de..d6f7dd7497 100644 --- a/tests/bits/count_dofs_per_component_hp_01.cc +++ b/tests/bits/count_dofs_per_component_hp_01.cc @@ -56,7 +56,7 @@ test() const std::vector dofs_per_component = DoFTools::count_dofs_per_fe_component(dof_handler); - for (unsigned int i = 0; i < 3; i++) + for (unsigned int i = 0; i < 3; ++i) { deallog << "DoFs in the " << i << ". component: " << dofs_per_component.at(i) << std::endl; diff --git a/tests/bits/count_dofs_per_component_hp_02.cc b/tests/bits/count_dofs_per_component_hp_02.cc index 8cf3ac5280..83a2432b20 100644 --- a/tests/bits/count_dofs_per_component_hp_02.cc +++ b/tests/bits/count_dofs_per_component_hp_02.cc @@ -70,7 +70,7 @@ test() const std::vector dofs_per_component_hp = DoFTools::count_dofs_per_fe_component(hp_dof_handler); - for (unsigned int i = 0; i < 3; i++) + for (unsigned int i = 0; i < 3; ++i) { deallog << "DoFs in the " << i << ". component: " << dofs_per_component_hp.at(i) << std::endl; diff --git a/tests/bits/find_cell_alt_6.cc b/tests/bits/find_cell_alt_6.cc index 1d332511d0..aade2a7759 100644 --- a/tests/bits/find_cell_alt_6.cc +++ b/tests/bits/find_cell_alt_6.cc @@ -47,7 +47,7 @@ check(Triangulation<2> &tria) const std::vector> &v = tria.get_vertices(); MappingQ<2> map(1); - for (unsigned i = 0; i < tria.n_vertices(); i++) + for (unsigned i = 0; i < tria.n_vertices(); ++i) { std::pair::active_cell_iterator, Point<2>> cell = GridTools::find_active_cell_around_point(map, tria, v[i]); diff --git a/tests/bits/find_cell_alt_7.cc b/tests/bits/find_cell_alt_7.cc index dbc994cd7c..f19aa8028b 100644 --- a/tests/bits/find_cell_alt_7.cc +++ b/tests/bits/find_cell_alt_7.cc @@ -39,7 +39,7 @@ check(Triangulation<2> &tria) MappingQ<2> map(5); // Test for a number of points, every ten degrees - for (unsigned int i = 0; i < 200; i++) + for (unsigned int i = 0; i < 200; ++i) { Point<2> p(std::sin((double)i / 100. * numbers::PI), std::cos((double)i / 100. * numbers::PI)); diff --git a/tests/bits/find_cells_adjacent_to_vertex_1.cc b/tests/bits/find_cells_adjacent_to_vertex_1.cc index 6cdde75db4..03e7502891 100644 --- a/tests/bits/find_cells_adjacent_to_vertex_1.cc +++ b/tests/bits/find_cells_adjacent_to_vertex_1.cc @@ -42,7 +42,7 @@ void check(Triangulation<2> &tria) { - for (unsigned i = 0; i < tria.n_vertices(); i++) + for (unsigned i = 0; i < tria.n_vertices(); ++i) { std::vector::active_cell_iterator> cells = GridTools::find_cells_adjacent_to_vertex(tria, i); @@ -50,7 +50,7 @@ check(Triangulation<2> &tria) deallog << "Vertex " << i << " at " << tria.get_vertices()[i] << ": " << cells.size() << " cells" << std::endl; - for (unsigned c = 0; c < cells.size(); c++) + for (unsigned c = 0; c < cells.size(); ++c) { for (const unsigned int v : GeometryInfo<2>::vertex_indices()) deallog << "<" << cells[c]->vertex(v) << "> "; diff --git a/tests/bits/find_cells_adjacent_to_vertex_2.cc b/tests/bits/find_cells_adjacent_to_vertex_2.cc index 0267a58527..b0e7e39509 100644 --- a/tests/bits/find_cells_adjacent_to_vertex_2.cc +++ b/tests/bits/find_cells_adjacent_to_vertex_2.cc @@ -31,7 +31,7 @@ void check(Triangulation<3> &tria) { - for (unsigned i = 0; i < tria.n_vertices(); i++) + for (unsigned i = 0; i < tria.n_vertices(); ++i) { std::vector::active_cell_iterator> cells = GridTools::find_cells_adjacent_to_vertex(tria, i); @@ -39,7 +39,7 @@ check(Triangulation<3> &tria) deallog << "Vertex " << i << " at " << tria.get_vertices()[i] << ": " << cells.size() << " cells" << std::endl; - for (unsigned c = 0; c < cells.size(); c++) + for (unsigned c = 0; c < cells.size(); ++c) deallog << " " << cells[c] << std::endl; } } diff --git a/tests/bits/find_cells_adjacent_to_vertex_3.cc b/tests/bits/find_cells_adjacent_to_vertex_3.cc index ab28706eb8..0638334408 100644 --- a/tests/bits/find_cells_adjacent_to_vertex_3.cc +++ b/tests/bits/find_cells_adjacent_to_vertex_3.cc @@ -33,7 +33,7 @@ void check(Triangulation<2> &tria) { - for (unsigned i = 0; i < tria.n_vertices(); i++) + for (unsigned i = 0; i < tria.n_vertices(); ++i) { std::vector::active_cell_iterator> cells = GridTools::find_cells_adjacent_to_vertex(tria, i); @@ -41,7 +41,7 @@ check(Triangulation<2> &tria) deallog << "Vertex " << i << " at " << tria.get_vertices()[i] << ": " << cells.size() << " cells" << std::endl; - for (unsigned c = 0; c < cells.size(); c++) + for (unsigned c = 0; c < cells.size(); ++c) deallog << " " << cells[c] << std::endl; } } diff --git a/tests/bits/find_cells_adjacent_to_vertex_4.cc b/tests/bits/find_cells_adjacent_to_vertex_4.cc index c941b31dba..fcb940632f 100644 --- a/tests/bits/find_cells_adjacent_to_vertex_4.cc +++ b/tests/bits/find_cells_adjacent_to_vertex_4.cc @@ -33,7 +33,7 @@ void check(Triangulation<2> &tria) { - for (unsigned i = 0; i < tria.n_vertices(); i++) + for (unsigned i = 0; i < tria.n_vertices(); ++i) { std::vector::active_cell_iterator> cells = GridTools::find_cells_adjacent_to_vertex(tria, i); @@ -41,7 +41,7 @@ check(Triangulation<2> &tria) deallog << "Vertex " << i << " at " << tria.get_vertices()[i] << ": " << cells.size() << " cells" << std::endl; - for (unsigned c = 0; c < cells.size(); c++) + for (unsigned c = 0; c < cells.size(); ++c) deallog << " " << cells[c] << std::endl; } } diff --git a/tests/bits/find_cells_adjacent_to_vertex_5.cc b/tests/bits/find_cells_adjacent_to_vertex_5.cc index a265fd2a9c..5ef4abafe1 100644 --- a/tests/bits/find_cells_adjacent_to_vertex_5.cc +++ b/tests/bits/find_cells_adjacent_to_vertex_5.cc @@ -32,7 +32,7 @@ void check(Triangulation<3> &tria) { - for (unsigned i = 0; i < tria.n_vertices(); i++) + for (unsigned i = 0; i < tria.n_vertices(); ++i) { std::vector::active_cell_iterator> cells = GridTools::find_cells_adjacent_to_vertex(tria, i); @@ -40,7 +40,7 @@ check(Triangulation<3> &tria) deallog << "Vertex " << i << " at " << tria.get_vertices()[i] << ": " << cells.size() << " cells" << std::endl; - for (unsigned c = 0; c < cells.size(); c++) + for (unsigned c = 0; c < cells.size(); ++c) deallog << " " << cells[c] << std::endl; } } diff --git a/tests/bits/find_cells_adjacent_to_vertex_6.cc b/tests/bits/find_cells_adjacent_to_vertex_6.cc index 6dc0e6c535..ced43ce0aa 100644 --- a/tests/bits/find_cells_adjacent_to_vertex_6.cc +++ b/tests/bits/find_cells_adjacent_to_vertex_6.cc @@ -37,7 +37,7 @@ void check(Triangulation<3> &tria) { - for (unsigned i = 0; i < tria.n_vertices(); i++) + for (unsigned i = 0; i < tria.n_vertices(); ++i) { std::vector::active_cell_iterator> cells = GridTools::find_cells_adjacent_to_vertex(tria, i); @@ -45,7 +45,7 @@ check(Triangulation<3> &tria) deallog << "Vertex " << i << " at " << tria.get_vertices()[i] << ": " << cells.size() << " cells" << std::endl; - for (unsigned c = 0; c < cells.size(); c++) + for (unsigned c = 0; c < cells.size(); ++c) deallog << " " << cells[c] << std::endl; } } diff --git a/tests/bits/find_closest_vertex_1.cc b/tests/bits/find_closest_vertex_1.cc index b458c5c481..b839dc59b9 100644 --- a/tests/bits/find_closest_vertex_1.cc +++ b/tests/bits/find_closest_vertex_1.cc @@ -34,7 +34,7 @@ void check(Triangulation<3> &tria) { const std::vector> &v = tria.get_vertices(); - for (unsigned i = 0; i < v.size(); i++) + for (unsigned i = 0; i < v.size(); ++i) deallog << "[" << GridTools::find_closest_vertex(tria, v[i] + diff --git a/tests/bits/joa_1.cc b/tests/bits/joa_1.cc index 5f5d83eabf..940ef814c7 100644 --- a/tests/bits/joa_1.cc +++ b/tests/bits/joa_1.cc @@ -1083,7 +1083,7 @@ LaplaceProblem::run() // definitely inside the domain (we here // have a circle of radius 1, so find // points inside a radius of 0.9) - for (int i = 0; i < 1000; i++) + for (int i = 0; i < 1000; ++i) { double r = sqrt(.9 * random_value()); double phi = 2 * 3.14 * (1.0 * Testing::rand() / RAND_MAX); diff --git a/tests/bits/map_dofs_to_support_points_hp_01.cc b/tests/bits/map_dofs_to_support_points_hp_01.cc index 234710c5c9..70366e9ec4 100644 --- a/tests/bits/map_dofs_to_support_points_hp_01.cc +++ b/tests/bits/map_dofs_to_support_points_hp_01.cc @@ -66,7 +66,7 @@ test() DoFTools::map_dofs_to_support_points(mapping_collection, dof_handler, hp_map); // output the elements - for (unsigned int i = 0; i < hp_map.size(); i++) + for (unsigned int i = 0; i < hp_map.size(); ++i) { // both maps should contain the same Assert(hp_map[i] == map[i], ExcInternalError()); diff --git a/tests/bits/map_dofs_to_support_points_hp_02.cc b/tests/bits/map_dofs_to_support_points_hp_02.cc index 725649a1f2..8260f66f88 100644 --- a/tests/bits/map_dofs_to_support_points_hp_02.cc +++ b/tests/bits/map_dofs_to_support_points_hp_02.cc @@ -73,7 +73,7 @@ test() hp_map); // output the elements - for (unsigned int i = 0; i < hp_map.size(); i++) + for (unsigned int i = 0; i < hp_map.size(); ++i) { deallog << " Location of " << i << " th DoF: " << hp_map[i] << " | "; } diff --git a/tests/bits/periodicity_06.cc b/tests/bits/periodicity_06.cc index 0f8db09d30..396eca2312 100644 --- a/tests/bits/periodicity_06.cc +++ b/tests/bits/periodicity_06.cc @@ -151,14 +151,14 @@ check_periodicity(const DoFHandler<2> &dof_handler, const unsigned int cycle) { unsigned int n_points = 2; - for (unsigned int i = 0; i < cycle; i++) + for (unsigned int i = 0; i < cycle; ++i) n_points *= 2; // don't test exactly at the support points, since point_value is not stable // there const double eps = 1. / (16. * n_points); - for (unsigned int i = 1; i < n_points; i++) + for (unsigned int i = 1; i < n_points; ++i) { Vector value1(1); Vector value2(1); @@ -187,7 +187,7 @@ check_periodicity(const DoFHandler<2> &dof_handler, << "pass" << std::endl; } } - for (unsigned int i = 1; i < n_points; i++) + for (unsigned int i = 1; i < n_points; ++i) { Vector value1(1); Vector value2(1); diff --git a/tests/bits/point_inside_1.cc b/tests/bits/point_inside_1.cc index 69a2577a39..253082acd4 100644 --- a/tests/bits/point_inside_1.cc +++ b/tests/bits/point_inside_1.cc @@ -55,7 +55,7 @@ check() const bool expected2d[] = {1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0}; const bool expected3d[] = {1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0}; const bool *expected = dim == 2 ? expected2d : expected3d; - for (int i = 0; i < 11; i++) + for (int i = 0; i < 11; ++i) { Point testpoint; testpoint(0) = testcoord[i][0]; diff --git a/tests/bits/point_inside_2.cc b/tests/bits/point_inside_2.cc index f4b600be6d..0748d6f31d 100644 --- a/tests/bits/point_inside_2.cc +++ b/tests/bits/point_inside_2.cc @@ -70,7 +70,7 @@ check() const bool expected2d[] = {1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1}; const bool expected3d[] = {1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0}; const bool *expected = dim == 2 ? expected2d : expected3d; - for (int i = 0; i < 14; i++) + for (int i = 0; i < 14; ++i) { Point testpoint; testpoint(0) = testcoord[i][0]; diff --git a/tests/bits/roy_1.cc b/tests/bits/roy_1.cc index fe22f50c97..00300ce96d 100644 --- a/tests/bits/roy_1.cc +++ b/tests/bits/roy_1.cc @@ -34,7 +34,7 @@ void check(const FiniteElement &fe) { for (const unsigned int face : GeometryInfo::face_indices()) - for (unsigned int i = 0; i < fe.dofs_per_cell; i++) + for (unsigned int i = 0; i < fe.dofs_per_cell; ++i) if (fe.has_support_on_face(i, face)) deallog << "Basis function " << i << " has support on face " << face << std::endl; diff --git a/tests/bits/sparse_matrix_iterator_10.cc b/tests/bits/sparse_matrix_iterator_10.cc index 52422db793..7ad62744a2 100644 --- a/tests/bits/sparse_matrix_iterator_10.cc +++ b/tests/bits/sparse_matrix_iterator_10.cc @@ -41,7 +41,7 @@ test() SparseMatrix A(sparsity); // and loop over the elements of it - for (SparseMatrix::const_iterator k = A.begin(); k != A.end(); k++) + for (SparseMatrix::const_iterator k = A.begin(); k != A.end(); ++k) deallog << k->row() << ' ' << k->column() << ' ' << k->value() << std::endl; } diff --git a/tests/bits/step-4_dg_periodic.cc b/tests/bits/step-4_dg_periodic.cc index 0c6bfc1193..b7b1e7fef3 100644 --- a/tests/bits/step-4_dg_periodic.cc +++ b/tests/bits/step-4_dg_periodic.cc @@ -254,7 +254,7 @@ void Step4<2>::check_periodicity(const unsigned int cycle) const { unsigned int n_points = 4; - for (unsigned int i = 0; i < cycle; i++) + for (unsigned int i = 0; i < cycle; ++i) n_points *= 2; // don't test exactly at the support points, since point_value is not stable @@ -263,7 +263,7 @@ Step4<2>::check_periodicity(const unsigned int cycle) const bool all_passed = true; - for (unsigned int i = 1; i < n_points; i++) + for (unsigned int i = 1; i < n_points; ++i) { Vector value1(1); Vector value2(1); diff --git a/tests/bits/step-4_dg_periodic_coupling.cc b/tests/bits/step-4_dg_periodic_coupling.cc index f42c82d40a..051e14388b 100644 --- a/tests/bits/step-4_dg_periodic_coupling.cc +++ b/tests/bits/step-4_dg_periodic_coupling.cc @@ -261,7 +261,7 @@ void Step4<2>::check_periodicity(const unsigned int cycle) const { unsigned int n_points = 4; - for (unsigned int i = 0; i < cycle; i++) + for (unsigned int i = 0; i < cycle; ++i) n_points *= 2; // don't test exactly at the support points, since point_value is not stable @@ -270,7 +270,7 @@ Step4<2>::check_periodicity(const unsigned int cycle) const bool all_passed = true; - for (unsigned int i = 1; i < n_points; i++) + for (unsigned int i = 1; i < n_points; ++i) { Vector value1(1); Vector value2(1); diff --git a/tests/codim_one/data_out_03.cc b/tests/codim_one/data_out_03.cc index 33628d148c..8cbf80b7d8 100644 --- a/tests/codim_one/data_out_03.cc +++ b/tests/codim_one/data_out_03.cc @@ -57,7 +57,7 @@ public: virtual void vector_value(const Point &p, Vector &values) const { - for (unsigned int i = 0; i < dim; i++) + for (unsigned int i = 0; i < dim; ++i) values(i) = p(i); } }; diff --git a/tests/codim_one/integrate_log.cc b/tests/codim_one/integrate_log.cc index d06f41a2f1..6c8029d877 100644 --- a/tests/codim_one/integrate_log.cc +++ b/tests/codim_one/integrate_log.cc @@ -146,7 +146,7 @@ main() for (unsigned int j = 0; j < 13; ++j) { exact_integral = 0; - for (unsigned int k = 0; k <= j; k++) + for (unsigned int k = 0; k <= j; ++k) exact_integral += newton_binomial(j, k) * pow(a, static_cast(j - k)) * (pow(b - a, static_cast(k) + 1) / (k + 1) * log(b - a) - diff --git a/tests/codim_one/projection.cc b/tests/codim_one/projection.cc index 0d85e93a44..0c6ffd80fe 100644 --- a/tests/codim_one/projection.cc +++ b/tests/codim_one/projection.cc @@ -85,7 +85,7 @@ main() { initlog(); - for (unsigned int n = 1; n < 5; n++) + for (unsigned int n = 1; n < 5; ++n) { deallog << "Test<1,2>, continuous finite element q_" << n << std::endl; test<1, 2>(SOURCE_DIR "/grids/circle_2.inp", n); diff --git a/tests/codim_one/projection_dgp.cc b/tests/codim_one/projection_dgp.cc index a0db1cf570..774f2bed05 100644 --- a/tests/codim_one/projection_dgp.cc +++ b/tests/codim_one/projection_dgp.cc @@ -88,7 +88,7 @@ main() { initlog(); - for (unsigned int n = 1; n < 5; n++) + for (unsigned int n = 1; n < 5; ++n) { deallog << "Test<1,2>, continuous finite element q_" << n << std::endl; test<1, 2>(SOURCE_DIR "/grids/circle_2.inp", n); diff --git a/tests/codim_one/solution_transfer_01.cc b/tests/codim_one/solution_transfer_01.cc index 171da1bb51..9dc5e2f8ae 100644 --- a/tests/codim_one/solution_transfer_01.cc +++ b/tests/codim_one/solution_transfer_01.cc @@ -69,7 +69,7 @@ main() solution = 1.0; deallog << "Old values:" << std::endl; - for (unsigned int i = 0; i < solution.size(); i++) + for (unsigned int i = 0; i < solution.size(); ++i) deallog << solution(i) << std::endl; @@ -92,7 +92,7 @@ main() soltrans.interpolate(solution, tmp); deallog << "New values:" << std::endl; - for (unsigned int i = 0; i < tmp.size(); i++) + for (unsigned int i = 0; i < tmp.size(); ++i) deallog << tmp(i) << std::endl; return 0; diff --git a/tests/codim_one/tensor_matrix_conversion.cc b/tests/codim_one/tensor_matrix_conversion.cc index dddce75e51..018a675cb8 100644 --- a/tests/codim_one/tensor_matrix_conversion.cc +++ b/tests/codim_one/tensor_matrix_conversion.cc @@ -29,8 +29,8 @@ template void fill_matrix(FullMatrix &A) { - for (unsigned int i = 0; i < A.m(); i++) - for (unsigned int j = 0; j < A.n(); j++) + for (unsigned int i = 0; i < A.m(); ++i) + for (unsigned int j = 0; j < A.n(); ++j) A(i, j) = number(i * A.n() + j + 1); } @@ -39,9 +39,9 @@ void display_matrix(FullMatrix M) { deallog << M.m() << "x" << M.n() << " matrix" << std::endl; - for (unsigned int i = 0; i < M.m(); i++) + for (unsigned int i = 0; i < M.m(); ++i) { - for (unsigned int j = 0; j < M.n(); j++) + for (unsigned int j = 0; j < M.n(); ++j) deallog << M(i, j) << " "; deallog << std::endl; } @@ -51,8 +51,8 @@ template void fill_tensor_2(Tensor<2, b> &T) { - for (unsigned int i = 0; i < b; i++) - for (unsigned int j = 0; j < b; j++) + for (unsigned int i = 0; i < b; ++i) + for (unsigned int j = 0; j < b; ++j) T[i][j] = i * b + j + 1; } @@ -62,9 +62,9 @@ void display_tensor_2(Tensor<2, b> &T) { deallog << b << "x" << b << " tensor" << std::endl; - for (unsigned int i = 0; i < b; i++) + for (unsigned int i = 0; i < b; ++i) { - for (unsigned int j = 0; j < b; j++) + for (unsigned int j = 0; j < b; ++j) deallog << T[i][j] << " "; deallog << std::endl; } @@ -79,9 +79,9 @@ main() Tensor<2, 3> T1; fill_tensor_2(T1); - for (unsigned int n = 0; n < 3; n++) - for (unsigned int i = 0; i < 10 - n; i++) - for (unsigned int j = 0; j < 10 - n; j++) + for (unsigned int n = 0; n < 3; ++n) + for (unsigned int i = 0; i < 10 - n; ++i) + for (unsigned int j = 0; j < 10 - n; ++j) { A1.copy_from(T1, 0, n, 0, n, i, j); display_matrix(A1); @@ -91,9 +91,9 @@ main() FullMatrix A2(3, 3); fill_matrix(A2); Tensor<2, 3> T2; - for (unsigned int n = 0; n < 3; n++) - for (unsigned int i = 0; i < 3 - n; i++) - for (unsigned int j = 0; j < 3 - n; j++) + for (unsigned int n = 0; n < 3; ++n) + for (unsigned int i = 0; i < 3 - n; ++i) + for (unsigned int j = 0; j < 3 - n; ++j) { A2.copy_to(T2, 0, n, 0, n, i, j); display_tensor_2(T2); diff --git a/tests/cuda/parallel_vector_03a.cu b/tests/cuda/parallel_vector_03a.cu index 458b900a40..47f510ab7e 100644 --- a/tests/cuda/parallel_vector_03a.cu +++ b/tests/cuda/parallel_vector_03a.cu @@ -89,7 +89,7 @@ test() indexset_1.add_index(5); indexset_1.compress(); LinearAlgebra::ReadWriteVector rw_vector(indexset_1); - for (unsigned int i = 0; i < local_nonzero.n_elements(); i++) + for (unsigned int i = 0; i < local_nonzero.n_elements(); ++i) rw_vector(local_nonzero.nth_index_in_set(i)) = local_nonzero.nth_index_in_set(i); diff --git a/tests/data_out/data_out_complex_postprocessor_01.cc b/tests/data_out/data_out_complex_postprocessor_01.cc index b5e8c041d8..82e842a0f4 100644 --- a/tests/data_out/data_out_complex_postprocessor_01.cc +++ b/tests/data_out/data_out_complex_postprocessor_01.cc @@ -69,7 +69,7 @@ ComputeMagnitude::evaluate_vector_field( ExcDimensionMismatch(computed_quantities.size(), inputs.solution_values.size())); - for (unsigned int i = 0; i < computed_quantities.size(); i++) + for (unsigned int i = 0; i < computed_quantities.size(); ++i) { Assert(computed_quantities[i].size() == 1, ExcDimensionMismatch(computed_quantities[i].size(), 1)); diff --git a/tests/data_out/data_out_complex_postprocessor_02.cc b/tests/data_out/data_out_complex_postprocessor_02.cc index 1260423cc6..c8d38486d3 100644 --- a/tests/data_out/data_out_complex_postprocessor_02.cc +++ b/tests/data_out/data_out_complex_postprocessor_02.cc @@ -89,7 +89,7 @@ ComputeMagnitudes::evaluate_vector_field( ExcDimensionMismatch(computed_quantities.size(), inputs.solution_values.size())); - for (unsigned int i = 0; i < computed_quantities.size(); i++) + for (unsigned int i = 0; i < computed_quantities.size(); ++i) { Assert(computed_quantities[i].size() == 2, ExcDimensionMismatch(computed_quantities[i].size(), 2)); diff --git a/tests/dofs/dof_tools_21_b.cc b/tests/dofs/dof_tools_21_b.cc index 30839fabb2..3593fee820 100644 --- a/tests/dofs/dof_tools_21_b.cc +++ b/tests/dofs/dof_tools_21_b.cc @@ -295,7 +295,7 @@ print_matching(DoFHandler &dof_handler, // Print out all DoF support points on the two faces: deallog << "DoFs of face_1:"; - for (unsigned int c = 0; c < fe.n_components(); c++) + for (unsigned int c = 0; c < fe.n_components(); ++c) { deallog << std::endl << " component " << c << ":"; for (unsigned int i = 0; i < fe.dofs_per_face; ++i) @@ -307,7 +307,7 @@ print_matching(DoFHandler &dof_handler, } deallog << std::endl; deallog << "DoFs of face_2:"; - for (unsigned int c = 0; c < fe.n_components(); c++) + for (unsigned int c = 0; c < fe.n_components(); ++c) { deallog << std::endl << " component " << c << ":"; for (unsigned int i = 0; i < fe.dofs_per_face; ++i) diff --git a/tests/dofs/dof_tools_21_c.cc b/tests/dofs/dof_tools_21_c.cc index 68df610d91..fad55f205f 100644 --- a/tests/dofs/dof_tools_21_c.cc +++ b/tests/dofs/dof_tools_21_c.cc @@ -301,7 +301,7 @@ print_matching(DoFHandler &dof_handler, // Print out all DoF support points on the two faces: deallog << "DoFs of face_1:"; - for (unsigned int c = 0; c < fe.n_components(); c++) + for (unsigned int c = 0; c < fe.n_components(); ++c) { deallog << std::endl << " component " << c << ":"; for (unsigned int i = 0; i < fe.dofs_per_face; ++i) @@ -313,7 +313,7 @@ print_matching(DoFHandler &dof_handler, } deallog << std::endl; deallog << "DoFs of face_2:"; - for (unsigned int c = 0; c < fe.n_components(); c++) + for (unsigned int c = 0; c < fe.n_components(); ++c) { deallog << std::endl << " component " << c << ":"; for (unsigned int i = 0; i < fe.dofs_per_face; ++i) diff --git a/tests/dofs/dof_tools_23.cc b/tests/dofs/dof_tools_23.cc index 0e037e7757..322daa36cd 100644 --- a/tests/dofs/dof_tools_23.cc +++ b/tests/dofs/dof_tools_23.cc @@ -80,7 +80,7 @@ check_this(const DoFHandler &dof_handler) cm.distribute(constrained); // Cast Vector to Vector> - for (unsigned int index = 0; index < unconstrained.size(); index++) + for (unsigned int index = 0; index < unconstrained.size(); ++index) { unconstrained_complex[index] = unconstrained[index]; } diff --git a/tests/fail/abf_approximation_01.cc b/tests/fail/abf_approximation_01.cc index 6aae4ba9e5..4759e9cfde 100644 --- a/tests/fail/abf_approximation_01.cc +++ b/tests/fail/abf_approximation_01.cc @@ -112,7 +112,7 @@ TestMap1::vector_value(const Point &p, ExcDimensionMismatch(return_value.size(), this->n_components)); // Just fill the vector with the appropriate components - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } @@ -168,7 +168,7 @@ TestDef1::vector_value(const Point &p, { Assert(return_value.size() == this->n_components, ExcDimensionMismatch(return_value.size(), this->n_components)); - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } @@ -219,7 +219,7 @@ TestDef2::vector_value(const Point &p, { Assert(return_value.size() == this->n_components, ExcDimensionMismatch(return_value.size(), this->n_components)); - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } @@ -271,7 +271,7 @@ TestDef3::vector_value(const Point &p, { Assert(return_value.size() == this->n_components, ExcDimensionMismatch(return_value.size(), this->n_components)); - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } @@ -331,7 +331,7 @@ TestPoly::vector_value(const Point &p, { Assert(return_value.size() == this->n_components, ExcDimensionMismatch(return_value.size(), this->n_components)); - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } diff --git a/tests/fail/fe_nothing_04.cc b/tests/fail/fe_nothing_04.cc index 28901b5faf..69271f97af 100644 --- a/tests/fail/fe_nothing_04.cc +++ b/tests/fail/fe_nothing_04.cc @@ -75,7 +75,7 @@ test() dof_handler.begin_active(), endc = dof_handler.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) { Point center = cell->center(); if (std::sqrt(center.square()) < 0.25) diff --git a/tests/fail/rt_distorted_01.cc b/tests/fail/rt_distorted_01.cc index 95754bb132..08d47969c5 100644 --- a/tests/fail/rt_distorted_01.cc +++ b/tests/fail/rt_distorted_01.cc @@ -100,7 +100,7 @@ TestMap1::vector_value(const Point &p, ExcDimensionMismatch(return_value.size(), this->n_components)); // Parabolic inflow profile - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } @@ -154,7 +154,7 @@ TestDef1::vector_value(const Point &p, { Assert(return_value.size() == this->n_components, ExcDimensionMismatch(return_value.size(), this->n_components)); - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } @@ -205,7 +205,7 @@ TestDef2::vector_value(const Point &p, { Assert(return_value.size() == this->n_components, ExcDimensionMismatch(return_value.size(), this->n_components)); - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } @@ -257,7 +257,7 @@ TestDef3::vector_value(const Point &p, { Assert(return_value.size() == this->n_components, ExcDimensionMismatch(return_value.size(), this->n_components)); - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } diff --git a/tests/fail/rt_distorted_02.cc b/tests/fail/rt_distorted_02.cc index 400803edab..79d13cf397 100644 --- a/tests/fail/rt_distorted_02.cc +++ b/tests/fail/rt_distorted_02.cc @@ -109,7 +109,7 @@ TestMap1::vector_value(const Point &p, ExcDimensionMismatch(return_value.size(), this->n_components)); // Just fill the vector with the appropriate components - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } @@ -165,7 +165,7 @@ TestDef1::vector_value(const Point &p, { Assert(return_value.size() == this->n_components, ExcDimensionMismatch(return_value.size(), this->n_components)); - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } @@ -216,7 +216,7 @@ TestDef2::vector_value(const Point &p, { Assert(return_value.size() == this->n_components, ExcDimensionMismatch(return_value.size(), this->n_components)); - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } @@ -268,7 +268,7 @@ TestDef3::vector_value(const Point &p, { Assert(return_value.size() == this->n_components, ExcDimensionMismatch(return_value.size(), this->n_components)); - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } diff --git a/tests/fe/br_approximation_01.cc b/tests/fe/br_approximation_01.cc index 53ae566e40..3b99dcb3b6 100644 --- a/tests/fe/br_approximation_01.cc +++ b/tests/fe/br_approximation_01.cc @@ -100,7 +100,7 @@ TestMap1::vector_value(const Point &p, Assert(return_value.size() == this->n_components, ExcDimensionMismatch(return_value.size(), this->n_components)); - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } @@ -156,7 +156,7 @@ TestDef1::vector_value(const Point &p, { Assert(return_value.size() == this->n_components, ExcDimensionMismatch(return_value.size(), this->n_components)); - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } @@ -207,7 +207,7 @@ TestDef2::vector_value(const Point &p, { Assert(return_value.size() == this->n_components, ExcDimensionMismatch(return_value.size(), this->n_components)); - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } @@ -259,7 +259,7 @@ TestDef3::vector_value(const Point &p, { Assert(return_value.size() == this->n_components, ExcDimensionMismatch(return_value.size(), this->n_components)); - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } @@ -316,7 +316,7 @@ TestPoly::vector_value(const Point &p, { Assert(return_value.size() == this->n_components, ExcDimensionMismatch(return_value.size(), this->n_components)); - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } diff --git a/tests/fe/curl_curl_01.cc b/tests/fe/curl_curl_01.cc index e19637bc29..258d4db514 100644 --- a/tests/fe/curl_curl_01.cc +++ b/tests/fe/curl_curl_01.cc @@ -278,7 +278,7 @@ MaxwellProblem::dotprod(const Tensor<1, dim> &A, const Tensor<1, dim> &B) const { double return_val = 0; - for (unsigned int k = 0; k < dim; k++) + for (unsigned int k = 0; k < dim; ++k) { return_val += A[k] * B[k]; } @@ -291,7 +291,7 @@ MaxwellProblem::dotprod(const Tensor<1, dim> &A, const Vector &B) const { double return_val = 0; - for (unsigned int k = 0; k < dim; k++) + for (unsigned int k = 0; k < dim; ++k) { return_val += A[k] * B(k); } diff --git a/tests/fe/deformed_projection.h b/tests/fe/deformed_projection.h index c265a71b18..25dd1fb1d3 100644 --- a/tests/fe/deformed_projection.h +++ b/tests/fe/deformed_projection.h @@ -104,7 +104,7 @@ TestMap1::vector_value(const Point &p, ExcDimensionMismatch(return_value.size(), this->n_components)); // Parabolic inflow profile - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } diff --git a/tests/fe/fe_enriched_04.cc b/tests/fe/fe_enriched_04.cc index a98b7a168e..0e634a580e 100644 --- a/tests/fe/fe_enriched_04.cc +++ b/tests/fe/fe_enriched_04.cc @@ -155,7 +155,7 @@ plot_shape_function() std::vector> shape_functions(dof_handler.n_dofs()); std::vector names; - for (unsigned int s = 0; s < shape_functions.size(); s++) + for (unsigned int s = 0; s < shape_functions.size(); ++s) { names.push_back(std::string("N_") + dealii::Utilities::int_to_string(s)); @@ -175,7 +175,7 @@ plot_shape_function() DataOut data_out; data_out.attach_dof_handler(dof_handler); - for (unsigned int i = 0; i < shape_functions.size(); i++) + for (unsigned int i = 0; i < shape_functions.size(); ++i) { data_out.add_data_vector(shape_functions[i], names[i]); } diff --git a/tests/fe/fe_enriched_05.cc b/tests/fe/fe_enriched_05.cc index 7f6183fcad..06bbe5c9cc 100644 --- a/tests/fe/fe_enriched_05.cc +++ b/tests/fe/fe_enriched_05.cc @@ -110,7 +110,7 @@ test4() #ifdef DATA_OUT_FE_ENRICHED std::vector> shape_functions; std::vector names; - for (unsigned int s = 0; s < dof_handler.n_dofs(); s++) + for (unsigned int s = 0; s < dof_handler.n_dofs(); ++s) if (!constraints.is_constrained(s)) { names.push_back(std::string("N_") + @@ -128,7 +128,7 @@ test4() DataOut data_out; data_out.attach_dof_handler(dof_handler); - for (unsigned int i = 0; i < shape_functions.size(); i++) + for (unsigned int i = 0; i < shape_functions.size(); ++i) data_out.add_data_vector(shape_functions[i], names[i]); data_out.build_patches(patches); diff --git a/tests/fe/fe_enriched_06.cc b/tests/fe/fe_enriched_06.cc index e661f8f28f..9363437bb4 100644 --- a/tests/fe/fe_enriched_06.cc +++ b/tests/fe/fe_enriched_06.cc @@ -100,7 +100,7 @@ test5() std::vector> shape_functions; std::vector names; - for (unsigned int s = 0; s < dof_handler.n_dofs(); s++) + for (unsigned int s = 0; s < dof_handler.n_dofs(); ++s) { names.push_back(std::string("N_") + dealii::Utilities::int_to_string(s)); @@ -135,7 +135,7 @@ test5() // find out which unsigned int local_dof = 0; cell->get_dof_indices(local_dof_indices); - for (; local_dof < dofs_per_cell; local_dof++) + for (; local_dof < dofs_per_cell; ++local_dof) if (local_dof_indices[local_dof] == global_dof) break; @@ -164,7 +164,7 @@ test5() DataOut data_out; data_out.attach_dof_handler(dof_handler); - for (unsigned int i = 0; i < shape_functions.size(); i++) + for (unsigned int i = 0; i < shape_functions.size(); ++i) data_out.add_data_vector(shape_functions[i], names[i]); data_out.build_patches(patches); diff --git a/tests/fe/fe_enriched_07.cc b/tests/fe/fe_enriched_07.cc index e7654731c0..486ec2c4b8 100644 --- a/tests/fe/fe_enriched_07.cc +++ b/tests/fe/fe_enriched_07.cc @@ -141,7 +141,7 @@ test6(const bool do_href, // output to check if all is good: std::vector> shape_functions; std::vector names; - for (unsigned int s = 0; s < dof_handler.n_dofs(); s++) + for (unsigned int s = 0; s < dof_handler.n_dofs(); ++s) { Vector shape_function; shape_function.reinit(dof_handler.n_dofs()); @@ -177,7 +177,7 @@ test6(const bool do_href, } data_out.add_data_vector(fe_index, "fe_index"); - for (unsigned int i = 0; i < shape_functions.size(); i++) + for (unsigned int i = 0; i < shape_functions.size(); ++i) data_out.add_data_vector(shape_functions[i], names[i]); data_out.build_patches(patches); diff --git a/tests/fe/fe_enriched_08.cc b/tests/fe/fe_enriched_08.cc index 54ea6ac3a1..41c1c62e15 100644 --- a/tests/fe/fe_enriched_08.cc +++ b/tests/fe/fe_enriched_08.cc @@ -129,7 +129,7 @@ test2cells(const unsigned int p_feq = 2, const unsigned int p_feen = 1) // output to check if all is good: std::vector> shape_functions; std::vector names; - for (unsigned int s = 0; s < dof_handler.n_dofs(); s++) + for (unsigned int s = 0; s < dof_handler.n_dofs(); ++s) { Vector shape_function; shape_function.reinit(dof_handler.n_dofs()); @@ -165,7 +165,7 @@ test2cells(const unsigned int p_feq = 2, const unsigned int p_feen = 1) } data_out.add_data_vector(fe_index, "fe_index"); - for (unsigned int i = 0; i < shape_functions.size(); i++) + for (unsigned int i = 0; i < shape_functions.size(); ++i) data_out.add_data_vector(shape_functions[i], names[i]); data_out.build_patches(patches); diff --git a/tests/fe/fe_enriched_color_05.cc b/tests/fe/fe_enriched_color_05.cc index a67986a5e6..6b6ffcbe19 100644 --- a/tests/fe/fe_enriched_color_05.cc +++ b/tests/fe/fe_enriched_color_05.cc @@ -107,7 +107,7 @@ plot_shape_function(DoFHandler &dof_handler, unsigned int patches = 5) // output to check if all is good: std::vector> shape_functions; std::vector names; - for (unsigned int s = 0; s < dof_handler.n_dofs(); s++) + for (unsigned int s = 0; s < dof_handler.n_dofs(); ++s) { Vector shape_function; shape_function.reinit(dof_handler.n_dofs()); @@ -143,7 +143,7 @@ plot_shape_function(DoFHandler &dof_handler, unsigned int patches = 5) } data_out.add_data_vector(fe_index, "fe_index"); - for (unsigned int i = 0; i < shape_functions.size(); i++) + for (unsigned int i = 0; i < shape_functions.size(); ++i) data_out.add_data_vector(shape_functions[i], names[i]); data_out.build_patches(patches); diff --git a/tests/fe/fe_enriched_color_07.cc b/tests/fe/fe_enriched_color_07.cc index 186d23f4b1..365b571101 100644 --- a/tests/fe/fe_enriched_color_07.cc +++ b/tests/fe/fe_enriched_color_07.cc @@ -1023,7 +1023,7 @@ plot_shape_function(DoFHandler &dof_handler, unsigned int patches = 5) } data_out.add_data_vector(fe_index, "fe_index"); - for (unsigned int i = 0; i < shape_functions.size(); i++) + for (unsigned int i = 0; i < shape_functions.size(); ++i) data_out.add_data_vector(shape_functions[i], names[i]); data_out.build_patches(patches); diff --git a/tests/fe/fe_enriched_color_08.cc b/tests/fe/fe_enriched_color_08.cc index fd6a508706..70253bcdad 100644 --- a/tests/fe/fe_enriched_color_08.cc +++ b/tests/fe/fe_enriched_color_08.cc @@ -152,7 +152,7 @@ plot_shape_function(DoFHandler &dof_handler, unsigned int patches = 5) } data_out.add_data_vector(fe_index, "fe_index"); - for (unsigned int i = 0; i < shape_functions.size(); i++) + for (unsigned int i = 0; i < shape_functions.size(); ++i) data_out.add_data_vector(shape_functions[i], names[i]); data_out.build_patches(patches); diff --git a/tests/fe/fe_enriched_compare_to_fe_system.cc b/tests/fe/fe_enriched_compare_to_fe_system.cc index 8c12a972fc..315fbf36db 100644 --- a/tests/fe/fe_enriched_compare_to_fe_system.cc +++ b/tests/fe/fe_enriched_compare_to_fe_system.cc @@ -90,8 +90,8 @@ public: Assert(r > 0.0, ExcMessage("r is not positive")); dir /= r; SymmetricTensor<2, dim> dir_x_dir; - for (unsigned int i = 0; i < dim; i++) - for (unsigned int j = i; j < dim; j++) + for (unsigned int i = 0; i < dim; ++i) + for (unsigned int j = i; j < dim; ++j) dir_x_dir[i][j] = dir[i] * dir[j]; return std::exp(-r) * @@ -173,7 +173,7 @@ test(const FiniteElement & fe1, { Point p1, p2; std::vector repetitions(dim); - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) { p1[d] = -1.0; p2[d] = 2.0; diff --git a/tests/fe/fe_enriched_compare_to_fe_system_2.cc b/tests/fe/fe_enriched_compare_to_fe_system_2.cc index c0beef15b5..38b5fa8a44 100644 --- a/tests/fe/fe_enriched_compare_to_fe_system_2.cc +++ b/tests/fe/fe_enriched_compare_to_fe_system_2.cc @@ -93,8 +93,8 @@ public: Assert(r > 0.0, ExcMessage("r is not positive")); dir /= r; SymmetricTensor<2, dim> dir_x_dir; - for (unsigned int i = 0; i < dim; i++) - for (unsigned int j = i; j < dim; j++) + for (unsigned int i = 0; i < dim; ++i) + for (unsigned int j = i; j < dim; ++j) dir_x_dir[i][j] = dir[i] * dir[j]; return std::exp(-r) * @@ -204,7 +204,7 @@ test(const FiniteElement & fe_base, DoFHandler dof_handler_system(triangulation); Point p1, p2, p3; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) { p1[d] = 0.0; p2[d] = 0.0; @@ -248,7 +248,7 @@ test(const FiniteElement & fe_base, { Point p1, p2; std::vector repetitions(dim); - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) { p1[d] = -1.0; p2[d] = 2.0; diff --git a/tests/fe/fe_enriched_step-36.cc b/tests/fe/fe_enriched_step-36.cc index ee8c1d4113..f41e28270d 100644 --- a/tests/fe/fe_enriched_step-36.cc +++ b/tests/fe/fe_enriched_step-36.cc @@ -307,7 +307,7 @@ namespace Step36 /* keep constrained dofs */ false); std::vector n_locally_owned_dofs(n_mpi_processes); - for (unsigned int i = 0; i < n_mpi_processes; i++) + for (unsigned int i = 0; i < n_mpi_processes; ++i) n_locally_owned_dofs[i] = locally_owned_dofs_per_processor[i].n_elements(); @@ -467,7 +467,7 @@ namespace Step36 eigenfunctions, eigenfunctions.size()); - for (unsigned int i = 0; i < eigenfunctions.size(); i++) + for (unsigned int i = 0; i < eigenfunctions.size(); ++i) { constraints.distribute(eigenfunctions[i]); eigenfunctions_locally_relevant[i] = eigenfunctions[i]; @@ -492,7 +492,7 @@ namespace Step36 number_of_eigenvalues); std::vector *> error(number_of_eigenvalues); - for (unsigned int i = 0; i < number_of_eigenvalues; i++) + for (unsigned int i = 0; i < number_of_eigenvalues; ++i) { sol[i] = &eigenfunctions_locally_relevant[i]; error[i] = &vec_estimated_error_per_cell[i]; @@ -511,10 +511,10 @@ namespace Step36 } // sum up for a global: - for (unsigned int c = 0; c < estimated_error_per_cell.size(); c++) + for (unsigned int c = 0; c < estimated_error_per_cell.size(); ++c) { double er = 0.0; - for (unsigned int i = 0; i < number_of_eigenvalues; i++) + for (unsigned int i = 0; i < number_of_eigenvalues; ++i) er += vec_estimated_error_per_cell[i][c] * vec_estimated_error_per_cell[i][c]; @@ -595,7 +595,7 @@ namespace Step36 << triangulation.n_active_cells() << sep << dof_handler.n_dofs() << sep << std::scientific; - for (unsigned int i = 0; i < eigenvalues.size(); i++) + for (unsigned int i = 0; i < eigenvalues.size(); ++i) output << eigenvalues[i] << sep; output << std::endl; @@ -608,7 +608,7 @@ namespace Step36 void EigenvalueProblem::run() { - for (unsigned int cycle = 0; cycle < 4; cycle++) + for (unsigned int cycle = 0; cycle < 4; ++cycle) { pcout << "Cycle " << cycle << std::endl; const std::pair n_cells = setup_system(); diff --git a/tests/fe/fe_enriched_step-36b.cc b/tests/fe/fe_enriched_step-36b.cc index 666da06700..b6e2ef06fd 100644 --- a/tests/fe/fe_enriched_step-36b.cc +++ b/tests/fe/fe_enriched_step-36b.cc @@ -318,7 +318,7 @@ namespace Step36 /* keep constrained dofs */ false); std::vector n_locally_owned_dofs(n_mpi_processes); - for (unsigned int i = 0; i < n_mpi_processes; i++) + for (unsigned int i = 0; i < n_mpi_processes; ++i) n_locally_owned_dofs[i] = locally_owned_dofs_per_processor[i].n_elements(); @@ -673,7 +673,7 @@ namespace Step36 eigenfunctions, eigenfunctions.size()); - for (unsigned int i = 0; i < eigenfunctions.size(); i++) + for (unsigned int i = 0; i < eigenfunctions.size(); ++i) { constraints.distribute(eigenfunctions[i]); eigenfunctions_locally_relevant[i] = eigenfunctions[i]; @@ -698,7 +698,7 @@ namespace Step36 number_of_eigenvalues); std::vector *> error(number_of_eigenvalues); - for (unsigned int i = 0; i < number_of_eigenvalues; i++) + for (unsigned int i = 0; i < number_of_eigenvalues; ++i) { sol[i] = &eigenfunctions_locally_relevant[i]; error[i] = &vec_estimated_error_per_cell[i]; @@ -717,10 +717,10 @@ namespace Step36 } // sum up for a global: - for (unsigned int c = 0; c < estimated_error_per_cell.size(); c++) + for (unsigned int c = 0; c < estimated_error_per_cell.size(); ++c) { double er = 0.0; - for (unsigned int i = 0; i < number_of_eigenvalues; i++) + for (unsigned int i = 0; i < number_of_eigenvalues; ++i) er += vec_estimated_error_per_cell[i][c] * vec_estimated_error_per_cell[i][c]; @@ -860,7 +860,7 @@ namespace Step36 << triangulation.n_active_cells() << sep << dof_handler.n_dofs() << sep << std::scientific; - for (unsigned int i = 0; i < eigenvalues.size(); i++) + for (unsigned int i = 0; i < eigenvalues.size(); ++i) output << eigenvalues[i] << sep; output << std::endl; @@ -873,7 +873,7 @@ namespace Step36 void EigenvalueProblem::run() { - for (unsigned int cycle = 0; cycle < 2; cycle++) + for (unsigned int cycle = 0; cycle < 2; ++cycle) { pcout << "Cycle " << cycle << std::endl; const std::pair n_cells = setup_system(); diff --git a/tests/fe/fe_nedelec_sz_non_rect_face.cc b/tests/fe/fe_nedelec_sz_non_rect_face.cc index e032441ff9..77d86e52a6 100644 --- a/tests/fe/fe_nedelec_sz_non_rect_face.cc +++ b/tests/fe/fe_nedelec_sz_non_rect_face.cc @@ -257,7 +257,7 @@ namespace Maxwell for (const auto q_point : fe_values.quadrature_point_indices()) { // Split exact solution into real/imaginary parts: - for (unsigned int component = 0; component < dim; component++) + for (unsigned int component = 0; component < dim; ++component) { exactsol[component] = exactsol_list[q_point][component]; exactcurlsol[component] = exactcurlsol_list[q_point][component]; @@ -379,7 +379,7 @@ namespace Maxwell for (const auto q_point : fe_values.quadrature_point_indices()) { // store rhs value at this q point & turn into tensor - for (unsigned int component = 0; component < dim; component++) + for (unsigned int component = 0; component < dim; ++component) { rhs_value_vector[component] = rhs_value_list[q_point](component); diff --git a/tests/fe/fe_series_01.cc b/tests/fe/fe_series_01.cc index b32b753f85..2c580446e1 100644 --- a/tests/fe/fe_series_01.cc +++ b/tests/fe/fe_series_01.cc @@ -81,11 +81,11 @@ test_1d() fourier_coefficients); deallog << "calculated:" << std::endl; - for (unsigned int i = 0; i < N; i++) + for (unsigned int i = 0; i < N; ++i) deallog << fourier_coefficients[i].real() << " " << fourier_coefficients[i].imag() << std::endl; deallog << "exact:" << std::endl; - for (unsigned int i = 0; i < N; i++) + for (unsigned int i = 0; i < N; ++i) deallog << exact[i].real() << " " << exact[i].imag() << std::endl; } diff --git a/tests/fe/fe_series_02.cc b/tests/fe/fe_series_02.cc index c80c6af0bf..9fe5bdf87c 100644 --- a/tests/fe/fe_series_02.cc +++ b/tests/fe/fe_series_02.cc @@ -131,12 +131,12 @@ test(const LegendreFunction &func, const unsigned int poly_degree) legendre.calculate(local_dof_values, cell_active_fe_index, coeff_out); } - for (unsigned int i = 0; i < coeff_in.size(); i++) + for (unsigned int i = 0; i < coeff_in.size(); ++i) deallog << coeff_in[i] << " "; deallog << std::endl; - for (unsigned int i = 0; i < N; i++) + for (unsigned int i = 0; i < N; ++i) deallog << coeff_out[i] << " "; deallog << std::endl; diff --git a/tests/fe/fe_series_03.cc b/tests/fe/fe_series_03.cc index c58351e6ff..3fd2377ae5 100644 --- a/tests/fe/fe_series_03.cc +++ b/tests/fe/fe_series_03.cc @@ -35,14 +35,14 @@ test2d(const VectorTools::NormType norm) const unsigned int dim = 2; const unsigned int N = 4; Table coefficients(4, 4); - for (unsigned int i = 0; i < N; i++) - for (unsigned int j = 0; j < N; j++) + for (unsigned int i = 0; i < N; ++i) + for (unsigned int j = 0; j < N; ++j) coefficients(i, j) = i * N + j; std::pair, std::vector> res = FESeries::process_coefficients<2, double>(coefficients, pred_ind, norm); - for (unsigned int i = 0; i < res.first.size(); i++) + for (unsigned int i = 0; i < res.first.size(); ++i) deallog << res.first[i] << " : " << res.second[i] << std::endl; } diff --git a/tests/fe/fe_series_04.cc b/tests/fe/fe_series_04.cc index 0c4c0fc39c..4867a3e1b0 100644 --- a/tests/fe/fe_series_04.cc +++ b/tests/fe/fe_series_04.cc @@ -90,7 +90,7 @@ test(const LegendreFunction &func, const unsigned int poly_degree) hp::FECollection fe_collection; hp::QCollection quadrature_formula; - for (unsigned int p = poly_degree; p <= poly_degree + 3; p++) + for (unsigned int p = poly_degree; p <= poly_degree + 3; ++p) { fe_collection.push_back(dealii::FE_Q(p)); quadrature_formula.push_back(dealii::QGauss(p + 1 + 5)); @@ -127,14 +127,14 @@ test(const LegendreFunction &func, const unsigned int poly_degree) legendre.calculate(local_dof_values, cell_active_fe_index, coeff_out); deallog << "local dofs:"; - for (unsigned int i = 0; i < cell_n_dofs; i++) + for (unsigned int i = 0; i < cell_n_dofs; ++i) dealii::deallog << " " << local_dof_values[i]; dealii::deallog << std::endl; } deallog << "calculated:" << std::endl; - for (unsigned int i = 0; i < N; i++) + for (unsigned int i = 0; i < N; ++i) deallog << coeff_out[i] << std::endl; std::vector coeff_exp(3); @@ -143,7 +143,7 @@ test(const LegendreFunction &func, const unsigned int poly_degree) coeff_exp[1] = 3.123557585310879e-4; coeff_exp[2] = 2.104375000953028e-4; deallog << "exact:" << std::endl; - for (unsigned int i = 0; i < coeff_exp.size(); i++) + for (unsigned int i = 0; i < coeff_exp.size(); ++i) deallog << coeff_exp[i] << std::endl; dof_handler.clear(); @@ -159,7 +159,7 @@ test_legendre_orthonormal(const unsigned int N) { const unsigned int dim = 1; deallog << "Pl @ -1;0;1" << std::endl; - for (unsigned int l = 0; l < N; l++) + for (unsigned int l = 0; l < N; ++l) { deallog << "l=" << l << ": "; for (double x = -1.0; x <= 1.0; x += 1.0) @@ -170,8 +170,8 @@ test_legendre_orthonormal(const unsigned int N) QGauss quadrature(8); deallog << "orthogonality: " << std::endl; - for (unsigned int k1 = 0; k1 < N; k1++) - for (unsigned int k2 = 0; k2 < N; k2++) + for (unsigned int k1 = 0; k1 < N; ++k1) + for (unsigned int k2 = 0; k2 < N; ++k2) { double ortho = 0; for (unsigned int q = 0; q < quadrature.size(); ++q) diff --git a/tests/fe/fe_series_05.cc b/tests/fe/fe_series_05.cc index e4ab347d55..f56908b017 100644 --- a/tests/fe/fe_series_05.cc +++ b/tests/fe/fe_series_05.cc @@ -67,7 +67,7 @@ double Lh(const Point &x_q, const TableIndices &indices) { double res = 1.0; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) { const double x = 2.0 * (x_q[d] - 0.5); Assert((x_q[d] <= 1.0) && (x_q[d] >= 0.), @@ -85,8 +85,8 @@ LegendreFunction<2>::value(const dealii::Point<2> &point, { double f = 0.0; - for (unsigned int i = 0; i < coefficients.size(0); i++) - for (unsigned int j = 0; j < coefficients.size(1); j++) + for (unsigned int i = 0; i < coefficients.size(0); ++i) + for (unsigned int j = 0; j < coefficients.size(1); ++j) f += Lh(point, TableIndices<2>(i, j)) * coefficients(i, j); return f; @@ -99,9 +99,9 @@ LegendreFunction<3>::value(const dealii::Point<3> &point, { double f = 0.0; - for (unsigned int i = 0; i < coefficients.size(0); i++) - for (unsigned int j = 0; j < coefficients.size(1); j++) - for (unsigned int k = 0; k < coefficients.size(2); k++) + for (unsigned int i = 0; i < coefficients.size(0); ++i) + for (unsigned int j = 0; j < coefficients.size(1); ++j) + for (unsigned int k = 0; k < coefficients.size(2); ++k) f += Lh(point, TableIndices<3>(i, j, k)) * coefficients(i, j, k); return f; @@ -110,8 +110,8 @@ LegendreFunction<3>::value(const dealii::Point<3> &point, void print(const Table<2, double> &coeff) { - for (unsigned int i = 0; i < coeff.size(0); i++) - for (unsigned int j = 0; j < coeff.size(1); j++) + for (unsigned int i = 0; i < coeff.size(0); ++i) + for (unsigned int j = 0; j < coeff.size(1); ++j) deallog << coeff(i, j) << " "; deallog << std::endl; } @@ -119,9 +119,9 @@ print(const Table<2, double> &coeff) void print(const Table<3, double> &coeff) { - for (unsigned int i = 0; i < coeff.size(0); i++) - for (unsigned int j = 0; j < coeff.size(1); j++) - for (unsigned int k = 0; k < coeff.size(2); k++) + for (unsigned int i = 0; i < coeff.size(0); ++i) + for (unsigned int j = 0; j < coeff.size(1); ++j) + for (unsigned int k = 0; k < coeff.size(2); ++k) deallog << coeff(i, j, k) << " "; deallog << std::endl; } @@ -136,7 +136,7 @@ void resize(Table<3, double> &coeff, const unsigned int N) { TableIndices<3> size; - for (unsigned int d = 0; d < 3; d++) + for (unsigned int d = 0; d < 3; ++d) size[d] = N; coeff.reinit(size); } @@ -158,7 +158,7 @@ test(const LegendreFunction &func, const unsigned int poly_degree) hp::QCollection quadrature_formula; // add some extra FEs in fe_collection - for (unsigned int p = 1; p <= max_poly; p++) + for (unsigned int p = 1; p <= max_poly; ++p) { fe_collection.push_back(FE_Q(p)); quadrature_formula.push_back(QGauss(p + 1 + 5)); @@ -219,8 +219,8 @@ main() const unsigned int p = 1; Table coeff_in(coeff_1d, coeff_1d); unsigned int ind = 0; - for (unsigned int i = 0; i < coeff_1d; i++) - for (unsigned int j = 0; j < coeff_1d; j++) + for (unsigned int i = 0; i < coeff_1d; ++i) + for (unsigned int j = 0; j < coeff_1d; ++j) coeff_in(i, j) = 1.0 + ind++; LegendreFunction function(coeff_in); @@ -233,8 +233,8 @@ main() const unsigned int p = 2; Table coeff_in(coeff_1d, coeff_1d); unsigned int ind = 0; - for (unsigned int i = 0; i < coeff_1d; i++) - for (unsigned int j = 0; j < coeff_1d; j++) + for (unsigned int i = 0; i < coeff_1d; ++i) + for (unsigned int j = 0; j < coeff_1d; ++j) coeff_in(i, j) = 1.0 + ind++; LegendreFunction function(coeff_in); @@ -247,9 +247,9 @@ main() const unsigned int p = 1; Table coeff_in(coeff_1d, coeff_1d, coeff_1d); unsigned int ind = 0; - for (unsigned int i = 0; i < coeff_1d; i++) - for (unsigned int j = 0; j < coeff_1d; j++) - for (unsigned int k = 0; k < coeff_1d; k++) + for (unsigned int i = 0; i < coeff_1d; ++i) + for (unsigned int j = 0; j < coeff_1d; ++j) + for (unsigned int k = 0; k < coeff_1d; ++k) coeff_in(i, j, k) = 1.0 + ind++; LegendreFunction function(coeff_in); @@ -262,9 +262,9 @@ main() const unsigned int p = 2; Table coeff_in(coeff_1d, coeff_1d, coeff_1d); unsigned int ind = 0; - for (unsigned int i = 0; i < coeff_1d; i++) - for (unsigned int j = 0; j < coeff_1d; j++) - for (unsigned int k = 0; k < coeff_1d; k++) + for (unsigned int i = 0; i < coeff_1d; ++i) + for (unsigned int j = 0; j < coeff_1d; ++j) + for (unsigned int k = 0; k < coeff_1d; ++k) coeff_in(i, j, k) = 1.0 + ind++; LegendreFunction function(coeff_in); diff --git a/tests/fe/fe_series_06.cc b/tests/fe/fe_series_06.cc index a85d10a630..aba6103138 100644 --- a/tests/fe/fe_series_06.cc +++ b/tests/fe/fe_series_06.cc @@ -40,7 +40,7 @@ test_2d() QGauss<1> base_quadrature(2); QIterated quadrature(base_quadrature, N); - for (unsigned int i = 0; i < fe_collection.size(); i++) + for (unsigned int i = 0; i < fe_collection.size(); ++i) fourier_q_collection.push_back(quadrature); const std::vector n_coefficients_per_direction( @@ -63,7 +63,7 @@ test_2d() 0.0000000000000000e+00, 1.1949019042912971e-04, 5.9982796422221083e-05}; - for (unsigned int i = 0; i < 9; i++) + for (unsigned int i = 0; i < 9; ++i) local_dof_values[i] = dofs[i]; const unsigned int cell_active_fe_index = 0; @@ -71,8 +71,8 @@ test_2d() cell_active_fe_index, fourier_coefficients); - for (unsigned int i = 0; i < fourier_coefficients.size(0); i++) - for (unsigned int j = 0; j < fourier_coefficients.size(1); j++) + for (unsigned int i = 0; i < fourier_coefficients.size(0); ++i) + for (unsigned int j = 0; j < fourier_coefficients.size(1); ++j) if ((i * i + j * j < N * N) && (i * i + j * j > 0)) deallog << (i * i + j * j) << " : " << fourier_coefficients(i, j) << std::endl; diff --git a/tests/fe/fe_series_07.cc b/tests/fe/fe_series_07.cc index e600c578cd..3b6693e105 100644 --- a/tests/fe/fe_series_07.cc +++ b/tests/fe/fe_series_07.cc @@ -39,14 +39,14 @@ test2d(const VectorTools::NormType norm) const unsigned int dim = 2; const unsigned int N = 4; Table coefficients(4, 4); - for (unsigned int i = 0; i < N; i++) - for (unsigned int j = 0; j < N; j++) + for (unsigned int i = 0; i < N; ++i) + for (unsigned int j = 0; j < N; ++j) coefficients(i, j) = i * N + j; std::pair, std::vector> res = FESeries::process_coefficients<2, double>(coefficients, pred_ind, norm); - for (unsigned int i = 0; i < res.first.size(); i++) + for (unsigned int i = 0; i < res.first.size(); ++i) deallog << res.first[i] << " : " << res.second[i] << std::endl; } diff --git a/tests/fe/fe_series_08.cc b/tests/fe/fe_series_08.cc index d2c3cd1a06..c948f485a2 100644 --- a/tests/fe/fe_series_08.cc +++ b/tests/fe/fe_series_08.cc @@ -33,7 +33,7 @@ test() std::vector x(N), y(N); // fill the data - for (unsigned int i = 0; i < N; i++) + for (unsigned int i = 0; i < N; ++i) { x[i] = 0.1 * i; y[i] = k_in * x[i] + b_in; diff --git a/tests/fe/fe_values_view_21.cc b/tests/fe/fe_values_view_21.cc index d6252dff0b..4dcca4b0ff 100644 --- a/tests/fe/fe_values_view_21.cc +++ b/tests/fe/fe_values_view_21.cc @@ -109,7 +109,7 @@ MixedElastoPlasticity::make_grid_and_dofs() std::vector block_component(n_stress_components + n_gamma_components, 1); - for (unsigned int ii = 0; ii < n_stress_components; ii++) + for (unsigned int ii = 0; ii < n_stress_components; ++ii) block_component[ii] = 0; DoFRenumbering::component_wise(dof_handler); diff --git a/tests/fe/fe_values_view_21_nonsymmetric.cc b/tests/fe/fe_values_view_21_nonsymmetric.cc index 2c2c8e9cd8..267ed0fc20 100644 --- a/tests/fe/fe_values_view_21_nonsymmetric.cc +++ b/tests/fe/fe_values_view_21_nonsymmetric.cc @@ -110,7 +110,7 @@ MixedElastoPlasticity::make_grid_and_dofs() std::vector block_component(n_stress_components + n_gamma_components, 1); - for (unsigned int ii = 0; ii < n_stress_components; ii++) + for (unsigned int ii = 0; ii < n_stress_components; ++ii) block_component[ii] = 0; DoFRenumbering::component_wise(dof_handler); diff --git a/tests/fe/fe_values_view_22.cc b/tests/fe/fe_values_view_22.cc index 429e7bb46a..a00d82dfee 100644 --- a/tests/fe/fe_values_view_22.cc +++ b/tests/fe/fe_values_view_22.cc @@ -104,7 +104,7 @@ MixedElastoPlasticity::make_grid_and_dofs() std::vector block_component(n_stress_components + n_gamma_components, 1); - for (unsigned int ii = 0; ii < n_stress_components; ii++) + for (unsigned int ii = 0; ii < n_stress_components; ++ii) block_component[ii] = 0; DoFRenumbering::component_wise(dof_handler); @@ -219,9 +219,9 @@ MixedElastoPlasticity::assemble_system() << local_divergences[q] << std::endl << local_scalar_values[q] << std::endl; - for (unsigned int m = 0; m < dim; m++) + for (unsigned int m = 0; m < dim; ++m) { - for (unsigned int n = 0; n < dim; n++) + for (unsigned int n = 0; n < dim; ++n) AssertThrow((local_values[q])[m][n] == stress_value, ExcInternalError()); diff --git a/tests/fe/fe_values_view_tensor_01.cc b/tests/fe/fe_values_view_tensor_01.cc index 1b6a10b1ec..559dcccbe8 100644 --- a/tests/fe/fe_values_view_tensor_01.cc +++ b/tests/fe/fe_values_view_tensor_01.cc @@ -107,7 +107,7 @@ MixedElastoPlasticity::make_grid_and_dofs() std::vector block_component(n_stress_components + n_gamma_components, 1); - for (unsigned int ii = 0; ii < n_stress_components; ii++) + for (unsigned int ii = 0; ii < n_stress_components; ++ii) block_component[ii] = 0; DoFRenumbering::component_wise(dof_handler); @@ -218,9 +218,9 @@ check() { static const unsigned int dim = 3; { - for (unsigned int i = 0; i < dim; i++) + for (unsigned int i = 0; i < dim; ++i) { - for (unsigned int j = 0; j < dim; j++) + for (unsigned int j = 0; j < dim; ++j) { TableIndices<2> indices(i, j); unsigned int unrolled = diff --git a/tests/fe/nedelec_non_rect_face.cc b/tests/fe/nedelec_non_rect_face.cc index 638d5da022..1d7f8d6cef 100644 --- a/tests/fe/nedelec_non_rect_face.cc +++ b/tests/fe/nedelec_non_rect_face.cc @@ -258,7 +258,7 @@ namespace Maxwell for (const auto q_point : fe_values.quadrature_point_indices()) { // Split exact solution into real/imaginary parts: - for (unsigned int component = 0; component < dim; component++) + for (unsigned int component = 0; component < dim; ++component) { exactsol[component] = exactsol_list[q_point][component]; exactcurlsol[component] = exactcurlsol_list[q_point][component]; @@ -380,7 +380,7 @@ namespace Maxwell for (const auto q_point : fe_values.quadrature_point_indices()) { // store rhs value at this q point & turn into tensor - for (unsigned int component = 0; component < dim; component++) + for (unsigned int component = 0; component < dim; ++component) { rhs_value_vector[component] = rhs_value_list[q_point](component); diff --git a/tests/fe/rt_approximation_01.cc b/tests/fe/rt_approximation_01.cc index c37460f8ca..4cf21fff38 100644 --- a/tests/fe/rt_approximation_01.cc +++ b/tests/fe/rt_approximation_01.cc @@ -109,7 +109,7 @@ TestMap1::vector_value(const Point &p, ExcDimensionMismatch(return_value.size(), this->n_components)); // Just fill the vector with the appropriate components - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } @@ -165,7 +165,7 @@ TestDef1::vector_value(const Point &p, { Assert(return_value.size() == this->n_components, ExcDimensionMismatch(return_value.size(), this->n_components)); - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } @@ -216,7 +216,7 @@ TestDef2::vector_value(const Point &p, { Assert(return_value.size() == this->n_components, ExcDimensionMismatch(return_value.size(), this->n_components)); - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } @@ -268,7 +268,7 @@ TestDef3::vector_value(const Point &p, { Assert(return_value.size() == this->n_components, ExcDimensionMismatch(return_value.size(), this->n_components)); - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } @@ -328,7 +328,7 @@ TestPoly::vector_value(const Point &p, { Assert(return_value.size() == this->n_components, ExcDimensionMismatch(return_value.size(), this->n_components)); - for (unsigned int iCount = 0; iCount < this->n_components; iCount++) + for (unsigned int iCount = 0; iCount < this->n_components; ++iCount) return_value(iCount) = value(p, iCount); } diff --git a/tests/full_matrix/full_matrix_57.cc b/tests/full_matrix/full_matrix_57.cc index 801e200c9d..57f6f9d329 100644 --- a/tests/full_matrix/full_matrix_57.cc +++ b/tests/full_matrix/full_matrix_57.cc @@ -40,7 +40,7 @@ check() deallog << "Original Vector V" << std::endl; deallog << "=================" << std::endl; - for (unsigned int i = 0; i < First4.size(); i++) + for (unsigned int i = 0; i < First4.size(); ++i) { First4(i) = ints[i]; deallog << First4(i) << " "; @@ -51,7 +51,7 @@ check() deallog << "Original Vector W" << std::endl; deallog << "=================" << std::endl; - for (unsigned int i = 0; i < Second4.size(); i++) + for (unsigned int i = 0; i < Second4.size(); ++i) { Second4(i) = ints[i + 1]; deallog << Second4(i) << " "; @@ -90,7 +90,7 @@ check() deallog << "Vector V" << std::endl; deallog << "========" << std::endl; - for (unsigned int i = 0; i < First9.size(); i++) + for (unsigned int i = 0; i < First9.size(); ++i) { First9(i) = ints[i]; deallog << First9(i) << " "; @@ -111,7 +111,7 @@ check() deallog << "Vector V" << std::endl; deallog << "========" << std::endl; - for (unsigned int i = 0; i < First9.size(); i++) + for (unsigned int i = 0; i < First9.size(); ++i) { First9(i) = ints[8 - i]; deallog << First9(i) << " "; diff --git a/tests/full_matrix/full_matrix_common.h b/tests/full_matrix/full_matrix_common.h index 00a7dd2a9c..7944210898 100644 --- a/tests/full_matrix/full_matrix_common.h +++ b/tests/full_matrix/full_matrix_common.h @@ -173,9 +173,9 @@ display_matrix(FullMatrix M) { const number tolerance = 100. * std::numeric_limits::epsilon(); deallog << M.m() << "x" << M.n() << " matrix" << std::endl; - for (unsigned int i = 0; i < M.m(); i++) + for (unsigned int i = 0; i < M.m(); ++i) { - for (unsigned int j = 0; j < M.n(); j++) + for (unsigned int j = 0; j < M.n(); ++j) deallog << filter_out_small_numbers(M(i, j), tolerance) << " "; deallog << std::endl; } @@ -187,9 +187,9 @@ display_matrix(FullMatrix> M) { const number tolerance = 100. * std::numeric_limits::epsilon(); deallog << M.m() << "x" << M.n() << " matrix" << std::endl; - for (unsigned int i = 0; i < M.m(); i++) + for (unsigned int i = 0; i < M.m(); ++i) { - for (unsigned int j = 0; j < M.n(); j++) + for (unsigned int j = 0; j < M.n(); ++j) deallog << filter_out_small_numbers(M(i, j), tolerance) << " "; deallog << std::endl; } @@ -200,8 +200,8 @@ template void fill_matrix(FullMatrix &A) { - for (unsigned int i = 0; i < A.m(); i++) - for (unsigned int j = 0; j < A.n(); j++) + for (unsigned int i = 0; i < A.m(); ++i) + for (unsigned int j = 0; j < A.n(); ++j) A(i, j) = number(i * A.n() + j + 1); } diff --git a/tests/full_matrix/full_matrix_invert_01.cc b/tests/full_matrix/full_matrix_invert_01.cc index f1b8e2a299..22b503d09e 100644 --- a/tests/full_matrix/full_matrix_invert_01.cc +++ b/tests/full_matrix/full_matrix_invert_01.cc @@ -28,8 +28,8 @@ template void fill_matrix_invertible(FullMatrix &A) { - for (unsigned int i = 0; i < A.m(); i++) - for (unsigned int j = 0; j < A.n(); j++) + for (unsigned int i = 0; i < A.m(); ++i) + for (unsigned int j = 0; j < A.n(); ++j) { A(i, j) = number(i * j); if (i == j) diff --git a/tests/fullydistributed_grids/copy_distributed_tria_03.cc b/tests/fullydistributed_grids/copy_distributed_tria_03.cc index b420846261..0fa9562b30 100644 --- a/tests/fullydistributed_grids/copy_distributed_tria_03.cc +++ b/tests/fullydistributed_grids/copy_distributed_tria_03.cc @@ -64,7 +64,7 @@ test(int n_refinements, const int n_subdivisions, MPI_Comm comm) { CellId id = cell->id(); auto cell_base = tria_pdt.create_cell_iterator(id); - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) Assert(std::abs(cell->center()[d] - cell_base->center()[d]) < 1e-9, ExcMessage("Cells do not match")); } diff --git a/tests/fullydistributed_grids/copy_serial_tria_08.cc b/tests/fullydistributed_grids/copy_serial_tria_08.cc index d0d68e5464..1827f94363 100644 --- a/tests/fullydistributed_grids/copy_serial_tria_08.cc +++ b/tests/fullydistributed_grids/copy_serial_tria_08.cc @@ -68,7 +68,7 @@ test(int n_refinements, MPI_Comm comm) auto cell_base = basetria.create_cell_iterator(id); // Assert(cell->center() == cell_base->center(), // ExcMessage("Cells do not match")); - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) Assert(std::abs(cell->center()[d] - cell_base->center()[d]) < 1e-9, ExcMessage("Cells do not match")); } diff --git a/tests/fullydistributed_grids/copy_serial_tria_09.cc b/tests/fullydistributed_grids/copy_serial_tria_09.cc index 5bc44455ff..63a3693f11 100644 --- a/tests/fullydistributed_grids/copy_serial_tria_09.cc +++ b/tests/fullydistributed_grids/copy_serial_tria_09.cc @@ -46,12 +46,12 @@ test(int n_refinements, GridGenerator::hyper_cube(basetria); basetria.refine_global(1); - for (int i = 1; i < n_refinements; i++) + for (int i = 1; i < n_refinements; ++i) { for (auto &cell : basetria.active_cell_iterators()) { bool refinement_flag = true; - for (int d = 0; d < dim; d++) + for (int d = 0; d < dim; ++d) refinement_flag &= cell->center()[d] < 0.5; if (refinement_flag) @@ -80,7 +80,7 @@ test(int n_refinements, { CellId id = cell->id(); auto cell_base = basetria.create_cell_iterator(id); - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) Assert(std::abs(cell->center()[d] - cell_base->center()[d]) < 1e-9, ExcMessage("Cells do not match")); } diff --git a/tests/fullydistributed_grids/repartitioning_02.cc b/tests/fullydistributed_grids/repartitioning_02.cc index 582d52efcb..671e117b54 100644 --- a/tests/fullydistributed_grids/repartitioning_02.cc +++ b/tests/fullydistributed_grids/repartitioning_02.cc @@ -53,7 +53,7 @@ create_triangulation(Triangulation &tria) if (cell->is_locally_owned()) { bool flag = true; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) if (cell->center()[d] > 0.0) flag = false; if (flag) diff --git a/tests/fullydistributed_grids/repartitioning_03.cc b/tests/fullydistributed_grids/repartitioning_03.cc index 66482a5f33..985fc1a613 100644 --- a/tests/fullydistributed_grids/repartitioning_03.cc +++ b/tests/fullydistributed_grids/repartitioning_03.cc @@ -56,7 +56,7 @@ create_triangulation(Triangulation &tria) if (cell->is_locally_owned()) { bool flag = true; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) if (cell->center()[d] > 0.0) flag = false; if (flag) diff --git a/tests/fullydistributed_grids/repartitioning_04.cc b/tests/fullydistributed_grids/repartitioning_04.cc index 2256bbfb03..f705b2a784 100644 --- a/tests/fullydistributed_grids/repartitioning_04.cc +++ b/tests/fullydistributed_grids/repartitioning_04.cc @@ -56,7 +56,7 @@ create_triangulation(Triangulation &tria) if (cell->is_locally_owned()) { bool flag = true; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) if (cell->center()[d] > 0.0) flag = false; if (flag) diff --git a/tests/fullydistributed_grids/tests.h b/tests/fullydistributed_grids/tests.h index 4029e7f7b5..6277719c6e 100644 --- a/tests/fullydistributed_grids/tests.h +++ b/tests/fullydistributed_grids/tests.h @@ -30,11 +30,11 @@ print_statistics(const Triangulation &tria, bool do_mg = false) if (do_mg) { - for (auto level = 0u; level < tria.n_levels(); level++) + for (auto level = 0u; level < tria.n_levels(); ++level) deallog << "n_cells on level=" << level << ": " << tria.n_cells(level) << std::endl; - for (auto level = 0u; level < tria.n_levels(); level++) + for (auto level = 0u; level < tria.n_levels(); ++level) deallog << "n_active_cells on level=" << level << ": " << tria.n_active_cells(level) << std::endl; } @@ -56,11 +56,11 @@ print_statistics(const DoFHandler &dof_handler, if (do_mg) { - for (auto level = 0u; level < n_levels; level++) + for (auto level = 0u; level < n_levels; ++level) deallog << "n_dofs on level=" << level << ": " << dof_handler.n_dofs(level) << std::endl; - for (auto level = 0u; level < n_levels; level++) + for (auto level = 0u; level < n_levels; ++level) deallog << "n_locally_owned_mg_dofs on level=" << level << ": " << dof_handler.locally_owned_mg_dofs(level).n_elements() << std::endl; diff --git a/tests/grid/distributed_compute_point_locations_02.cc b/tests/grid/distributed_compute_point_locations_02.cc index ec2e356f32..c97b377245 100644 --- a/tests/grid/distributed_compute_point_locations_02.cc +++ b/tests/grid/distributed_compute_point_locations_02.cc @@ -158,7 +158,7 @@ test_compute_pt_loc(unsigned int ref_cube, unsigned int ref_sphere) } unsigned int output_computed_pts = 0; - for (unsigned int c = 0; c < output_cells.size(); c++) + for (unsigned int c = 0; c < output_cells.size(); ++c) { output_computed_pts += output_points[c].size(); const auto &cell = output_cells[c]; diff --git a/tests/grid/grid_tools_guess_pt_owner_01.cc b/tests/grid/grid_tools_guess_pt_owner_01.cc index 53e9cf6b7c..cdbefc1d54 100644 --- a/tests/grid/grid_tools_guess_pt_owner_01.cc +++ b/tests/grid/grid_tools_guess_pt_owner_01.cc @@ -47,7 +47,7 @@ test_point_owner(unsigned int n_procs) std::pair, Point> boundaries; boundaries.first[0] = tot_bbox; boundaries.second[0] = tot_bbox + 1; - for (int i = 1; i < spacedim; i++) + for (int i = 1; i < spacedim; ++i) boundaries.second[i] = 1; BoundingBox new_box(boundaries); @@ -60,7 +60,7 @@ test_point_owner(unsigned int n_procs) for (unsigned int i = 0; i < tot_bbox; ++i) { points[i][0] = i + 0.5; - for (unsigned int j = 1; j < spacedim; j++) + for (unsigned int j = 1; j < spacedim; ++j) points[i][j] = 0.5; } diff --git a/tests/grid/grid_tools_guess_pt_owner_02.cc b/tests/grid/grid_tools_guess_pt_owner_02.cc index db6d784309..22b2cc9b17 100644 --- a/tests/grid/grid_tools_guess_pt_owner_02.cc +++ b/tests/grid/grid_tools_guess_pt_owner_02.cc @@ -49,7 +49,7 @@ test_point_owner(unsigned int n_procs) std::pair, Point> boundaries; boundaries.first[0] = tot_bbox; boundaries.second[0] = tot_bbox + 1; - for (int i = 1; i < spacedim; i++) + for (int i = 1; i < spacedim; ++i) boundaries.second[i] = 1; BoundingBox new_box(boundaries); @@ -62,7 +62,7 @@ test_point_owner(unsigned int n_procs) for (unsigned int i = 0; i < tot_bbox; ++i) { points[i][0] = i + 0.5; - for (unsigned int j = 1; j < spacedim; j++) + for (unsigned int j = 1; j < spacedim; ++j) points[i][j] = 0.5; } diff --git a/tests/grid/grid_transform_03.cc b/tests/grid/grid_transform_03.cc index 9ed85b64f4..b0a94e899c 100644 --- a/tests/grid/grid_transform_03.cc +++ b/tests/grid/grid_transform_03.cc @@ -46,7 +46,7 @@ public: { double l2_inverse = std::numeric_limits::max(); - for (unsigned int d = 0; d < distance_source.size(); d++) + for (unsigned int d = 0; d < distance_source.size(); ++d) l2_inverse = std::min((p - distance_source[d]).norm_square(), l2_inverse); l2_inverse = std::max(l2_inverse, 1.e-5); diff --git a/tests/hp/fe_nothing_01.cc b/tests/hp/fe_nothing_01.cc index f60af475cf..e57c06e903 100644 --- a/tests/hp/fe_nothing_01.cc +++ b/tests/hp/fe_nothing_01.cc @@ -61,7 +61,7 @@ test() dof_handler.begin_active(), endc = dof_handler.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) { Point center = cell->center(); if (std::sqrt(center.square()) < 0.5) diff --git a/tests/hp/fe_nothing_02.cc b/tests/hp/fe_nothing_02.cc index eb7a4b3940..549ba33c85 100644 --- a/tests/hp/fe_nothing_02.cc +++ b/tests/hp/fe_nothing_02.cc @@ -64,7 +64,7 @@ test() dof_handler.begin_active(), endc = dof_handler.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) { Point center = cell->center(); if (std::sqrt(center.square()) < 0.25) @@ -96,7 +96,7 @@ test() cell = dof_handler.begin_active(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) { deallog << "This is a " << (cell->active_fe_index() == 1 ? "FE_Nothing" : "FE_Q") diff --git a/tests/hp/fe_nothing_03.cc b/tests/hp/fe_nothing_03.cc index 0833b412c2..ff81502552 100644 --- a/tests/hp/fe_nothing_03.cc +++ b/tests/hp/fe_nothing_03.cc @@ -66,7 +66,7 @@ test() dof_handler.begin_active(), endc = dof_handler.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) { Point center = cell->center(); if (std::sqrt(center.square()) < 0.25) diff --git a/tests/hp/fe_nothing_05.cc b/tests/hp/fe_nothing_05.cc index f32852fbb6..1319ed8d13 100644 --- a/tests/hp/fe_nothing_05.cc +++ b/tests/hp/fe_nothing_05.cc @@ -77,7 +77,7 @@ test() endc = triangulation.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) { Point center = cell->center(); @@ -116,7 +116,7 @@ test() dof_handler.begin_active(), endc = dof_handler.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) { if (cell->subdomain_id() == 1) cell->set_active_fe_index(1); diff --git a/tests/hp/fe_nothing_06.cc b/tests/hp/fe_nothing_06.cc index 35d101a40f..c1ad298a2b 100644 --- a/tests/hp/fe_nothing_06.cc +++ b/tests/hp/fe_nothing_06.cc @@ -76,7 +76,7 @@ test() endc = triangulation.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) { Point center = cell->center(); @@ -118,7 +118,7 @@ test() dof_handler.begin_active(), endc = dof_handler.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) { if (cell->subdomain_id() == 1) cell->set_active_fe_index(1); diff --git a/tests/hp/fe_nothing_07.cc b/tests/hp/fe_nothing_07.cc index 4541cc1acf..f563a17aa5 100644 --- a/tests/hp/fe_nothing_07.cc +++ b/tests/hp/fe_nothing_07.cc @@ -88,7 +88,7 @@ test() endc = triangulation.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) { Point center = cell->center(); @@ -125,7 +125,7 @@ test() dof_handler.begin_active(), endc = dof_handler.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) { if (cell->subdomain_id() == 1) cell->set_active_fe_index(1); @@ -163,7 +163,7 @@ test() dof_handler.begin_active(), endc = dof_handler.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) { deallog << cell << ' ' << cell->active_fe_index() << std::endl << " "; std::vector local_dof_indices( diff --git a/tests/hp/fe_nothing_08.cc b/tests/hp/fe_nothing_08.cc index 7d0501f1d1..a163c94ded 100644 --- a/tests/hp/fe_nothing_08.cc +++ b/tests/hp/fe_nothing_08.cc @@ -61,7 +61,7 @@ test() dof_handler.begin_active(), endc = dof_handler.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) if (cell->center()[0] > 0) cell->set_active_fe_index(1); else diff --git a/tests/hp/fe_nothing_09.cc b/tests/hp/fe_nothing_09.cc index 28441f0fd5..2057094462 100644 --- a/tests/hp/fe_nothing_09.cc +++ b/tests/hp/fe_nothing_09.cc @@ -63,7 +63,7 @@ test() dof_handler.begin_active(), endc = dof_handler.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) if (cell->center()[0] > 0) cell->set_active_fe_index(1); else diff --git a/tests/hp/fe_nothing_11.cc b/tests/hp/fe_nothing_11.cc index 22d1af8a3e..bb4f5b2f60 100644 --- a/tests/hp/fe_nothing_11.cc +++ b/tests/hp/fe_nothing_11.cc @@ -63,7 +63,7 @@ test() dof_handler.begin_active(), endc = dof_handler.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) if (cell->center()[0] > 0) cell->set_active_fe_index(1); else diff --git a/tests/hp/fe_nothing_12.cc b/tests/hp/fe_nothing_12.cc index 4480b1c75b..e7568a337a 100644 --- a/tests/hp/fe_nothing_12.cc +++ b/tests/hp/fe_nothing_12.cc @@ -96,7 +96,7 @@ test() dof_handler.begin_active(), endc = dof_handler.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) { deallog << cell << ' ' << cell->active_fe_index() << std::endl << " "; std::vector local_dof_indices( diff --git a/tests/hp/fe_nothing_13.cc b/tests/hp/fe_nothing_13.cc index 53493dcfed..d2e44d4361 100644 --- a/tests/hp/fe_nothing_13.cc +++ b/tests/hp/fe_nothing_13.cc @@ -101,7 +101,7 @@ test() dof_handler.begin_active(), endc = dof_handler.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) { deallog << cell << ' ' << cell->active_fe_index() << std::endl << " "; std::vector local_dof_indices( diff --git a/tests/hp/fe_nothing_14.cc b/tests/hp/fe_nothing_14.cc index a1186301e3..90a65eb55c 100644 --- a/tests/hp/fe_nothing_14.cc +++ b/tests/hp/fe_nothing_14.cc @@ -114,7 +114,7 @@ test() dof_handler.begin_active(), endc = dof_handler.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) { deallog << cell << ' ' << cell->active_fe_index() << std::endl << " "; std::vector local_dof_indices( diff --git a/tests/hp/fe_nothing_18.cc b/tests/hp/fe_nothing_18.cc index 360c640484..5129131c9b 100644 --- a/tests/hp/fe_nothing_18.cc +++ b/tests/hp/fe_nothing_18.cc @@ -297,7 +297,7 @@ ElasticProblem::make_grid() triangulationL.begin_active()->set_material_id(0); triangulationR.begin_active()->set_material_id(id_of_lagrange_mult); - for (unsigned int i = 0; i < n_faces_per_cell; i++) + for (unsigned int i = 0; i < n_faces_per_cell; ++i) { triangulationL.begin_active()->face(i)->set_boundary_id(i); triangulationR.begin_active()->face(i)->set_boundary_id(n_faces_per_cell + @@ -318,7 +318,7 @@ ElasticProblem::setup_system() { std::vector block_component( n_components, u_block); // init to represent u everywhere - for (unsigned int i = 0; i < dim; i++) + for (unsigned int i = 0; i < dim; ++i) block_component[i + dim] = lambda_block; //(1) set active FE indices based in material id... diff --git a/tests/hp/hp_constraints_neither_dominate_01.cc b/tests/hp/hp_constraints_neither_dominate_01.cc index b13dd1709b..9c2b03d3a9 100644 --- a/tests/hp/hp_constraints_neither_dominate_01.cc +++ b/tests/hp/hp_constraints_neither_dominate_01.cc @@ -78,7 +78,7 @@ test2cells(const unsigned int p1 = 2, const unsigned int p2 = 1) Triangulation triangulation; { Point p1, p2; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) p1[d] = -1; p2[0] = 1.0; std::vector repetitoins(dim, 1); @@ -123,7 +123,7 @@ test2cells(const unsigned int p1 = 2, const unsigned int p2 = 1) counter++; std::vector> shape_functions; std::vector names; - for (unsigned int s = 0; s < dof_handler.n_dofs(); s++) + for (unsigned int s = 0; s < dof_handler.n_dofs(); ++s) { Vector shape_function; shape_function.reinit(dof_handler.n_dofs()); @@ -159,7 +159,7 @@ test2cells(const unsigned int p1 = 2, const unsigned int p2 = 1) } data_out.add_data_vector(fe_index, "fe_index"); - for (unsigned int i = 0; i < shape_functions.size(); i++) + for (unsigned int i = 0; i < shape_functions.size(); ++i) data_out.add_data_vector(shape_functions[i], names[i]); data_out.build_patches(0); @@ -172,7 +172,7 @@ test2cells(const unsigned int p1 = 2, const unsigned int p2 = 1) // fill some vector Vector solution(dof_handler.n_dofs()); - for (unsigned int dof = 0; dof < dof_handler.n_dofs(); dof++) + for (unsigned int dof = 0; dof < dof_handler.n_dofs(); ++dof) solution[dof] = 21.0 * (dof % 2) + 0.5 + dof % 3; constraints.distribute(solution); @@ -207,7 +207,7 @@ test2cells(const unsigned int p1 = 2, const unsigned int p2 = 1) const std::vector> &q_points = fe_face_values.get_quadrature_points(); - for (unsigned int q = 0; q < n_q_points; q++) + for (unsigned int q = 0; q < n_q_points; ++q) deallog << "u[" << q_points[q] << "]={" << values[q][0] << "," << values[q][1] << "}" << std::endl; } diff --git a/tests/hp/hp_constraints_neither_dominate_02.cc b/tests/hp/hp_constraints_neither_dominate_02.cc index 15536e1d2f..3b792f9133 100644 --- a/tests/hp/hp_constraints_neither_dominate_02.cc +++ b/tests/hp/hp_constraints_neither_dominate_02.cc @@ -81,7 +81,7 @@ struct less_than_key const Point &p1 = pair1.first; const Point &p2 = pair2.first; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) { const bool is_equal = (std::abs(p1[d] - p2[d]) < precision); if (!is_equal) @@ -108,7 +108,7 @@ test2cells(const FiniteElement &fe_0, Triangulation triangulation; { Point p1, p2; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) p2[d] = 1.0; p1[0] = -1.0; std::vector repetitoins(dim, 1); @@ -170,7 +170,7 @@ test2cells(const FiniteElement &fe_0, counter++; std::vector> shape_functions; std::vector names; - for (unsigned int s = 0; s < dof_handler.n_dofs(); s++) + for (unsigned int s = 0; s < dof_handler.n_dofs(); ++s) { Vector shape_function; shape_function.reinit(dof_handler.n_dofs()); @@ -206,7 +206,7 @@ test2cells(const FiniteElement &fe_0, } data_out.add_data_vector(fe_index, "fe_index"); - for (unsigned int i = 0; i < shape_functions.size(); i++) + for (unsigned int i = 0; i < shape_functions.size(); ++i) data_out.add_data_vector(shape_functions[i], names[i]); data_out.build_patches(0); @@ -220,7 +220,7 @@ test2cells(const FiniteElement &fe_0, // fill some vector Vector solution(dof_handler.n_dofs()); - for (unsigned int dof = 0; dof < dof_handler.n_dofs(); dof++) + for (unsigned int dof = 0; dof < dof_handler.n_dofs(); ++dof) solution[dof] = 1.5 * (dof % 7) + 0.5 * dim + 2.0 * (dof % 3); constraints.distribute(solution); @@ -258,18 +258,18 @@ test2cells(const FiniteElement &fe_0, const std::vector> &q_points = fe_face_values.get_quadrature_points(); - for (unsigned int q = 0; q < n_q_points; q++) + for (unsigned int q = 0; q < n_q_points; ++q) { // since our face is [0,1]^{dim-1}, the quadrature rule // will coincide with quadrature points on mother face. // Use that to limit output of sub-faces at the same quadrature // points only. Point qpt; - for (unsigned int d = 0; d < dim - 1; d++) + for (unsigned int d = 0; d < dim - 1; ++d) qpt[d] = q_points[q][d + 1]; unsigned int q_found = 0; - for (; q_found < quad_formula.size(); q_found++) + for (; q_found < quad_formula.size(); ++q_found) if (quad_formula.point(q_found).distance(qpt) < 1e-5) break; @@ -291,14 +291,14 @@ test2cells(const FiniteElement &fe_0, std::sort(pairs_point_value.begin(), pairs_point_value.end(), less_than_key()); - for (unsigned int p = 0; p < pairs_point_value.size(); p++) + for (unsigned int p = 0; p < pairs_point_value.size(); ++p) { const Point & pt = pairs_point_value[p].first; const Vector &val = pairs_point_value[p].second; Assert(val.size() == n_comp, ExcInternalError()); deallog << "@" << pt << " u = {" << val[0]; - for (unsigned int c = 1; c < n_comp; c++) + for (unsigned int c = 1; c < n_comp; ++c) deallog << "," << val[c]; deallog << "}" << std::endl; } diff --git a/tests/hp/hp_q_hierarchical_constraints.cc b/tests/hp/hp_q_hierarchical_constraints.cc index e7809e3ea9..41d8fb2fe0 100644 --- a/tests/hp/hp_q_hierarchical_constraints.cc +++ b/tests/hp/hp_q_hierarchical_constraints.cc @@ -114,7 +114,7 @@ test(const bool apply_constrains, const unsigned int hp) if (apply_constrains) deallog << hp_string << std::endl; - for (unsigned int i = 0; i < n_dofs; i++) + for (unsigned int i = 0; i < n_dofs; ++i) { v = 0.; v[i] = 1.; diff --git a/tests/hp/laplace.h b/tests/hp/laplace.h index 590dc956cc..dc04a96454 100644 --- a/tests/hp/laplace.h +++ b/tests/hp/laplace.h @@ -335,11 +335,11 @@ Laplace::assemble() const unsigned int n_q_points = hp_fe_values.get_present_fe_values().n_quadrature_points; - for (unsigned int q_index = 0; q_index < n_q_points; q_index++) + for (unsigned int q_index = 0; q_index < n_q_points; ++q_index) { - for (unsigned int i = 0; i < dofs_per_cell; i++) + for (unsigned int i = 0; i < dofs_per_cell; ++i) { - for (unsigned int j = i; j < dofs_per_cell; j++) + for (unsigned int j = i; j < dofs_per_cell; ++j) { cell_matrix(i, j) += (fe_values.shape_grad(i, q_index) * fe_values.shape_grad(j, q_index)) * @@ -353,8 +353,8 @@ Laplace::assemble() } // exploit symmetry - for (unsigned int i = 0; i < dofs_per_cell; i++) - for (unsigned int j = i; j < dofs_per_cell; j++) + for (unsigned int i = 0; i < dofs_per_cell; ++i) + for (unsigned int j = i; j < dofs_per_cell; ++j) cell_matrix(j, i) = cell_matrix(i, j); @@ -639,7 +639,7 @@ Laplace::run() setup_geometry(); setup_system(); - for (unsigned int cycle = 0; cycle <= n_cycles; cycle++) + for (unsigned int cycle = 0; cycle <= n_cycles; ++cycle) { pcout << std::endl << "Cycle " << cycle << std::endl; diff --git a/tests/hp/laplace_mitchell2014_04_peak.cc b/tests/hp/laplace_mitchell2014_04_peak.cc index 507af6646f..10d482639b 100644 --- a/tests/hp/laplace_mitchell2014_04_peak.cc +++ b/tests/hp/laplace_mitchell2014_04_peak.cc @@ -126,7 +126,7 @@ Problem4::Problem4(const Function &force_function, n_cycles, output_name) { - for (unsigned int p = 1; p <= n_cycles; p++) + for (unsigned int p = 1; p <= n_cycles; ++p) { // Laplace::fe.push_back(FE_Q_Hierarchical(p)); Laplace::fe.push_back(FE_Q(p)); diff --git a/tests/hp/solution_transfer_13.cc b/tests/hp/solution_transfer_13.cc index fe564cd482..8574e4a253 100644 --- a/tests/hp/solution_transfer_13.cc +++ b/tests/hp/solution_transfer_13.cc @@ -168,7 +168,7 @@ main() */ endc = dof_handler.end(); - for (cell = dof_handler.begin_active(); cell != endc; cell++) + for (cell = dof_handler.begin_active(); cell != endc; ++cell) if (cell->level() > 1) cell->set_coarsen_flag(); diff --git a/tests/lac/constraints_block_01.cc b/tests/lac/constraints_block_01.cc index 2203710f14..b82a6b541d 100644 --- a/tests/lac/constraints_block_01.cc +++ b/tests/lac/constraints_block_01.cc @@ -136,7 +136,7 @@ main() std::vector block_component(total_dim, 0); - for (unsigned int comp = 0; comp < total_dim; comp++) + for (unsigned int comp = 0; comp < total_dim; ++comp) { if (comp < solid_dim) block_component[comp] = 0; @@ -320,12 +320,12 @@ main() // prints out which dofs are coupled deallog << "---------------Coupled dofs---------------" << std::endl; - for (unsigned int i = 0; i < solid_fluid_pairs.size(); i++) + for (unsigned int i = 0; i < solid_fluid_pairs.size(); ++i) { deallog << "solid dof: " << solid_fluid_pairs[i].first << ", fluid dof: " << solid_fluid_pairs[i].second << std::endl; } - for (unsigned int i = 0; i < solid_fluid_pairs.size(); i++) + for (unsigned int i = 0; i < solid_fluid_pairs.size(); ++i) { deallog << "solid dof: " << solid_mesh_pairs[i].first << ", mesh dof: " << solid_mesh_pairs[i].second << std::endl; diff --git a/tests/lac/inhomogeneous_constraints_04.cc b/tests/lac/inhomogeneous_constraints_04.cc index 3026310c5a..083c05bcfb 100644 --- a/tests/lac/inhomogeneous_constraints_04.cc +++ b/tests/lac/inhomogeneous_constraints_04.cc @@ -110,13 +110,13 @@ test(bool use_constraint_matrix) } else { - for (unsigned int i = 0; i < 5; i++) + for (unsigned int i = 0; i < 5; ++i) { mat.add(local_dofs1[i], local_dofs1[i], local_mat(i, i)); rhs(local_dofs1[i]) += local_vec(i); } - for (unsigned int i = 0; i < 5; i++) + for (unsigned int i = 0; i < 5; ++i) { mat.add(local_dofs2[i], local_dofs2[i], local_mat(i, i)); rhs(local_dofs2[i]) += local_vec(i); diff --git a/tests/lac/quickmatrix.h b/tests/lac/quickmatrix.h index a8f2849973..815ec6b2e9 100644 --- a/tests/lac/quickmatrix.h +++ b/tests/lac/quickmatrix.h @@ -71,7 +71,7 @@ QuickMatrix::vmult(Vector &d, const Vector &s) const // Middle rows unsigned int start = 0; - for (unsigned int y = 1; y < top; y++) + for (unsigned int y = 1; y < top; ++y) { start += step; d(start) = diff --git a/tests/lac/solver_fire_rosenbrock_01.cc b/tests/lac/solver_fire_rosenbrock_01.cc index 32eca8aa7d..da2b43b20c 100644 --- a/tests/lac/solver_fire_rosenbrock_01.cc +++ b/tests/lac/solver_fire_rosenbrock_01.cc @@ -89,7 +89,7 @@ check_value(const unsigned int N, const double tol) inv_mass.reinit(X); // Set initial guess. - for (unsigned int i = 0; i < N / 2; i++) + for (unsigned int i = 0; i < N / 2; ++i) { X(2 * i) = -1.2; X(2 * i + 1) = 1.0; diff --git a/tests/lac/utilities_02.cc b/tests/lac/utilities_02.cc index 1cc44fadf5..1c2f138aaa 100644 --- a/tests/lac/utilities_02.cc +++ b/tests/lac/utilities_02.cc @@ -231,10 +231,10 @@ test() eigensolver.solve(OP, mass, OP, lambda, eigenfunctions, eigenvalues.size()); deallog.depth_file(previous_depth); - for (unsigned int i = 0; i < lambda.size(); i++) + for (unsigned int i = 0; i < lambda.size(); ++i) eigenvalues[i] = lambda[i].real(); - for (unsigned int i = 0; i < eigenvalues.size(); i++) + for (unsigned int i = 0; i < eigenvalues.size(); ++i) deallog << eigenvalues[i] << std::endl; // make sure that we have eigenvectors and they are mass-orthonormal: @@ -245,7 +245,7 @@ test() LinearAlgebra::distributed::Vector Ax(eigenfunctions[0]); for (unsigned int i = 0; i < eigenfunctions.size(); ++i) { - for (unsigned int j = 0; j < eigenfunctions.size(); j++) + for (unsigned int j = 0; j < eigenfunctions.size(); ++j) { const double err = std::abs(eigenfunctions[j] * eigenfunctions[i] - (i == j)); diff --git a/tests/manifold/spherical_manifold_01.cc b/tests/manifold/spherical_manifold_01.cc index eb74ae8696..7bf2d3629b 100644 --- a/tests/manifold/spherical_manifold_01.cc +++ b/tests/manifold/spherical_manifold_01.cc @@ -130,7 +130,7 @@ main() const unsigned int num_points = 20; deallog << "=================================" << std::endl; ; - for (unsigned int i = 0; i < num_points; i++) + for (unsigned int i = 0; i < num_points; ++i) deallog << manifold.get_intermediate_point(P1, P2, (1.0 * i) / (num_points - 1)) diff --git a/tests/manifold/spherical_manifold_04.cc b/tests/manifold/spherical_manifold_04.cc index dd768dd56f..cda38b6a4a 100644 --- a/tests/manifold/spherical_manifold_04.cc +++ b/tests/manifold/spherical_manifold_04.cc @@ -49,7 +49,7 @@ test(const double R) // derived Point center; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) center[d] = d; Triangulation triangulation; diff --git a/tests/manifold/transfinite_manifold_07.cc b/tests/manifold/transfinite_manifold_07.cc index ce2da60182..316a98172a 100644 --- a/tests/manifold/transfinite_manifold_07.cc +++ b/tests/manifold/transfinite_manifold_07.cc @@ -65,7 +65,7 @@ concentric_disks(Triangulation<2> & tria, gp.radius[0] = x[0]; gp.ball_centers[0] = Point<2>(s, 0.0); - for (unsigned int k = 1; k < x.size(); k++) + for (unsigned int k = 1; k < x.size(); ++k) { gp.radius[k] = x[k]; gp.ball_centers[k] = Point<2>(0.0, 0.0); @@ -86,7 +86,7 @@ concentric_disks(Triangulation<2> & tria, vertices[8] = Point<2>(.5 * d + s, -.5 * d); // touching circle - for (unsigned int k = 0; k < x.size(); k++) + for (unsigned int k = 0; k < x.size(); ++k) { double z = (k == 0) ? s : 0.0; r = x[k]; @@ -163,7 +163,7 @@ concentric_disks(Triangulation<2> & tria, cell_v[11][3] = 15; // layer cells - for (unsigned int k = 1; k < x.size(); k++) + for (unsigned int k = 1; k < x.size(); ++k) { const unsigned int m = k + 1; @@ -304,13 +304,13 @@ Mygrid::make_grid() const double s = 0.1; std::vector x{1.0, 1.5, 2.0, 2.5, 3.0}; concentric_disks(triangulation, s, x, gp); - for (unsigned int i = 0; i < gp.n_balls; i++) + for (unsigned int i = 0; i < gp.n_balls; ++i) { balls.emplace_back(gp.ball_centers[i]); } // assigning manifolds, with layers 100, 101, 102, 103 - for (unsigned int i = 0; i < gp.n_balls; i++) + for (unsigned int i = 0; i < gp.n_balls; ++i) { triangulation.set_manifold(100 + i, balls[i]); } diff --git a/tests/mappings/mapping_q_convergence.cc b/tests/mappings/mapping_q_convergence.cc index 9ccfa95866..03e43010cf 100644 --- a/tests/mappings/mapping_q_convergence.cc +++ b/tests/mappings/mapping_q_convergence.cc @@ -67,7 +67,7 @@ regression_slope(const std::vector &x, const std::vector &y) double sum_1 = 0.0, sum_x = 0.0, sum_x2 = 0.0, sum_y = 0.0, sum_xy = 0.0; - for (unsigned int i = 0; i < x.size(); i++) + for (unsigned int i = 0; i < x.size(); ++i) { sum_1 += 1.0; sum_x += x[i]; diff --git a/tests/mappings/mapping_q_eulerian.cc b/tests/mappings/mapping_q_eulerian.cc index 9e428ea537..c69ccad150 100644 --- a/tests/mappings/mapping_q_eulerian.cc +++ b/tests/mappings/mapping_q_eulerian.cc @@ -212,15 +212,15 @@ MappingTest::explicitly_move_mesh() dof_handler.begin_active(), endc = dof_handler.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) { - for (unsigned int v = 0; v < vpc; v++) + for (unsigned int v = 0; v < vpc; ++v) { if (moved[cell->vertex_index(v)] == false) { moved[cell->vertex_index(v)] = true; Point vertex_disp; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) { vertex_disp[d] = displacements(cell->vertex_dof_index(v, d)); } diff --git a/tests/mappings/mapping_real_to_unit_02.cc b/tests/mappings/mapping_real_to_unit_02.cc index 6820284f02..291bacce7d 100644 --- a/tests/mappings/mapping_real_to_unit_02.cc +++ b/tests/mappings/mapping_real_to_unit_02.cc @@ -62,8 +62,8 @@ test2() std::vector m(19 * 19); if (1) // works if changed to "if (0)" <<<<<<<<< - for (unsigned int i = 0; i < 19; i++) - for (unsigned int j = 0; j < 19; j++) + for (unsigned int i = 0; i < 19; ++i) + for (unsigned int j = 0; j < 19; ++j) { /// all points are inside points[19 * i + j](0) = -0.7 + (i + 1) * .07; diff --git a/tests/matrix_free/advect_1d.cc b/tests/matrix_free/advect_1d.cc index ce325d383f..85a49103d0 100644 --- a/tests/matrix_free/advect_1d.cc +++ b/tests/matrix_free/advect_1d.cc @@ -137,7 +137,7 @@ private: n_components, number>::value_type; - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { phi_m.reinit(face); phi_m.read_dof_values(src); @@ -182,7 +182,7 @@ private: n_components, number>::value_type; - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { fe_eval.reinit(face); fe_eval.read_dof_values(src); diff --git a/tests/matrix_free/advect_1d_system.cc b/tests/matrix_free/advect_1d_system.cc index da08cebfd2..5bd3cec55b 100644 --- a/tests/matrix_free/advect_1d_system.cc +++ b/tests/matrix_free/advect_1d_system.cc @@ -144,7 +144,7 @@ private: n_components, number>::value_type; - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { phi_m.reinit(face); phi_m.read_dof_values(src); @@ -189,7 +189,7 @@ private: n_components, number>::value_type; - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { fe_eval.reinit(face); fe_eval.read_dof_values(src); diff --git a/tests/matrix_free/advect_1d_vectorization_mask.cc b/tests/matrix_free/advect_1d_vectorization_mask.cc index b70b387cf8..4bc30b163a 100644 --- a/tests/matrix_free/advect_1d_vectorization_mask.cc +++ b/tests/matrix_free/advect_1d_vectorization_mask.cc @@ -145,7 +145,7 @@ private: const unsigned int n_vect = VectorizedArray::size(); - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { phi_m.reinit(face); phi_m.read_dof_values(src); @@ -202,7 +202,7 @@ private: const unsigned int n_vect = VectorizedArray::size(); - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { fe_eval.reinit(face); fe_eval.read_dof_values(src); diff --git a/tests/matrix_free/compare_faces_by_cells.cc b/tests/matrix_free/compare_faces_by_cells.cc index c048a67ec5..a30a4d3397 100644 --- a/tests/matrix_free/compare_faces_by_cells.cc +++ b/tests/matrix_free/compare_faces_by_cells.cc @@ -131,7 +131,7 @@ private: FEFaceEvaluation phi_outer(data, false); - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { phi.reinit(face); phi_outer.reinit(face); @@ -223,7 +223,7 @@ private: { FEFaceEvaluation phi(data); - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { phi.reinit(face); diff --git a/tests/matrix_free/compute_diagonal_03.cc b/tests/matrix_free/compute_diagonal_03.cc index 2d305cd796..855b586dca 100644 --- a/tests/matrix_free/compute_diagonal_03.cc +++ b/tests/matrix_free/compute_diagonal_03.cc @@ -76,10 +76,10 @@ test() auto quadrature_point = phi.quadrature_point(q); VectorizedArrayType coefficient; - for (unsigned int v = 0; v < VectorizedArrayType::size(); v++) + for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v) { Point point; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) point[d] = quadrature_point[d][v]; coefficient[v] = (point.square() < 0.5 * 0.5) ? 20 : 1; } diff --git a/tests/matrix_free/compute_diagonal_util.h b/tests/matrix_free/compute_diagonal_util.h index bdddbcac36..9f64e13871 100644 --- a/tests/matrix_free/compute_diagonal_util.h +++ b/tests/matrix_free/compute_diagonal_util.h @@ -158,7 +158,7 @@ public: matrix_free.initialize_dof_vector(diagonal_global_reference); matrix_free.initialize_dof_vector(temp); - for (unsigned int i = 0; i < src.size(); i++) + for (unsigned int i = 0; i < src.size(); ++i) { if (src.get_partitioner()->in_local_range(i)) src[i] = 1.0; @@ -173,7 +173,7 @@ public: if (test_matrix) { - for (unsigned int j = 0; j < src.size(); j++) + for (unsigned int j = 0; j < src.size(); ++j) if (temp[j] != 0.0) A_ref(j, i) = temp[j]; else if (i == j) @@ -224,7 +224,7 @@ public: Number, VectorizedArrayType> phi(data, pair); - for (auto cell = pair.first; cell < pair.second; cell++) + for (auto cell = pair.first; cell < pair.second; ++cell) { phi.reinit(cell); phi.read_dof_values(src); diff --git a/tests/matrix_free/ecl_01.cc b/tests/matrix_free/ecl_01.cc index 812608ed1b..ad85f1d5a2 100644 --- a/tests/matrix_free/ecl_01.cc +++ b/tests/matrix_free/ecl_01.cc @@ -146,7 +146,7 @@ test(const unsigned int n_refinements = 1) } }, [&](const auto &, auto &dst, const auto &src, const auto range) { - for (unsigned int face = range.first; face < range.second; face++) + for (unsigned int face = range.first; face < range.second; ++face) { phi_m.reinit(face); phi_p.reinit(face); diff --git a/tests/matrix_free/ecl_02.cc b/tests/matrix_free/ecl_02.cc index d9bc72207b..2c6997782b 100644 --- a/tests/matrix_free/ecl_02.cc +++ b/tests/matrix_free/ecl_02.cc @@ -101,10 +101,10 @@ test(const unsigned int n_refinements = 1) phi_p(matrix_free, false); - for (unsigned int i = 0; i < src.size() / 2; i++) + for (unsigned int i = 0; i < src.size() / 2; ++i) src[i] = 1; - for (unsigned int i = src.size() / 2; i < src.size(); i++) + for (unsigned int i = src.size() / 2; i < src.size(); ++i) src[i] = 2; dst = 0.0; @@ -124,23 +124,23 @@ test(const unsigned int n_refinements = 1) phi_m.read_dof_values(src); - for (unsigned int i = 0; i < phi_m.static_dofs_per_component; i++) + for (unsigned int i = 0; i < phi_m.static_dofs_per_component; ++i) deallog << static_cast(phi_m.begin_dof_values()[i][0]) << " "; deallog << std::endl; phi_m.gather_evaluate(src, EvaluationFlags::values); - for (unsigned int i = 0; i < phi_m.static_n_q_points; i++) + for (unsigned int i = 0; i < phi_m.static_n_q_points; ++i) deallog << static_cast(phi_m.begin_values()[i][0]) << " "; deallog << std::endl; phi_p.read_dof_values(src); - for (unsigned int i = 0; i < phi_p.static_dofs_per_component; i++) + for (unsigned int i = 0; i < phi_p.static_dofs_per_component; ++i) deallog << static_cast(phi_p.begin_dof_values()[i][0]) << " "; deallog << std::endl; phi_p.gather_evaluate(src, EvaluationFlags::values); - for (unsigned int i = 0; i < phi_p.static_n_q_points; i++) + for (unsigned int i = 0; i < phi_p.static_n_q_points; ++i) deallog << static_cast(phi_p.begin_values()[i][0]) << " "; deallog << std::endl << std::endl; } diff --git a/tests/matrix_free/faces_value_optimization.cc b/tests/matrix_free/faces_value_optimization.cc index 7b3c751178..e207d2f615 100644 --- a/tests/matrix_free/faces_value_optimization.cc +++ b/tests/matrix_free/faces_value_optimization.cc @@ -75,7 +75,7 @@ private: FEFaceEvaluation check(data, true); - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { ref.reinit(face); check.reinit(face); diff --git a/tests/matrix_free/faces_value_optimization_02.cc b/tests/matrix_free/faces_value_optimization_02.cc index 3e934cb84e..a57f20a7b4 100644 --- a/tests/matrix_free/faces_value_optimization_02.cc +++ b/tests/matrix_free/faces_value_optimization_02.cc @@ -75,7 +75,7 @@ private: FEFaceEvaluation ref(data, true); FEFaceEvaluation check(data, true); - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { ref.reinit(face); check.reinit(face); diff --git a/tests/matrix_free/fe_evaluation_print_01.cc b/tests/matrix_free/fe_evaluation_print_01.cc index e6f1239cde..c8a9838d0f 100644 --- a/tests/matrix_free/fe_evaluation_print_01.cc +++ b/tests/matrix_free/fe_evaluation_print_01.cc @@ -36,18 +36,18 @@ template void test() { - for (unsigned int i = 1; i < 25; i++) + for (unsigned int i = 1; i < 25; ++i) { - for (unsigned int j = 1; j < 25; j++) + for (unsigned int j = 1; j < 25; ++j) if (FEEvaluation::fast_evaluation_supported(i, j)) deallog << 1 << " "; else deallog << " "; deallog << std::endl; } - for (unsigned int i = 1; i < 25; i++) + for (unsigned int i = 1; i < 25; ++i) { - for (unsigned int j = 1; j < 25; j++) + for (unsigned int j = 1; j < 25; ++j) if (FEFaceEvaluation::fast_evaluation_supported(i, j)) deallog << 1 << " "; else diff --git a/tests/matrix_free/get_functions_common.h b/tests/matrix_free/get_functions_common.h index 1fb0a47ece..55aa6c3058 100644 --- a/tests/matrix_free/get_functions_common.h +++ b/tests/matrix_free/get_functions_common.h @@ -108,7 +108,7 @@ public: fe_val.get_function_gradients(src, reference_grads); fe_val.get_function_hessians(src, reference_hess); - for (int q = 0; q < (int)fe_eval.n_q_points; q++) + for (int q = 0; q < (int)fe_eval.n_q_points; ++q) { errors[0] += std::fabs(fe_eval.get_value(q)[j] - reference_values[q]); diff --git a/tests/matrix_free/get_functions_faces.cc b/tests/matrix_free/get_functions_faces.cc index ec0158d85d..784f7e6638 100644 --- a/tests/matrix_free/get_functions_faces.cc +++ b/tests/matrix_free/get_functions_faces.cc @@ -70,7 +70,7 @@ private: { FEFaceEvaluation fe_eval(data, true); - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { fe_eval.reinit(face); fe_eval.read_dof_values(src); diff --git a/tests/matrix_free/get_functions_multife.cc b/tests/matrix_free/get_functions_multife.cc index ddb7bed5e0..bd0fd094a8 100644 --- a/tests/matrix_free/get_functions_multife.cc +++ b/tests/matrix_free/get_functions_multife.cc @@ -101,7 +101,7 @@ public: fe_val0.get_function_gradients(src[0], reference_grads0); fe_val0.get_function_hessians(src[0], reference_hess0); - for (int q = 0; q < (int)fe_eval0.n_q_points; q++) + for (int q = 0; q < (int)fe_eval0.n_q_points; ++q) { errors[0] += std::fabs(fe_eval0.get_value(q)[j] - reference_values0[q]); @@ -122,7 +122,7 @@ public: fe_val1.get_function_gradients(src[1], reference_grads1); fe_val1.get_function_hessians(src[1], reference_hess1); - for (int q = 0; q < (int)fe_eval1.n_q_points; q++) + for (int q = 0; q < (int)fe_eval1.n_q_points; ++q) { errors[3] += std::fabs(fe_eval1.get_value(q)[j] - reference_values1[q]); diff --git a/tests/matrix_free/get_functions_multife2.cc b/tests/matrix_free/get_functions_multife2.cc index f2befe336b..a376c99dd5 100644 --- a/tests/matrix_free/get_functions_multife2.cc +++ b/tests/matrix_free/get_functions_multife2.cc @@ -115,7 +115,7 @@ public: fe_val0.get_function_gradients(src[0], reference_grads0); fe_val0.get_function_hessians(src[0], reference_hess0); - for (int q = 0; q < (int)fe_eval0.n_q_points; q++) + for (int q = 0; q < (int)fe_eval0.n_q_points; ++q) { errors[0] += std::fabs(fe_eval0.get_value(q)[j] - reference_values0[q]); @@ -136,7 +136,7 @@ public: fe_val1.get_function_gradients(src[1], reference_grads1); fe_val1.get_function_hessians(src[1], reference_hess1); - for (int q = 0; q < (int)fe_eval1.n_q_points; q++) + for (int q = 0; q < (int)fe_eval1.n_q_points; ++q) { errors[3] += std::fabs(fe_eval1.get_value(q)[j] - reference_values1[q]); @@ -157,7 +157,7 @@ public: fe_val2.get_function_gradients(src[2], reference_grads2); fe_val2.get_function_hessians(src[2], reference_hess2); - for (int q = 0; q < (int)fe_eval2.n_q_points; q++) + for (int q = 0; q < (int)fe_eval2.n_q_points; ++q) { errors[6] += std::fabs(fe_eval2.get_value(q)[j] - reference_values2[q]); diff --git a/tests/matrix_free/iterators.cc b/tests/matrix_free/iterators.cc index 61fa4497b3..fd916b4fbf 100644 --- a/tests/matrix_free/iterators.cc +++ b/tests/matrix_free/iterators.cc @@ -129,7 +129,7 @@ private: const VectorType &, const std::pair &pair) const { - for (auto cell = pair.first; cell < pair.second; cell++) + for (auto cell = pair.first; cell < pair.second; ++cell) for (auto lane = 0u; lane < data.n_active_entries_per_cell_batch(cell); lane++) cells.emplace(data.get_cell_iterator(cell, lane)->id()); @@ -141,7 +141,7 @@ private: const VectorType &, const std::pair &pair) const { - for (auto face = pair.first; face < pair.second; face++) + for (auto face = pair.first; face < pair.second; ++face) for (auto lane = 0u; lane < data.n_active_entries_per_face_batch(face); lane++) { @@ -163,7 +163,7 @@ private: const VectorType &, const std::pair &pair) const { - for (auto face = pair.first; face < pair.second; face++) + for (auto face = pair.first; face < pair.second; ++face) for (auto lane = 0u; lane < data.n_active_entries_per_face_batch(face); lane++) boundaries.emplace( diff --git a/tests/matrix_free/laplace_operator_02.cc b/tests/matrix_free/laplace_operator_02.cc index b52868772c..7a8ddcaaa9 100644 --- a/tests/matrix_free/laplace_operator_02.cc +++ b/tests/matrix_free/laplace_operator_02.cc @@ -71,7 +71,7 @@ public: Point p; for (unsigned int v = 0; v < VectorizedArray::size(); ++v) { - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) p[d] = p_vec[d][v]; res[v] = value(p); } diff --git a/tests/matrix_free/matrix_vector_faces_common.h b/tests/matrix_free/matrix_vector_faces_common.h index b0413f3f18..29bf84b003 100644 --- a/tests/matrix_free/matrix_vector_faces_common.h +++ b/tests/matrix_free/matrix_vector_faces_common.h @@ -145,7 +145,7 @@ private: VectorizedArrayType>::value_type; const int actual_degree = data.get_dof_handler().get_fe().degree; - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { fe_eval.reinit(face); fe_eval_neighbor.reinit(face); @@ -210,7 +210,7 @@ private: number, VectorizedArrayType>::value_type; const int actual_degree = data.get_dof_handler().get_fe().degree; - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { fe_eval.reinit(face); fe_eval.read_dof_values(src); @@ -349,7 +349,7 @@ private: VectorizedArrayType>::value_type; const int actual_degree = data.get_dof_handler().get_fe().degree; - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { fe_eval.reinit(face); fe_eval_neighbor.reinit(face); @@ -416,7 +416,7 @@ private: number, VectorizedArrayType>::value_type; const int actual_degree = data.get_dof_handler().get_fe().degree; - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { fe_eval.reinit(face); fe_eval.gather_evaluate(src, @@ -586,7 +586,7 @@ private: number, VectorizedArrayType>::value_type; - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { phi_m.reinit(face); phi_m.gather_evaluate(src, EvaluationFlags::values); @@ -636,7 +636,7 @@ private: value_type u_plus; u_plus = make_vectorized_array(1.3); - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { fe_eval.reinit(face); fe_eval.gather_evaluate(src, EvaluationFlags::values); diff --git a/tests/matrix_free/multigrid_dg_periodic.cc b/tests/matrix_free/multigrid_dg_periodic.cc index de9b3f67af..0ab4b763c2 100644 --- a/tests/matrix_free/multigrid_dg_periodic.cc +++ b/tests/matrix_free/multigrid_dg_periodic.cc @@ -197,7 +197,7 @@ private: FEFaceEvaluation fe_eval(data, true); FEFaceEvaluation fe_eval_neighbor(data, false); - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { fe_eval.reinit(face); fe_eval_neighbor.reinit(face); @@ -244,7 +244,7 @@ private: const std::pair & face_range) const { FEFaceEvaluation fe_eval(data, true); - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { fe_eval.reinit(face); fe_eval.read_dof_values(src); @@ -333,7 +333,7 @@ private: AlignedVector> local_diagonal_vector( phi.dofs_per_cell); - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { phi.reinit(face); phi_outer.reinit(face); @@ -421,7 +421,7 @@ private: AlignedVector> local_diagonal_vector( phi.dofs_per_cell); - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { phi.reinit(face); diff --git a/tests/matrix_free/multigrid_dg_sip_01.cc b/tests/matrix_free/multigrid_dg_sip_01.cc index 02645f72ef..f3ae6632ab 100644 --- a/tests/matrix_free/multigrid_dg_sip_01.cc +++ b/tests/matrix_free/multigrid_dg_sip_01.cc @@ -206,7 +206,7 @@ private: FEFaceEvaluation fe_eval(data, true); FEFaceEvaluation fe_eval_neighbor(data, false); - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { fe_eval.reinit(face); fe_eval_neighbor.reinit(face); @@ -253,7 +253,7 @@ private: const std::pair & face_range) const { FEFaceEvaluation fe_eval(data, true); - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { fe_eval.reinit(face); fe_eval.read_dof_values(src); @@ -340,7 +340,7 @@ private: AlignedVector> local_diagonal_vector( phi.dofs_per_cell); - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { phi.reinit(face); phi_outer.reinit(face); @@ -428,7 +428,7 @@ private: AlignedVector> local_diagonal_vector( phi.dofs_per_cell); - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { phi.reinit(face); diff --git a/tests/matrix_free/multigrid_dg_sip_02.cc b/tests/matrix_free/multigrid_dg_sip_02.cc index 943b02d212..8f610c4509 100644 --- a/tests/matrix_free/multigrid_dg_sip_02.cc +++ b/tests/matrix_free/multigrid_dg_sip_02.cc @@ -209,7 +209,7 @@ private: FEFaceEvaluation fe_eval(data, true); FEFaceEvaluation fe_eval_neighbor(data, false); - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { fe_eval.reinit(face); fe_eval_neighbor.reinit(face); @@ -256,7 +256,7 @@ private: const std::pair & face_range) const { FEFaceEvaluation fe_eval(data, true); - for (unsigned int face = face_range.first; face < face_range.second; face++) + for (unsigned int face = face_range.first; face < face_range.second; ++face) { fe_eval.reinit(face); fe_eval.read_dof_values(src); diff --git a/tests/matrix_free/partitioner_01.cc b/tests/matrix_free/partitioner_01.cc index 5bb7994521..de2bb281fa 100644 --- a/tests/matrix_free/partitioner_01.cc +++ b/tests/matrix_free/partitioner_01.cc @@ -99,7 +99,7 @@ private: Point p1, p2; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) p2[d] = 1.0; GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2); @@ -137,7 +137,7 @@ private: matrix_free.initialize_dof_vector(src); matrix_free.initialize_dof_vector(dst); - for (unsigned int i = 0; i < Utilities::pow(fe_degree + 1, dim); i++) + for (unsigned int i = 0; i < Utilities::pow(fe_degree + 1, dim); ++i) src.begin()[i] = Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) + 1; matrix_free.loop(&Test::dummy_operation_1, @@ -155,7 +155,7 @@ private: i < 2 * Utilities::pow(fe_degree + 1, dim); i++) dst.begin()[i] = 0; - for (unsigned int i = 0; i < 2 * Utilities::pow(fe_degree + 1, dim); i++) + for (unsigned int i = 0; i < 2 * Utilities::pow(fe_degree + 1, dim); ++i) deallog << static_cast(dst[i]) << " "; deallog << std::endl << std::endl; } @@ -167,7 +167,7 @@ private: const std::pair &) const { deallog << "src:" << std::endl; - for (unsigned int i = 0; i < 2 * Utilities::pow(fe_degree + 1, dim); i++) + for (unsigned int i = 0; i < 2 * Utilities::pow(fe_degree + 1, dim); ++i) deallog << static_cast(src[i]) << " "; deallog << std::endl; diff --git a/tests/matrix_free/read_cell_data_01.cc b/tests/matrix_free/read_cell_data_01.cc index 592b360d71..99ecab9b66 100644 --- a/tests/matrix_free/read_cell_data_01.cc +++ b/tests/matrix_free/read_cell_data_01.cc @@ -51,7 +51,7 @@ public: Triangulation::limit_level_difference_at_vertices); GridGenerator::hyper_cube(tria); - for (unsigned int i = 0; i < 3; i++) + for (unsigned int i = 0; i < 3; ++i) { tria.begin_active(i)->set_refine_flag(); tria.execute_coarsening_and_refinement(); @@ -109,7 +109,7 @@ private: cell_ids.resize(n_cells); FEEvaluation fe_eval(data); - for (unsigned int cell = 0; cell < n_cells; cell++) + for (unsigned int cell = 0; cell < n_cells; ++cell) { fe_eval.reinit(cell); @@ -129,7 +129,7 @@ private: const std::pair &pair) const { FEEvaluation fe_eval(data); - for (auto cell = pair.first; cell < pair.second; cell++) + for (auto cell = pair.first; cell < pair.second; ++cell) { fe_eval.reinit(cell); const auto cell_data = fe_eval.read_cell_data(cell_ids); @@ -148,7 +148,7 @@ private: { FEFaceEvaluation fe_eval_m(data, true); FEFaceEvaluation fe_eval_p(data, false); - for (auto face = pair.first; face < pair.second; face++) + for (auto face = pair.first; face < pair.second; ++face) { fe_eval_m.reinit(face); fe_eval_p.reinit(face); @@ -175,7 +175,7 @@ private: const std::pair &pair) const { FEFaceEvaluation fe_eval(data, true); - for (auto face = pair.first; face < pair.second; face++) + for (auto face = pair.first; face < pair.second; ++face) { fe_eval.reinit(face); const auto cell_data = fe_eval.read_cell_data(cell_ids); diff --git a/tests/matrix_free/read_cell_data_02.cc b/tests/matrix_free/read_cell_data_02.cc index d7b9355b29..e281f25a61 100644 --- a/tests/matrix_free/read_cell_data_02.cc +++ b/tests/matrix_free/read_cell_data_02.cc @@ -94,7 +94,7 @@ private: unsigned int n_cells = data.n_cell_batches() + data.n_ghost_cell_batches(); cell_ids.resize(n_cells); - for (unsigned int cell = 0; cell < n_cells; cell++) + for (unsigned int cell = 0; cell < n_cells; ++cell) for (auto lane = 0u; lane < data.n_active_entries_per_cell_batch(cell); lane++) cell_ids[cell][lane] = data.get_cell_iterator(cell, lane)->id(); @@ -110,7 +110,7 @@ private: FEFaceEvaluation fe_eval_m(data, true); FEFaceEvaluation fe_eval_p(data, false); - for (auto cell = pair.first; cell < pair.second; cell++) + for (auto cell = pair.first; cell < pair.second; ++cell) { for (auto lane = 0u; lane < data.n_active_entries_per_cell_batch(cell); lane++) diff --git a/tests/mpi/compute_index_owner_01.cc b/tests/mpi/compute_index_owner_01.cc index 1e64b50d31..9af835276c 100644 --- a/tests/mpi/compute_index_owner_01.cc +++ b/tests/mpi/compute_index_owner_01.cc @@ -86,7 +86,7 @@ test() Utilities::MPI::Partitioner v(local_owned, local_relevant, comm); for (unsigned int i = 0; i < v.ghost_targets().size(); ++i) - for (unsigned int j = 0; j < v.ghost_targets()[i].second; j++) + for (unsigned int j = 0; j < v.ghost_targets()[i].second; ++j) deallog << v.ghost_targets()[i].first << std::endl; } } diff --git a/tests/mpi/crash_04.cc b/tests/mpi/crash_04.cc index a1817be917..aa13e0eb09 100644 --- a/tests/mpi/crash_04.cc +++ b/tests/mpi/crash_04.cc @@ -63,7 +63,7 @@ test() ++it; ++it; it = triangulation.begin(1); - for (unsigned int a = 0; a < 4; a++) + for (unsigned int a = 0; a < 4; ++a) it->child(a)->set_coarsen_flag(); triangulation.prepare_coarsening_and_refinement(); diff --git a/tests/mpi/has_hanging_nodes.cc b/tests/mpi/has_hanging_nodes.cc index 845e9f4e03..07ea9f3cc2 100644 --- a/tests/mpi/has_hanging_nodes.cc +++ b/tests/mpi/has_hanging_nodes.cc @@ -105,7 +105,7 @@ test_int(const unsigned int n_global = 0, const unsigned int n_local = 0) tria_distrib.refine_global(n_global); tria_sequential.refine_global(n_global); - for (unsigned int i = 0; i < n_local; i++) + for (unsigned int i = 0; i < n_local; ++i) { // refine both the distributed and the sequential triangulation. the // following relies on the fact that the first cell of the "global" diff --git a/tests/mpi/muelu_periodicity.cc b/tests/mpi/muelu_periodicity.cc index bf59f64eec..536b31cb9f 100644 --- a/tests/mpi/muelu_periodicity.cc +++ b/tests/mpi/muelu_periodicity.cc @@ -617,10 +617,10 @@ namespace Step22 StokesProblem<2>::check_periodicity(const unsigned int cycle) const { unsigned int n_points = 4; - for (unsigned int i = 0; i < cycle; i++) + for (unsigned int i = 0; i < cycle; ++i) n_points *= 2; - for (unsigned int i = 1; i < n_points; i++) + for (unsigned int i = 1; i < n_points; ++i) { Vector value1(3); Vector value2(3); diff --git a/tests/mpi/parallel_partitioner_08.cc b/tests/mpi/parallel_partitioner_08.cc index 4ea64c7a9d..bad8064f93 100644 --- a/tests/mpi/parallel_partitioner_08.cc +++ b/tests/mpi/parallel_partitioner_08.cc @@ -83,7 +83,7 @@ test() ghost[i] = 0.; if (rank == 0) - for (int i = 0; i < 8; i++) + for (int i = 0; i < 8; ++i) owned[i] = i; // update ghost values diff --git a/tests/mpi/parallel_vector_03a.cc b/tests/mpi/parallel_vector_03a.cc index 4977383efa..dedc4d6de6 100644 --- a/tests/mpi/parallel_vector_03a.cc +++ b/tests/mpi/parallel_vector_03a.cc @@ -85,7 +85,7 @@ test() v = 0.; // set local values - for (unsigned int i = 0; i < local_nonzero.n_elements(); i++) + for (unsigned int i = 0; i < local_nonzero.n_elements(); ++i) v(local_nonzero.nth_index_in_set(i)) = local_nonzero.nth_index_in_set(i); // set value from processor which does not own it: diff --git a/tests/mpi/parallel_vector_24.cc b/tests/mpi/parallel_vector_24.cc index 2b2c7a815d..ee9ddfb719 100644 --- a/tests/mpi/parallel_vector_24.cc +++ b/tests/mpi/parallel_vector_24.cc @@ -87,7 +87,7 @@ test() v = 0.; // set local values - for (unsigned int i = 0; i < local_nonzero.n_elements(); i++) + for (unsigned int i = 0; i < local_nonzero.n_elements(); ++i) v(local_nonzero.nth_index_in_set(i)) = local_nonzero.nth_index_in_set(i); // set value from processor which does not own it: diff --git a/tests/mpi/periodicity_01.cc b/tests/mpi/periodicity_01.cc index 41672c0352..352ae2caee 100644 --- a/tests/mpi/periodicity_01.cc +++ b/tests/mpi/periodicity_01.cc @@ -361,14 +361,14 @@ namespace Step40 LaplaceProblem<2>::check_periodicity(const unsigned int cycle) const { unsigned int n_points = 2; - for (unsigned int i = 0; i < cycle; i++) + for (unsigned int i = 0; i < cycle; ++i) n_points *= 2; // don't test exactly at the support points, since point_value is not stable // there const double eps = 1. / (16. * n_points); - for (unsigned int i = 1; i < n_points; i++) + for (unsigned int i = 1; i < n_points; ++i) { Vector value1(1); Vector value2(1); @@ -407,15 +407,15 @@ namespace Step40 LaplaceProblem<3>::check_periodicity(const unsigned int cycle) const { unsigned int n_points = 2; - for (unsigned int i = 0; i < cycle; i++) + for (unsigned int i = 0; i < cycle; ++i) n_points *= 2; // don't test exactly at the support points, since point_value is not stable // there const double eps = 1. / (16. * n_points); - for (unsigned int i = 1; i < n_points; i++) - for (unsigned int j = 1; j < n_points; j++) + for (unsigned int i = 1; i < n_points; ++i) + for (unsigned int j = 1; j < n_points; ++j) { Vector value1(1); Vector value2(1); diff --git a/tests/mpi/periodicity_02.cc b/tests/mpi/periodicity_02.cc index 491810684c..fc2020280c 100644 --- a/tests/mpi/periodicity_02.cc +++ b/tests/mpi/periodicity_02.cc @@ -631,14 +631,14 @@ namespace Step22 StokesProblem<2>::check_periodicity(const unsigned int cycle) const { unsigned int n_points = 4; - for (unsigned int i = 0; i < cycle; i++) + for (unsigned int i = 0; i < cycle; ++i) n_points *= 2; // don't test exactly at the support points, since point_value is not stable // there const double eps = 1. / (16. * n_points); - for (unsigned int i = 1; i < n_points; i++) + for (unsigned int i = 1; i < n_points; ++i) { Vector value1(3); Vector value2(3); diff --git a/tests/mpi/periodicity_06.cc b/tests/mpi/periodicity_06.cc index 7752bdce94..2df0738896 100644 --- a/tests/mpi/periodicity_06.cc +++ b/tests/mpi/periodicity_06.cc @@ -119,7 +119,7 @@ test(const unsigned numRefinementLevels = 2) corner[d] = -L; MappingQ1 mapping; - for (unsigned int ilevel = 0; ilevel < numRefinementLevels; ilevel++) + for (unsigned int ilevel = 0; ilevel < numRefinementLevels; ++ilevel) { // pick an corner cell and refine for (auto &cell : triangulation.active_cell_iterators()) diff --git a/tests/mpi/periodicity_07.cc b/tests/mpi/periodicity_07.cc index 47fe609db7..0d513be067 100644 --- a/tests/mpi/periodicity_07.cc +++ b/tests/mpi/periodicity_07.cc @@ -92,7 +92,7 @@ test(const unsigned numRefinementLevels = 2) corner[d] = -L; MappingQ1 mapping; - for (unsigned int ilevel = 0; ilevel < numRefinementLevels; ilevel++) + for (unsigned int ilevel = 0; ilevel < numRefinementLevels; ++ilevel) { // pick an corner cell and refine for (auto &cell : triangulation.active_cell_iterators()) diff --git a/tests/mpi/petsc_step-27.cc b/tests/mpi/petsc_step-27.cc index 8a0638321e..ef5e181ce4 100644 --- a/tests/mpi/petsc_step-27.cc +++ b/tests/mpi/petsc_step-27.cc @@ -158,7 +158,7 @@ namespace Step27 resize(Table &coeff, const unsigned int N) { TableIndices size; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) size[d] = N; coeff.reinit(size); } @@ -183,7 +183,7 @@ namespace Step27 QGauss<1> base_quadrature(2); QIterated quadrature(base_quadrature, max_degree); - for (unsigned int i = 0; i < fe_collection.size(); i++) + for (unsigned int i = 0; i < fe_collection.size(); ++i) fourier_q_collection.push_back(quadrature); const std::vector n_coefficients_per_direction( diff --git a/tests/mpi/point_value_01.cc b/tests/mpi/point_value_01.cc index 143bd9f1a7..f38483f776 100644 --- a/tests/mpi/point_value_01.cc +++ b/tests/mpi/point_value_01.cc @@ -67,10 +67,10 @@ test() std::vector> points; - for (int i = 0; i < 2; i++) - for (int j = 0; j < 2; j++) + for (int i = 0; i < 2; ++i) + for (int j = 0; j < 2; ++j) if (dim == 3) - for (int k = 0; k < 2; k++) + for (int k = 0; k < 2; ++k) points.push_back( Point(.25 + .5 * i, .25 + .5 * j, .25 + .5 * k)); else @@ -82,7 +82,7 @@ test() Vector value(1); - for (; point_iterator != points_end; point_iterator++) + for (; point_iterator != points_end; ++point_iterator) { try { diff --git a/tests/mpi/trilinos_step-27.cc b/tests/mpi/trilinos_step-27.cc index bdfec75770..0c742e3505 100644 --- a/tests/mpi/trilinos_step-27.cc +++ b/tests/mpi/trilinos_step-27.cc @@ -158,7 +158,7 @@ namespace Step27 resize(Table &coeff, const unsigned int N) { TableIndices size; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) size[d] = N; coeff.reinit(size); } @@ -183,7 +183,7 @@ namespace Step27 QGauss<1> base_quadrature(2); QIterated quadrature(base_quadrature, max_degree); - for (unsigned int i = 0; i < fe_collection.size(); i++) + for (unsigned int i = 0; i < fe_collection.size(); ++i) fourier_q_collection.push_back(quadrature); const std::vector n_coefficients_per_direction( diff --git a/tests/multigrid-global-coarsening/create_geometric_coarsening_sequence_01.cc b/tests/multigrid-global-coarsening/create_geometric_coarsening_sequence_01.cc index a8742734c1..2625bdda23 100644 --- a/tests/multigrid-global-coarsening/create_geometric_coarsening_sequence_01.cc +++ b/tests/multigrid-global-coarsening/create_geometric_coarsening_sequence_01.cc @@ -38,13 +38,13 @@ test() tria.refine_global(1); // refine cells in the first quadrant - for (unsigned int i = 1; i < 3; i++) + for (unsigned int i = 1; i < 3; ++i) { for (auto cell : tria.active_cell_iterators()) if (cell->is_locally_owned()) { bool flag = true; - for (int d = 0; d < dim; d++) + for (int d = 0; d < dim; ++d) if (cell->center()[d] > 0.0) flag = false; if (flag) diff --git a/tests/multigrid-global-coarsening/create_polynomial_coarsening_sequence_01.cc b/tests/multigrid-global-coarsening/create_polynomial_coarsening_sequence_01.cc index 60289e4161..c3331551bb 100644 --- a/tests/multigrid-global-coarsening/create_polynomial_coarsening_sequence_01.cc +++ b/tests/multigrid-global-coarsening/create_polynomial_coarsening_sequence_01.cc @@ -25,7 +25,7 @@ void test( const MGTransferGlobalCoarseningTools::PolynomialCoarseningSequenceType type) { - for (unsigned int i = 1; i <= 15; i++) + for (unsigned int i = 1; i <= 15; ++i) { const auto sequence = MGTransferGlobalCoarseningTools::create_polynomial_coarsening_sequence( diff --git a/tests/multigrid-global-coarsening/mg_transfer_a_01.cc b/tests/multigrid-global-coarsening/mg_transfer_a_01.cc index 5d0a2a4857..940025b38c 100644 --- a/tests/multigrid-global-coarsening/mg_transfer_a_01.cc +++ b/tests/multigrid-global-coarsening/mg_transfer_a_01.cc @@ -149,6 +149,6 @@ main(int argc, char **argv) deallog.precision(8); - for (unsigned int i = 1; i < 5; i++) + for (unsigned int i = 1; i < 5; ++i) test<2, double>(i); } diff --git a/tests/multigrid-global-coarsening/mg_transfer_a_03.cc b/tests/multigrid-global-coarsening/mg_transfer_a_03.cc index 230c2ef27f..9eff216d09 100644 --- a/tests/multigrid-global-coarsening/mg_transfer_a_03.cc +++ b/tests/multigrid-global-coarsening/mg_transfer_a_03.cc @@ -144,6 +144,6 @@ main(int argc, char **argv) deallog.precision(8); - for (unsigned int i = 1; i < 5; i++) + for (unsigned int i = 1; i < 5; ++i) test<2, double>(i); } diff --git a/tests/multigrid-global-coarsening/mg_transfer_p_01.cc b/tests/multigrid-global-coarsening/mg_transfer_p_01.cc index ada0702cfe..a73ddaaeb0 100644 --- a/tests/multigrid-global-coarsening/mg_transfer_p_01.cc +++ b/tests/multigrid-global-coarsening/mg_transfer_p_01.cc @@ -137,7 +137,7 @@ main(int argc, char **argv) deallog.precision(8); - for (unsigned int fe_degree_fine = 1; fe_degree_fine <= 5; fe_degree_fine++) + for (unsigned int fe_degree_fine = 1; fe_degree_fine <= 5; ++fe_degree_fine) for (unsigned int fe_degree_coarse = 1; fe_degree_coarse <= fe_degree_fine; fe_degree_coarse++) test<2, double>(fe_degree_fine, fe_degree_coarse); diff --git a/tests/multigrid-global-coarsening/mg_transfer_p_02.cc b/tests/multigrid-global-coarsening/mg_transfer_p_02.cc index 0acd948bfc..6849baabb4 100644 --- a/tests/multigrid-global-coarsening/mg_transfer_p_02.cc +++ b/tests/multigrid-global-coarsening/mg_transfer_p_02.cc @@ -79,7 +79,7 @@ do_test() // loop over levels - for (unsigned int l = 0; l < std::numeric_limits::max(); l++) + for (unsigned int l = 0; l < std::numeric_limits::max(); ++l) { deallog.push("level" + std::to_string(l)); diff --git a/tests/multigrid-global-coarsening/mg_transfer_p_04.cc b/tests/multigrid-global-coarsening/mg_transfer_p_04.cc index 1dda8054fd..cd64d30176 100644 --- a/tests/multigrid-global-coarsening/mg_transfer_p_04.cc +++ b/tests/multigrid-global-coarsening/mg_transfer_p_04.cc @@ -165,7 +165,7 @@ main(int argc, char **argv) deallog.precision(8); - for (unsigned int fe_degree_fine = 1; fe_degree_fine <= 5; fe_degree_fine++) + for (unsigned int fe_degree_fine = 1; fe_degree_fine <= 5; ++fe_degree_fine) for (unsigned int fe_degree_coarse = 1; fe_degree_coarse <= fe_degree_fine; fe_degree_coarse++) test<2, double>(fe_degree_fine, fe_degree_coarse); diff --git a/tests/multigrid-global-coarsening/mg_transfer_p_05.cc b/tests/multigrid-global-coarsening/mg_transfer_p_05.cc index 60acdc1a7c..d245fa0205 100644 --- a/tests/multigrid-global-coarsening/mg_transfer_p_05.cc +++ b/tests/multigrid-global-coarsening/mg_transfer_p_05.cc @@ -153,7 +153,7 @@ main(int argc, char **argv) deallog.precision(8); - for (unsigned int fe_degree_fine = 1; fe_degree_fine <= 5; fe_degree_fine++) + for (unsigned int fe_degree_fine = 1; fe_degree_fine <= 5; ++fe_degree_fine) for (unsigned int fe_degree_coarse = 1; fe_degree_coarse <= fe_degree_fine; fe_degree_coarse++) test<2, double>(fe_degree_fine, fe_degree_coarse); diff --git a/tests/multigrid-global-coarsening/mg_transfer_support_01.cc b/tests/multigrid-global-coarsening/mg_transfer_support_01.cc index f6e80d750a..0db7f8ac37 100644 --- a/tests/multigrid-global-coarsening/mg_transfer_support_01.cc +++ b/tests/multigrid-global-coarsening/mg_transfer_support_01.cc @@ -24,9 +24,9 @@ using namespace dealii; void test() { - for (unsigned int i = 1; i < 25; i++) + for (unsigned int i = 1; i < 25; ++i) { - for (unsigned int j = 1; j < 25; j++) + for (unsigned int j = 1; j < 25; ++j) if (MGTwoLevelTransfer<2, LinearAlgebra::distributed::Vector>:: fast_polynomial_transfer_supported(i, j)) deallog << 1 << " "; diff --git a/tests/multigrid-global-coarsening/mg_transfer_util.h b/tests/multigrid-global-coarsening/mg_transfer_util.h index 162541d3d3..f9280925f2 100644 --- a/tests/multigrid-global-coarsening/mg_transfer_util.h +++ b/tests/multigrid-global-coarsening/mg_transfer_util.h @@ -109,7 +109,7 @@ test_transfer_operator( if (Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD) == 1 && false) { FullMatrix prolongation_matrix(dst.size(), src.size()); - for (unsigned int i = 0; i < src.size(); i++) + for (unsigned int i = 0; i < src.size(); ++i) { src = 0.0; src[i] = 1.0; @@ -117,7 +117,7 @@ test_transfer_operator( transfer.prolongate_and_add(dst, src); - for (unsigned int j = 0; j < dst.size(); j++) + for (unsigned int j = 0; j < dst.size(); ++j) prolongation_matrix[j][i] = dst[j]; } @@ -149,7 +149,7 @@ test_transfer_operator( if (Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD) == 1 && false) { FullMatrix restriction_matrix(src.size(), dst.size()); - for (unsigned int i = 0; i < dst.size(); i++) + for (unsigned int i = 0; i < dst.size(); ++i) { dst = 0.0; dst[i] = 1.0; @@ -157,7 +157,7 @@ test_transfer_operator( transfer.restrict_and_add(src, dst); - for (unsigned int j = 0; j < src.size(); j++) + for (unsigned int j = 0; j < src.size(); ++j) restriction_matrix[j][i] = src[j]; } diff --git a/tests/multigrid-global-coarsening/multigrid_p_01.cc b/tests/multigrid-global-coarsening/multigrid_p_01.cc index 044374f6eb..3a86150a4f 100644 --- a/tests/multigrid-global-coarsening/multigrid_p_01.cc +++ b/tests/multigrid-global-coarsening/multigrid_p_01.cc @@ -42,13 +42,13 @@ test(const unsigned int n_refinements, } else if (mesh_type == 1) { - for (unsigned int i = 1; i < n_refinements; i++) + for (unsigned int i = 1; i < n_refinements; ++i) { for (auto cell : tria.active_cell_iterators()) if (cell->is_locally_owned()) { bool flag = true; - for (int d = 0; d < dim; d++) + for (int d = 0; d < dim; ++d) if (cell->center()[d] > 0.5) flag = false; if (flag) diff --git a/tests/multigrid-global-coarsening/multigrid_util.h b/tests/multigrid-global-coarsening/multigrid_util.h index a4168d07da..e70980ae21 100644 --- a/tests/multigrid-global-coarsening/multigrid_util.h +++ b/tests/multigrid-global-coarsening/multigrid_util.h @@ -302,7 +302,7 @@ mg_solve(SolverControl & solver_control, MGLevelObject smoother_data(min_level, max_level); - for (unsigned int level = min_level; level <= max_level; level++) + for (unsigned int level = min_level; level <= max_level; ++level) { smoother_data[level].preconditioner = std::make_shared(); diff --git a/tests/multigrid/renumbering_06.cc b/tests/multigrid/renumbering_06.cc index 61e2e8dae0..b5e110a7da 100644 --- a/tests/multigrid/renumbering_06.cc +++ b/tests/multigrid/renumbering_06.cc @@ -100,7 +100,7 @@ check() dealii::DoFRenumbering::component_wise(dofhandler); deallog << "Finished fine lvl renumbering" << std::endl; - for (unsigned int lvl = 0; lvl < tria.n_global_levels(); lvl++) + for (unsigned int lvl = 0; lvl < tria.n_global_levels(); ++lvl) { dealii::DoFRenumbering::component_wise(dofhandler, lvl); deallog << "Finished renumbering on lvl " << lvl << std::endl; @@ -117,7 +117,7 @@ check() dealii::DoFRenumbering::block_wise(dofhandler); deallog << "Finished fine lvl renumbering" << std::endl; - for (unsigned int lvl = 0; lvl < tria.n_global_levels(); lvl++) + for (unsigned int lvl = 0; lvl < tria.n_global_levels(); ++lvl) { dealii::DoFRenumbering::block_wise(dofhandler, lvl); deallog << "Finished renumbering on lvl " << lvl << std::endl; diff --git a/tests/multigrid/renumbering_07.cc b/tests/multigrid/renumbering_07.cc index 591eba8bef..83e5ec1606 100644 --- a/tests/multigrid/renumbering_07.cc +++ b/tests/multigrid/renumbering_07.cc @@ -98,7 +98,7 @@ check() dealii::DoFRenumbering::component_wise(dofhandler); deallog << "Finished fine lvl renumbering" << std::endl; - for (unsigned int lvl = 0; lvl < tria.n_global_levels(); lvl++) + for (unsigned int lvl = 0; lvl < tria.n_global_levels(); ++lvl) { dealii::DoFRenumbering::component_wise(dofhandler, lvl); deallog << "Finished renumbering on lvl " << lvl << std::endl; diff --git a/tests/non_matching/face_quadrature_generator.cc b/tests/non_matching/face_quadrature_generator.cc index c9e8824441..4c0964ee7a 100644 --- a/tests/non_matching/face_quadrature_generator.cc +++ b/tests/non_matching/face_quadrature_generator.cc @@ -88,7 +88,7 @@ test_plane_cuts_through_center() const Functions::LevelSet::Plane levelset(center, normal); // Test all faces that are intersected by the plane. - for (unsigned int f = 0; f < GeometryInfo::faces_per_cell; f++) + for (unsigned int f = 0; f < GeometryInfo::faces_per_cell; ++f) { const int normal_direction = GeometryInfo::unit_normal_direction[f]; diff --git a/tests/non_matching/find_best_height_direction.cc b/tests/non_matching/find_best_height_direction.cc index 109f221ea4..1edccd1fec 100644 --- a/tests/non_matching/find_best_height_direction.cc +++ b/tests/non_matching/find_best_height_direction.cc @@ -74,7 +74,7 @@ test_find_best_height_direction() std::vector> bounds(2); // Set up so that the bounds correspond to indefinite functions. - for (unsigned int i = 0; i < bounds.size(); i++) + for (unsigned int i = 0; i < bounds.size(); ++i) { bounds[i].value.first = -1; bounds[i].value.second = 1; diff --git a/tests/non_matching/quadrature_printing.h b/tests/non_matching/quadrature_printing.h index 827d745776..0b53ef30d8 100644 --- a/tests/non_matching/quadrature_printing.h +++ b/tests/non_matching/quadrature_printing.h @@ -34,7 +34,7 @@ print_quadrature(const Quadrature &quadrature) for (unsigned int i = 0; i < quadrature.size(); ++i) { const Point &point = quadrature.point(i); - for (int d = 0; d < dim; d++) + for (int d = 0; d < dim; ++d) deallog << point[d] << ", "; deallog << quadrature.weight(i) << std::endl; @@ -55,13 +55,13 @@ print_surface_quadrature( for (unsigned int i = 0; i < quadrature.size(); ++i) { const Point &point = quadrature.point(i); - for (int d = 0; d < dim; d++) + for (int d = 0; d < dim; ++d) deallog << point[d] << ", "; deallog << quadrature.weight(i); const Tensor<1, spacedim> &normal = quadrature.normal_vector(i); - for (int d = 0; d < spacedim; d++) + for (int d = 0; d < spacedim; ++d) deallog << ", " << normal[d]; deallog << std::endl; } diff --git a/tests/non_matching/root_finder.cc b/tests/non_matching/root_finder.cc index 5b1f98cda0..850dfb6f5c 100644 --- a/tests/non_matching/root_finder.cc +++ b/tests/non_matching/root_finder.cc @@ -44,7 +44,7 @@ find_and_print_roots( RootFinder root_finder; root_finder.find_roots(functions, interval, roots); - for (unsigned int i = 0; i < roots.size(); i++) + for (unsigned int i = 0; i < roots.size(); ++i) { deallog << roots[i]; if (i < roots.size() - 1) diff --git a/tests/numerics/error_estimator_02.cc b/tests/numerics/error_estimator_02.cc index 754f707680..23eb2344d8 100644 --- a/tests/numerics/error_estimator_02.cc +++ b/tests/numerics/error_estimator_02.cc @@ -293,7 +293,7 @@ test_neumann(const NeumanBC &func) values = 0.0; dealii::deallog << "dof values:" << std::endl; - for (unsigned int i = 0; i < values.size(); i++) + for (unsigned int i = 0; i < values.size(); ++i) dealii::deallog << " " << values[i]; dealii::deallog << std::endl; @@ -316,7 +316,7 @@ test_neumann(const NeumanBC &func) dealii::KellyErrorEstimator::face_diameter_over_twice_max_degree); dealii::deallog << "error:" << std::endl; - for (unsigned int i = 0; i < error.size(); i++) + for (unsigned int i = 0; i < error.size(); ++i) dealii::deallog << " " << error[i]; dealii::deallog << std::endl; @@ -359,7 +359,7 @@ test_regular(const MyFunction &func) p_degree.push_back(p1); p_degree.push_back(p2); - for (unsigned int i = 0; i < p_degree.size(); i++) + for (unsigned int i = 0; i < p_degree.size(); ++i) { const unsigned int &p = p_degree[i]; fe_collection.push_back( @@ -376,7 +376,7 @@ test_regular(const MyFunction &func) repetitions[0] = 2; dealii::Point p1; dealii::Point p2; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) { p1[d] = 0.0; p2[d] = L; @@ -390,7 +390,7 @@ test_regular(const MyFunction &func) typename dealii::DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) if (cell->center()[0] > 1.0) { cell->set_active_fe_index(1); @@ -410,7 +410,7 @@ test_regular(const MyFunction &func) dealii::VectorTools::interpolate(dof_handler, func, values); dealii::deallog << "dof values:" << std::endl; - for (unsigned int i = 0; i < values.size(); i++) + for (unsigned int i = 0; i < values.size(); ++i) dealii::deallog << " " << values[i]; dealii::deallog << std::endl; @@ -430,7 +430,7 @@ test_regular(const MyFunction &func) dealii::KellyErrorEstimator::face_diameter_over_twice_max_degree); dealii::deallog << "error:" << std::endl; - for (unsigned int i = 0; i < error.size(); i++) + for (unsigned int i = 0; i < error.size(); ++i) dealii::deallog << " " << error[i]; dealii::deallog << std::endl; @@ -446,7 +446,7 @@ test_regular(const MyFunction &func) h * A * std::pow(func.get_k(), 2) / 2.0 / std::max(p1, p2); dealii::deallog << "expected:" << std::endl << " " << std::sqrt(expected_value_squared) << std::endl; - for (unsigned int i = 0; i < error.size(); i++) + for (unsigned int i = 0; i < error.size(); ++i) AssertThrow(std::fabs(std::sqrt(expected_value_squared) - error[i]) < 1e-6, dealii::ExcInternalError()); @@ -476,7 +476,7 @@ test_irregular(const MyFunction &func) p_degree.push_back(p2); p_degree.push_back(p3); - for (unsigned int i = 0; i < p_degree.size(); i++) + for (unsigned int i = 0; i < p_degree.size(); ++i) { const unsigned int &p = p_degree[i]; fe_collection.push_back( @@ -493,7 +493,7 @@ test_irregular(const MyFunction &func) repetitions[0] = 2; dealii::Point p1; dealii::Point p2; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) { p1[d] = 0.0; p2[d] = L; @@ -514,7 +514,7 @@ test_irregular(const MyFunction &func) typename dealii::DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) if (cell->center()[0] > 1.0) // right { cell->set_active_fe_index(0); @@ -541,7 +541,7 @@ test_irregular(const MyFunction &func) dealii::VectorTools::interpolate(dof_handler, func, values); dealii::deallog << "dof values:" << std::endl; - for (unsigned int i = 0; i < values.size(); i++) + for (unsigned int i = 0; i < values.size(); ++i) dealii::deallog << " " << values[i]; dealii::deallog << std::endl; @@ -561,7 +561,7 @@ test_irregular(const MyFunction &func) dealii::KellyErrorEstimator::face_diameter_over_twice_max_degree); dealii::deallog << "error:" << std::endl; - for (unsigned int i = 0; i < error.size(); i++) + for (unsigned int i = 0; i < error.size(); ++i) dealii::deallog << " " << error[i]; dealii::deallog << std::endl; @@ -595,11 +595,11 @@ test_irregular(const MyFunction &func) } dealii::deallog << "expected:" << std::endl; - for (unsigned int i = 0; i < expected_error.size(); i++) + for (unsigned int i = 0; i < expected_error.size(); ++i) deallog << " " << expected_error[i]; deallog << std::endl; - for (unsigned int i = 0; i < expected_error.size(); i++) + for (unsigned int i = 0; i < expected_error.size(); ++i) AssertThrow(std::fabs(expected_error[i] - error[i]) < 1e-6, dealii::ExcInternalError()); @@ -649,7 +649,7 @@ test(const MySecondFunction &func) dealii::hp::QCollection quadrature_formula; dealii::hp::QCollection face_quadrature_formula; dealii::AffineConstraints constraints; - for (unsigned int p = 1; p <= 3; p++) + for (unsigned int p = 1; p <= 3; ++p) { fe_collection.push_back( dealii::FE_Q(QIterated<1>(QTrapezoid<1>(), p))); @@ -669,10 +669,10 @@ test(const MySecondFunction &func) typename dealii::DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) { bool in_top_left = true; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) in_top_left = in_top_left && (cell->center()[d] < 0.5); if (in_top_left) @@ -689,7 +689,7 @@ test(const MySecondFunction &func) cell = dof_handler.begin_active(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) { if (cell->center()[0] < 0.25) { @@ -711,7 +711,7 @@ test(const MySecondFunction &func) dealii::VectorTools::interpolate(dof_handler, func, values); dealii::deallog << "dof values:" << std::endl; - for (unsigned int i = 0; i < values.size(); i++) + for (unsigned int i = 0; i < values.size(); ++i) dealii::deallog << " " << values[i]; dealii::deallog << std::endl; @@ -731,7 +731,7 @@ test(const MySecondFunction &func) dealii::KellyErrorEstimator::face_diameter_over_twice_max_degree); dealii::deallog << "error:" << std::endl; - for (unsigned int i = 0; i < error.size(); i++) + for (unsigned int i = 0; i < error.size(); ++i) dealii::deallog << " " << error[i]; dealii::deallog << std::endl; diff --git a/tests/numerics/error_estimator_02_complex.cc b/tests/numerics/error_estimator_02_complex.cc index d725259ecc..88bdc2f7c7 100644 --- a/tests/numerics/error_estimator_02_complex.cc +++ b/tests/numerics/error_estimator_02_complex.cc @@ -237,7 +237,7 @@ test_neumann(const NeumanBC &func) dealii::Vector> values(dof_handler.n_dofs()); dealii::deallog << "dof values:" << std::endl; - for (unsigned int i = 0; i < values.size(); i++) + for (unsigned int i = 0; i < values.size(); ++i) dealii::deallog << " " << values[i]; dealii::deallog << std::endl; @@ -261,7 +261,7 @@ test_neumann(const NeumanBC &func) dealii::KellyErrorEstimator::face_diameter_over_twice_max_degree); dealii::deallog << "error:" << std::endl; - for (unsigned int i = 0; i < error.size(); i++) + for (unsigned int i = 0; i < error.size(); ++i) dealii::deallog << " " << error[i]; dealii::deallog << std::endl; @@ -304,7 +304,7 @@ test_regular(const MyFunction &func) p_degree.push_back(p1); p_degree.push_back(p2); - for (unsigned int i = 0; i < p_degree.size(); i++) + for (unsigned int i = 0; i < p_degree.size(); ++i) { const unsigned int &p = p_degree[i]; fe_collection.push_back( @@ -321,7 +321,7 @@ test_regular(const MyFunction &func) repetitions[0] = 2; dealii::Point p1; dealii::Point p2; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) { p1[d] = 0.0; p2[d] = L; @@ -335,7 +335,7 @@ test_regular(const MyFunction &func) typename dealii::DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) if (cell->center()[0] > 1.0) { cell->set_active_fe_index(1); @@ -355,7 +355,7 @@ test_regular(const MyFunction &func) dealii::VectorTools::interpolate(dof_handler, func, values); dealii::deallog << "dof values:" << std::endl; - for (unsigned int i = 0; i < values.size(); i++) + for (unsigned int i = 0; i < values.size(); ++i) dealii::deallog << " " << values[i]; dealii::deallog << std::endl; @@ -375,7 +375,7 @@ test_regular(const MyFunction &func) dealii::KellyErrorEstimator::face_diameter_over_twice_max_degree); dealii::deallog << "error:" << std::endl; - for (unsigned int i = 0; i < error.size(); i++) + for (unsigned int i = 0; i < error.size(); ++i) dealii::deallog << " " << error[i]; dealii::deallog << std::endl; @@ -391,7 +391,7 @@ test_regular(const MyFunction &func) h * A * std::pow(func.get_k(), 2) / 2.0 / std::max(p1, p2); dealii::deallog << "expected:" << std::endl << " " << std::sqrt(expected_value_squared) << std::endl; - for (unsigned int i = 0; i < error.size(); i++) + for (unsigned int i = 0; i < error.size(); ++i) AssertThrow(std::fabs(std::sqrt(expected_value_squared) - error[i]) < 1e-6, dealii::ExcInternalError()); @@ -421,7 +421,7 @@ test_irregular(const MyFunction &func) p_degree.push_back(p2); p_degree.push_back(p3); - for (unsigned int i = 0; i < p_degree.size(); i++) + for (unsigned int i = 0; i < p_degree.size(); ++i) { const unsigned int &p = p_degree[i]; fe_collection.push_back( @@ -438,7 +438,7 @@ test_irregular(const MyFunction &func) repetitions[0] = 2; dealii::Point p1; dealii::Point p2; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) { p1[d] = 0.0; p2[d] = L; @@ -459,7 +459,7 @@ test_irregular(const MyFunction &func) typename dealii::DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) if (cell->center()[0] > 1.0) // right { cell->set_active_fe_index(0); @@ -486,7 +486,7 @@ test_irregular(const MyFunction &func) dealii::VectorTools::interpolate(dof_handler, func, values); dealii::deallog << "dof values:" << std::endl; - for (unsigned int i = 0; i < values.size(); i++) + for (unsigned int i = 0; i < values.size(); ++i) dealii::deallog << " " << values[i]; dealii::deallog << std::endl; @@ -506,7 +506,7 @@ test_irregular(const MyFunction &func) dealii::KellyErrorEstimator::face_diameter_over_twice_max_degree); dealii::deallog << "error:" << std::endl; - for (unsigned int i = 0; i < error.size(); i++) + for (unsigned int i = 0; i < error.size(); ++i) dealii::deallog << " " << error[i]; dealii::deallog << std::endl; @@ -540,11 +540,11 @@ test_irregular(const MyFunction &func) } dealii::deallog << "expected:" << std::endl; - for (unsigned int i = 0; i < expected_error.size(); i++) + for (unsigned int i = 0; i < expected_error.size(); ++i) deallog << " " << expected_error[i]; deallog << std::endl; - for (unsigned int i = 0; i < expected_error.size(); i++) + for (unsigned int i = 0; i < expected_error.size(); ++i) AssertThrow(std::fabs(expected_error[i] - error[i]) < 1e-6, dealii::ExcInternalError()); @@ -596,7 +596,7 @@ test(const MySecondFunction &func) dealii::hp::QCollection quadrature_formula; dealii::hp::QCollection face_quadrature_formula; dealii::AffineConstraints constraints; - for (unsigned int p = 1; p <= 3; p++) + for (unsigned int p = 1; p <= 3; ++p) { fe_collection.push_back( dealii::FE_Q(QIterated<1>(QTrapezoid<1>(), p))); @@ -616,10 +616,10 @@ test(const MySecondFunction &func) typename dealii::DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) { bool in_top_left = true; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) in_top_left = in_top_left && (cell->center()[d] < 0.5); if (in_top_left) @@ -636,7 +636,7 @@ test(const MySecondFunction &func) cell = dof_handler.begin_active(); - for (; cell != endc; cell++) + for (; cell != endc; ++cell) { if (cell->center()[0] < 0.25) { @@ -658,7 +658,7 @@ test(const MySecondFunction &func) dealii::VectorTools::interpolate(dof_handler, func, values); dealii::deallog << "dof values:" << std::endl; - for (unsigned int i = 0; i < values.size(); i++) + for (unsigned int i = 0; i < values.size(); ++i) dealii::deallog << " " << values[i]; dealii::deallog << std::endl; @@ -678,7 +678,7 @@ test(const MySecondFunction &func) dealii::KellyErrorEstimator::face_diameter_over_twice_max_degree); dealii::deallog << "error:" << std::endl; - for (unsigned int i = 0; i < error.size(); i++) + for (unsigned int i = 0; i < error.size(); ++i) dealii::deallog << " " << error[i]; dealii::deallog << std::endl; diff --git a/tests/numerics/history.cc b/tests/numerics/history.cc index 7dabf8eaf6..102b4c0df4 100644 --- a/tests/numerics/history.cc +++ b/tests/numerics/history.cc @@ -28,54 +28,54 @@ test() deallog << "size: " << storage.size() << std::endl << "max_size: " << storage.max_size() << std::endl; - for (unsigned int i = 0; i < 2; i++) + for (unsigned int i = 0; i < 2; ++i) storage.add(0.1 * (i + 1)); // 2 elements deallog << "initial:" << std::endl; - for (unsigned int i = 0; i < storage.size(); i++) + for (unsigned int i = 0; i < storage.size(); ++i) deallog << storage[i] << std::endl; // 3 elements deallog << "append:" << std::endl; storage.add(0.555); - for (unsigned int i = 0; i < storage.size(); i++) + for (unsigned int i = 0; i < storage.size(); ++i) deallog << storage[i] << std::endl; // 2 elements: deallog << "remove second element:" << std::endl; storage.remove(1); - for (unsigned int i = 0; i < storage.size(); i++) + for (unsigned int i = 0; i < storage.size(); ++i) deallog << storage[i] << std::endl; // 2 elements: deallog << "change 0th:" << std::endl; storage[0] = 0.33; - for (unsigned int i = 0; i < storage.size(); i++) + for (unsigned int i = 0; i < storage.size(); ++i) deallog << storage[i] << std::endl; // 3 elements: deallog << "append:" << std::endl; storage.add(0.666); - for (unsigned int i = 0; i < storage.size(); i++) + for (unsigned int i = 0; i < storage.size(); ++i) deallog << storage[i] << std::endl; // 3 elements: deallog << "change 0th:" << std::endl; storage[0] = 0.22; - for (unsigned int i = 0; i < storage.size(); i++) + for (unsigned int i = 0; i < storage.size(); ++i) deallog << storage[i] << std::endl; // 3 elements: deallog << "append:" << std::endl; storage.add(0.777); - for (unsigned int i = 0; i < storage.size(); i++) + for (unsigned int i = 0; i < storage.size(); ++i) deallog << storage[i] << std::endl; // 2 elements: deallog << "remove last:" << std::endl; storage.remove(storage.size() - 1); - for (unsigned int i = 0; i < storage.size(); i++) + for (unsigned int i = 0; i < storage.size(); ++i) deallog << storage[i] << std::endl; storage.clear(); diff --git a/tests/numerics/point_value_history_01.cc b/tests/numerics/point_value_history_01.cc index e7eb708ff0..d39613e0b8 100644 --- a/tests/numerics/point_value_history_01.cc +++ b/tests/numerics/point_value_history_01.cc @@ -128,7 +128,7 @@ TestPointValueHistory::run() cell->get_dof_indices(local_dof_indices); dof_locations = fe_values.get_quadrature_points(); cell_pole = 0; - for (unsigned int dof = 0; dof != finite_element.dofs_per_cell; dof++) + for (unsigned int dof = 0; dof != finite_element.dofs_per_cell; ++dof) { unsigned int dof_component = finite_element.system_to_component_index(dof).first; diff --git a/tests/numerics/point_value_history_02.cc b/tests/numerics/point_value_history_02.cc index 580d73b13b..699291f126 100644 --- a/tests/numerics/point_value_history_02.cc +++ b/tests/numerics/point_value_history_02.cc @@ -103,7 +103,7 @@ Postprocess::evaluate_vector_field( ExcDimensionMismatch(computed_quantities.size(), inputs.solution_values.size())); - for (unsigned int i = 0; i < computed_quantities.size(); i++) + for (unsigned int i = 0; i < computed_quantities.size(); ++i) { Assert(computed_quantities[i].size() == 4, ExcDimensionMismatch(computed_quantities[i].size(), 3)); @@ -231,7 +231,7 @@ TestPointValueHistory::run() cell->get_dof_indices(local_dof_indices); dof_locations = fe_values.get_quadrature_points(); - for (unsigned int dof = 0; dof != finite_element.dofs_per_cell; dof++) + for (unsigned int dof = 0; dof != finite_element.dofs_per_cell; ++dof) { unsigned int dof_component = finite_element.system_to_component_index(dof).first; diff --git a/tests/numerics/point_value_history_03.cc b/tests/numerics/point_value_history_03.cc index c0d0631c0d..573cc7ba10 100644 --- a/tests/numerics/point_value_history_03.cc +++ b/tests/numerics/point_value_history_03.cc @@ -101,7 +101,7 @@ Postprocess::evaluate_scalar_field( ExcDimensionMismatch(computed_quantities.size(), inputs.solution_values.size())); - for (unsigned int i = 0; i < computed_quantities.size(); i++) + for (unsigned int i = 0; i < computed_quantities.size(); ++i) { Assert(computed_quantities[i].size() == 2, ExcDimensionMismatch(computed_quantities[i].size(), 2)); @@ -195,7 +195,7 @@ TestPointValueHistory::run() cell->get_dof_indices(local_dof_indices); dof_locations = fe_values.get_quadrature_points(); - for (unsigned int dof = 0; dof != finite_element.dofs_per_cell; dof++) + for (unsigned int dof = 0; dof != finite_element.dofs_per_cell; ++dof) { unsigned int dof_component = finite_element.system_to_component_index(dof).first; diff --git a/tests/numerics/project_bv_curl_conf_04.cc b/tests/numerics/project_bv_curl_conf_04.cc index 5d2c94ea1d..3808f07a03 100644 --- a/tests/numerics/project_bv_curl_conf_04.cc +++ b/tests/numerics/project_bv_curl_conf_04.cc @@ -140,7 +140,7 @@ test_boundary_values(DoFHandler & dof_handler, bool ret = true; for (unsigned int bc = 0; bc < 6; ++bc) { - for (unsigned int basis = 0; basis < dof_handler.n_dofs(); basis++) + for (unsigned int basis = 0; basis < dof_handler.n_dofs(); ++basis) { if (fabs(local_averages[bc](basis)) > 1.e-10) { @@ -208,7 +208,7 @@ main(int /*argc*/, char ** /*argv*/) bool equal = (test_vec.size() == test_vec2.size()); if (equal) { - for (unsigned int i = 0; i < test_vec.size(); i++) + for (unsigned int i = 0; i < test_vec.size(); ++i) { equal = equal && (test_vec(i) == test_vec2(i)); } @@ -264,7 +264,7 @@ main(int /*argc*/, char ** /*argv*/) bool equal = (test_vec.size() == test_vec2.size()); if (equal) { - for (unsigned int i = 0; i < test_vec.size(); i++) + for (unsigned int i = 0; i < test_vec.size(); ++i) { equal = equal && (test_vec(i) == test_vec2(i)); } diff --git a/tests/numerics/project_parallel_qp_common.h b/tests/numerics/project_parallel_qp_common.h index e72308bb3e..d325b3ad28 100644 --- a/tests/numerics/project_parallel_qp_common.h +++ b/tests/numerics/project_parallel_qp_common.h @@ -80,7 +80,7 @@ public: Point p; for (unsigned int v = 0; v < VectorizedArray::size(); ++v) { - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) p[d] = p_vec[d][v]; res[v] = value(p); } diff --git a/tests/numerics/project_parallel_qpmf_common.h b/tests/numerics/project_parallel_qpmf_common.h index a864470299..0b77ffaeba 100644 --- a/tests/numerics/project_parallel_qpmf_common.h +++ b/tests/numerics/project_parallel_qpmf_common.h @@ -82,7 +82,7 @@ public: Point p; for (unsigned int v = 0; v < VectorizedArray::size(); ++v) { - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) p[d] = p_vec[d][v]; res[v] = value(p); } diff --git a/tests/numerics/smoothness_estimator_01.cc b/tests/numerics/smoothness_estimator_01.cc index 0f6562039b..7d64bb9735 100644 --- a/tests/numerics/smoothness_estimator_01.cc +++ b/tests/numerics/smoothness_estimator_01.cc @@ -76,7 +76,7 @@ double Lh(const Point &x_q, const TableIndices &indices) { double res = 1.0; - for (unsigned int d = 0; d < dim; d++) + for (unsigned int d = 0; d < dim; ++d) { const double x = 2.0 * (x_q[d] - 0.5); Assert((x_q[d] <= 1.0) && (x_q[d] >= 0.), @@ -96,8 +96,8 @@ LegendreFunction<2>::value(const dealii::Point<2> &point, { double f = 0.0; - for (unsigned int i = 0; i < coefficients.size(0); i++) - for (unsigned int j = 0; j < coefficients.size(1); j++) + for (unsigned int i = 0; i < coefficients.size(0); ++i) + for (unsigned int j = 0; j < coefficients.size(1); ++j) f += Lh(point, TableIndices<2>(i, j)) * coefficients(i, j); return f; @@ -110,9 +110,9 @@ LegendreFunction<3>::value(const dealii::Point<3> &point, { double f = 0.0; - for (unsigned int i = 0; i < coefficients.size(0); i++) - for (unsigned int j = 0; j < coefficients.size(1); j++) - for (unsigned int k = 0; k < coefficients.size(2); k++) + for (unsigned int i = 0; i < coefficients.size(0); ++i) + for (unsigned int j = 0; j < coefficients.size(1); ++j) + for (unsigned int k = 0; k < coefficients.size(2); ++k) f += Lh(point, TableIndices<3>(i, j, k)) * coefficients(i, j, k); return f; @@ -124,8 +124,8 @@ void compare(const Table<2, double> &coeff1, const Table<2, double> &coeff2) { double linf = 0.; - for (unsigned int i = 0; i < coeff1.size(0); i++) - for (unsigned int j = 0; j < coeff1.size(1); j++) + for (unsigned int i = 0; i < coeff1.size(0); ++i) + for (unsigned int j = 0; j < coeff1.size(1); ++j) linf = std::max(linf, std::abs(coeff1(i, j) - coeff2(i, j))); deallog << "Linf norm in exact and calculate Legendre coefficients:" @@ -137,9 +137,9 @@ void compare(const Table<3, double> &coeff1, const Table<3, double> &coeff2) { double linf = 0.; - for (unsigned int i = 0; i < coeff1.size(0); i++) - for (unsigned int j = 0; j < coeff1.size(1); j++) - for (unsigned int k = 0; k < coeff1.size(2); k++) + for (unsigned int i = 0; i < coeff1.size(0); ++i) + for (unsigned int j = 0; j < coeff1.size(1); ++j) + for (unsigned int k = 0; k < coeff1.size(2); ++k) linf = std::max(linf, std::abs(coeff1(i, j, k) - coeff2(i, j, k))); deallog << "Linf norm in exact and calculate Legendre coefficients:" @@ -159,7 +159,7 @@ void resize(Table<3, double> &coeff, const unsigned int N) { TableIndices<3> size; - for (unsigned int d = 0; d < 3; d++) + for (unsigned int d = 0; d < 3; ++d) size[d] = N; coeff.reinit(size); } @@ -178,7 +178,7 @@ test(const LegendreFunction &func, const unsigned int poly_degree) // add some extra FEs in fe_collection hp::FECollection fe_collection; - for (unsigned int p = 1; p <= max_poly; p++) + for (unsigned int p = 1; p <= max_poly; ++p) fe_collection.push_back(FE_Q(p)); FESeries::Legendre legendre = @@ -255,8 +255,8 @@ main() const unsigned int p = 1; Table coeff_in(coeff_1d, coeff_1d); unsigned int ind = 0; - for (unsigned int i = 0; i < coeff_1d; i++) - for (unsigned int j = 0; j < coeff_1d; j++) + for (unsigned int i = 0; i < coeff_1d; ++i) + for (unsigned int j = 0; j < coeff_1d; ++j) coeff_in(i, j) = 1.0 + ind++; LegendreFunction function(coeff_in); @@ -276,10 +276,10 @@ main() const unsigned int p = 2; Table coeff_in(coeff_1d, coeff_1d); unsigned int ind = 0; - for (unsigned int i = 0; i < coeff_1d; i++) + for (unsigned int i = 0; i < coeff_1d; ++i) coeff_in(i, 0) = exp(-k1 * i); - for (unsigned int i = 0; i < coeff_1d; i++) + for (unsigned int i = 0; i < coeff_1d; ++i) coeff_in(0, i) = exp(-k2 * i); // make sure predicate skips 0-th: @@ -299,9 +299,9 @@ main() const unsigned int p = 1; Table coeff_in(coeff_1d, coeff_1d, coeff_1d); unsigned int ind = 0; - for (unsigned int i = 0; i < coeff_1d; i++) - for (unsigned int j = 0; j < coeff_1d; j++) - for (unsigned int k = 0; k < coeff_1d; k++) + for (unsigned int i = 0; i < coeff_1d; ++i) + for (unsigned int j = 0; j < coeff_1d; ++j) + for (unsigned int k = 0; k < coeff_1d; ++k) coeff_in(i, j, k) = 1.0 + ind++; LegendreFunction function(coeff_in); @@ -319,13 +319,13 @@ main() const unsigned int coeff_1d = 4; const unsigned int p = 3; Table coeff_in(coeff_1d, coeff_1d, coeff_1d); - for (unsigned int i = 0; i < coeff_1d; i++) + for (unsigned int i = 0; i < coeff_1d; ++i) coeff_in(i, 0, 0) = exp(-k1 * i); - for (unsigned int j = 0; j < coeff_1d; j++) + for (unsigned int j = 0; j < coeff_1d; ++j) coeff_in(0, j, 0) = exp(-k2 * j); - for (unsigned int k = 0; k < coeff_1d; k++) + for (unsigned int k = 0; k < coeff_1d; ++k) coeff_in(0, 0, k) = exp(-k3 * k); // make sure predicate skips 0-th: @@ -348,7 +348,7 @@ main() const unsigned int p = 4; Table coeff_in(coeff_1d, coeff_1d, coeff_1d); // all non-zero: - for (unsigned int i = 0; i < coeff_1d; i++) + for (unsigned int i = 0; i < coeff_1d; ++i) coeff_in(i, 0, 0) = exp(-k2 * i); // some non-zero (2nd and 4th), the slowest decay will be from this diff --git a/tests/numerics/smoothness_estimator_02.cc b/tests/numerics/smoothness_estimator_02.cc index 1e486523a3..cfcbb4512b 100644 --- a/tests/numerics/smoothness_estimator_02.cc +++ b/tests/numerics/smoothness_estimator_02.cc @@ -144,7 +144,7 @@ compare(const Table<1, CoefficientType> &coeff1, Assert(coeff1.size(0) == coeff2.size(0), ExcInternalError()); typename CoefficientType::value_type linf = 0.; - for (unsigned int i = 0; i < coeff1.size(0); i++) + for (unsigned int i = 0; i < coeff1.size(0); ++i) linf = std::max(linf, std::abs(coeff1(i) - coeff2(i))); return linf; @@ -159,8 +159,8 @@ compare(const Table<2, CoefficientType> &coeff1, Assert(coeff1.size(d) == coeff2.size(d), ExcInternalError()); typename CoefficientType::value_type linf = 0.; - for (unsigned int i = 0; i < coeff1.size(0); i++) - for (unsigned int j = 0; j < coeff1.size(1); j++) + for (unsigned int i = 0; i < coeff1.size(0); ++i) + for (unsigned int j = 0; j < coeff1.size(1); ++j) linf = std::max(linf, std::abs(coeff1(i, j) - coeff2(i, j))); return linf; @@ -175,9 +175,9 @@ compare(const Table<3, CoefficientType> &coeff1, Assert(coeff1.size(d) == coeff2.size(d), ExcInternalError()); typename CoefficientType::value_type linf = 0.; - for (unsigned int i = 0; i < coeff1.size(0); i++) - for (unsigned int j = 0; j < coeff1.size(1); j++) - for (unsigned int k = 0; k < coeff1.size(2); k++) + for (unsigned int i = 0; i < coeff1.size(0); ++i) + for (unsigned int j = 0; j < coeff1.size(1); ++j) + for (unsigned int k = 0; k < coeff1.size(2); ++k) linf = std::max(linf, std::abs(coeff1(i, j, k) - coeff2(i, j, k))); return linf; diff --git a/tests/petsc/petsc_mf_testmatrix.h b/tests/petsc/petsc_mf_testmatrix.h index bef7c87771..29f7ee42f3 100644 --- a/tests/petsc/petsc_mf_testmatrix.h +++ b/tests/petsc/petsc_mf_testmatrix.h @@ -124,9 +124,9 @@ inline void PetscFDMatrix::vmult_add(dealii::PETScWrappers::VectorBase & dst, const dealii::PETScWrappers::VectorBase &src) const { - for (unsigned int i = 0; i <= ny - 2; i++) + for (unsigned int i = 0; i <= ny - 2; ++i) { - for (unsigned int j = 0; j <= nx - 2; j++) + for (unsigned int j = 0; j <= nx - 2; ++j) { // Number of the row to be entered unsigned int row = j + (nx - 1) * i; diff --git a/tests/petsc/slowness_01.cc b/tests/petsc/slowness_01.cc index cf538b974b..22ccadf821 100644 --- a/tests/petsc/slowness_01.cc +++ b/tests/petsc/slowness_01.cc @@ -38,8 +38,8 @@ test() // first build the sparsity pattern SparsityPattern sparsity(N * N, N * N, 5); - for (unsigned int i = 0; i < N; i++) - for (unsigned int j = 0; j < N; j++) + for (unsigned int i = 0; i < N; ++i) + for (unsigned int j = 0; j < N; ++j) { const unsigned int global = i * N + j; sparsity.add(global, global); @@ -69,8 +69,8 @@ test() // next build the sparse matrix itself SparseMatrix matrix(sparsity); - for (unsigned int i = 0; i < N; i++) - for (unsigned int j = 0; j < N; j++) + for (unsigned int i = 0; i < N; ++i) + for (unsigned int j = 0; j < N; ++j) { const unsigned int global = i * N + j; matrix.add(global, global, 4); diff --git a/tests/petsc/slowness_02.cc b/tests/petsc/slowness_02.cc index 1de53172ec..c9b2ff67a4 100644 --- a/tests/petsc/slowness_02.cc +++ b/tests/petsc/slowness_02.cc @@ -38,8 +38,8 @@ test() // build the sparse matrix PETScWrappers::SparseMatrix matrix(N * N, N * N, 5); - for (unsigned int i = 0; i < N; i++) - for (unsigned int j = 0; j < N; j++) + for (unsigned int i = 0; i < N; ++i) + for (unsigned int j = 0; j < N; ++j) { const unsigned int global = i * N + j; matrix.add(global, global, 4); diff --git a/tests/petsc/slowness_03.cc b/tests/petsc/slowness_03.cc index 1b079257ff..b25098086b 100644 --- a/tests/petsc/slowness_03.cc +++ b/tests/petsc/slowness_03.cc @@ -43,8 +43,8 @@ test() // An older version of this test relied on PETSc doing dynamic allocation, but // we require sparsity patterns in constructors now so we need the sparsity // pattern ahead of time - hence this is done twice - for (unsigned int i = 0; i < N; i++) - for (unsigned int j = 0; j < N; j++) + for (unsigned int i = 0; i < N; ++i) + for (unsigned int j = 0; j < N; ++j) { const unsigned int global = i * N + j; dsp.add(global, global); @@ -77,8 +77,8 @@ test() PETScWrappers::MPI::SparseMatrix matrix; matrix.reinit(all_dofs, all_dofs, sparsity_pattern, PETSC_COMM_WORLD); - for (unsigned int i = 0; i < N; i++) - for (unsigned int j = 0; j < N; j++) + for (unsigned int i = 0; i < N; ++i) + for (unsigned int j = 0; j < N; ++j) { const unsigned int global = i * N + j; matrix.add(global, global, 4); diff --git a/tests/petsc/slowness_04.cc b/tests/petsc/slowness_04.cc index 221b9c3c2e..62756fabb9 100644 --- a/tests/petsc/slowness_04.cc +++ b/tests/petsc/slowness_04.cc @@ -49,8 +49,8 @@ test() // An older version of this test relied on PETSc doing dynamic allocation, but // we require sparsity patterns in constructors now so we need the sparsity // pattern ahead of time - hence this is done twice - for (unsigned int i = 0; i < N; i++) - for (unsigned int j = 0; j < N; j++) + for (unsigned int i = 0; i < N; ++i) + for (unsigned int j = 0; j < N; ++j) { const unsigned int global = i * N + j; dsp.add(global, global); @@ -89,10 +89,10 @@ test() std::vector permutation(N); { std::vector unused_indices(N); - for (unsigned int i = 0; i < N; i++) + for (unsigned int i = 0; i < N; ++i) unused_indices[i] = i; - for (unsigned int i = 0; i < N; i++) + for (unsigned int i = 0; i < N; ++i) { // pick a random element among the // unused indices @@ -107,8 +107,8 @@ test() } // build the sparse matrix - for (unsigned int i_ = 0; i_ < N; i_++) - for (unsigned int j_ = 0; j_ < N; j_++) + for (unsigned int i_ = 0; i_ < N; ++i_) + for (unsigned int j_ = 0; j_ < N; ++j_) { const unsigned int i = permutation[i_]; const unsigned int j = permutation[j_]; diff --git a/tests/petsc_complex/fe_get_function_values.cc b/tests/petsc_complex/fe_get_function_values.cc index 7451e767d8..ae9d17bbc9 100644 --- a/tests/petsc_complex/fe_get_function_values.cc +++ b/tests/petsc_complex/fe_get_function_values.cc @@ -110,7 +110,7 @@ test() constraints.close(); // set vector: unsigned int myid = Utilities::MPI::this_mpi_process(mpi_communicator); - for (unsigned int i = 0; i < locally_owned_dofs.n_elements(); i++) + for (unsigned int i = 0; i < locally_owned_dofs.n_elements(); ++i) { const PetscScalar val = 1.0 + myid + (myid + i % 2) * 2.0 * PETSC_i; vector(locally_owned_dofs.nth_index_in_set(i)) = val; diff --git a/tests/petsc_complex/parallel_sparse_matrix_01.cc b/tests/petsc_complex/parallel_sparse_matrix_01.cc index 3f5e532491..e3face969e 100644 --- a/tests/petsc_complex/parallel_sparse_matrix_01.cc +++ b/tests/petsc_complex/parallel_sparse_matrix_01.cc @@ -145,7 +145,7 @@ test(const unsigned int poly_degree = 1) mass_matrix.compress(VectorOperation::add); } - for (unsigned int i = 0; i < locally_owned_dofs.n_elements(); i++) + for (unsigned int i = 0; i < locally_owned_dofs.n_elements(); ++i) { double re = 0, im = 0; if (i % 2) diff --git a/tests/physics/elasticity-kinematics_02.cc b/tests/physics/elasticity-kinematics_02.cc index 12465baa63..e949852909 100644 --- a/tests/physics/elasticity-kinematics_02.cc +++ b/tests/physics/elasticity-kinematics_02.cc @@ -54,23 +54,23 @@ main() // Scale the gradients along the vectorization-index so that each grad_u[v] is // unique. - for (unsigned int v = 0; v < VectorizedArray::size(); v++) - for (unsigned int i = 0; i < dim; i++) - for (unsigned int j = 0; j < dim; j++) + for (unsigned int v = 0; v < VectorizedArray::size(); ++v) + for (unsigned int i = 0; i < dim; ++i) + for (unsigned int j = 0; j < dim; ++j) grad_u[i][j][v] *= (v + 1); Tensor<2, dim, VectorizedArray> F_solution; F_solution = grad_u; - for (unsigned int i = 0; i < dim; i++) + for (unsigned int i = 0; i < dim; ++i) F_solution[i][i] = F_solution[i][i] + 1.0; Tensor<2, dim, VectorizedArray> F_test = Kinematics::F(grad_u); // You can't use .norm() on some difference-tensor of the two so we compare // element-wise! - for (unsigned int v = 0; v < VectorizedArray::size(); v++) - for (unsigned int i = 0; i < dim; i++) - for (unsigned int j = 0; j < dim; j++) + for (unsigned int v = 0; v < VectorizedArray::size(); ++v) + for (unsigned int i = 0; i < dim; ++i) + for (unsigned int j = 0; j < dim; ++j) if (F_solution[i][j][v] - F_test[i][j][v] != 0.0) deallog << "Not OK" << std::endl; @@ -83,9 +83,9 @@ main() SymmetricTensor<2, dim, VectorizedArray> E_test = Kinematics::E(F_test); - for (unsigned int v = 0; v < VectorizedArray::size(); v++) - for (unsigned int i = 0; i < dim; i++) - for (unsigned int j = 0; j < dim; j++) + for (unsigned int v = 0; v < VectorizedArray::size(); ++v) + for (unsigned int i = 0; i < dim; ++i) + for (unsigned int j = 0; j < dim; ++j) if (E_test[i][j][v] - E_solution[i][j][v] != 0.0) deallog << "Not OK" << std::endl; @@ -95,9 +95,9 @@ main() Tensor<2, dim, VectorizedArray> F_iso_test; F_iso_test = Kinematics::F_iso(F_test); - for (unsigned int v = 0; v < VectorizedArray::size(); v++) - for (unsigned int i = 0; i < dim; i++) - for (unsigned int j = 0; j < dim; j++) + for (unsigned int v = 0; v < VectorizedArray::size(); ++v) + for (unsigned int i = 0; i < dim; ++i) + for (unsigned int j = 0; j < dim; ++j) if (F_iso_test[i][j][v] - F_iso_solution[i][j][v] != 0.0) deallog << "Not OK" << std::endl; diff --git a/tests/quick_tests/adolc.cc b/tests/quick_tests/adolc.cc index 9888282d86..41f51802c5 100644 --- a/tests/quick_tests/adolc.cc +++ b/tests/quick_tests/adolc.cc @@ -41,11 +41,11 @@ main() adouble *x = new adouble[n]; adouble y = 1.0; - for (unsigned int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; ++i) xp[i] = (i + 1.0) / (2.0 + i); trace_on(1); - for (unsigned int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; ++i) { x[i] <<= xp[i]; y *= x[i]; @@ -73,7 +73,7 @@ main() gradient(1, n, xp, g); double err_grad = 0; - for (unsigned int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; ++i) err_grad += std::abs(g[i] - yp / xp[i]); deallog << "Error (gradient): " << err_grad << std::endl; @@ -88,8 +88,8 @@ main() hessian(1, n, xp, H); double error_hess = 0; - for (unsigned int i = 0; i < n; i++) - for (unsigned int j = 0; j < n; j++) + for (unsigned int i = 0; i < n; ++i) + for (unsigned int j = 0; j < n; ++j) if (i > j) error_hess += std::abs(H[i][j] - g[i] / xp[j]); @@ -104,7 +104,7 @@ main() delete[] g; g = nullptr; - for (unsigned int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; ++i) delete[] H[i]; delete[] H; H = nullptr; diff --git a/tests/quick_tests/arpack.cc b/tests/quick_tests/arpack.cc index e93b0706b8..349092beae 100644 --- a/tests/quick_tests/arpack.cc +++ b/tests/quick_tests/arpack.cc @@ -97,7 +97,7 @@ test() { B.vmult(Bx, eigenvectors[i]); - for (unsigned int j = 0; j < eigenvectors.size(); j++) + for (unsigned int j = 0; j < eigenvectors.size(); ++j) Assert(std::abs(eigenvectors[j] * Bx - (i == j)) < precision, ExcMessage("Eigenvectors " + Utilities::int_to_string(i) + " and " + Utilities::int_to_string(j) + diff --git a/tests/quick_tests/gsl.cc b/tests/quick_tests/gsl.cc index d281c96963..07900350df 100644 --- a/tests/quick_tests/gsl.cc +++ b/tests/quick_tests/gsl.cc @@ -33,7 +33,7 @@ check() { const unsigned int n_points = 10; std::vector x(n_points), y(n_points); - for (unsigned int i = 0; i < n_points; i++) + for (unsigned int i = 0; i < n_points; ++i) { x[i] = i + 0.5 * std::sin(i); y[i] = i + std::cos(i * i); diff --git a/tests/quick_tests/step-slepc.cc b/tests/quick_tests/step-slepc.cc index 1aa63d310d..ec464892f1 100644 --- a/tests/quick_tests/step-slepc.cc +++ b/tests/quick_tests/step-slepc.cc @@ -170,7 +170,7 @@ LaplaceEigenspectrumProblem::solve() { B.vmult(Bx, x[i]); - for (unsigned int j = 0; j < x.size(); j++) + for (unsigned int j = 0; j < x.size(); ++j) if (j != i) Assert(std::abs(x[j] * Bx) < precision, ExcMessage("Eigenvectors " + Utilities::int_to_string(i) + diff --git a/tests/remote_point_evaluation/vector_tools_evaluate_at_points_01.cc b/tests/remote_point_evaluation/vector_tools_evaluate_at_points_01.cc index 71a48ea124..714bfc3997 100644 --- a/tests/remote_point_evaluation/vector_tools_evaluate_at_points_01.cc +++ b/tests/remote_point_evaluation/vector_tools_evaluate_at_points_01.cc @@ -61,7 +61,7 @@ namespace dealii if (n_refinements == 0) return; - for (int i = 0; i < static_cast(n_refinements) - 3; i++) + for (int i = 0; i < static_cast(n_refinements) - 3; ++i) tria.refine_global(); if (n_refinements >= 1) diff --git a/tests/rol/vector_adaptor_apply_binary_01.cc b/tests/rol/vector_adaptor_apply_binary_01.cc index a021fdc337..2fd07a9e26 100644 --- a/tests/rol/vector_adaptor_apply_binary_01.cc +++ b/tests/rol/vector_adaptor_apply_binary_01.cc @@ -67,10 +67,10 @@ test() Testing::srand(1); - for (auto iterator = a.begin(); iterator != a.end(); iterator++) + for (auto iterator = a.begin(); iterator != a.end(); ++iterator) *iterator = static_cast(Testing::rand()) / RAND_MAX; - for (auto iterator = b.begin(); iterator != b.end(); iterator++) + for (auto iterator = b.begin(); iterator != b.end(); ++iterator) *iterator = static_cast(Testing::rand()) / RAND_MAX; a.compress(VectorOperation::insert); diff --git a/tests/rol/vector_adaptor_no_ghost_01.cc b/tests/rol/vector_adaptor_no_ghost_01.cc index 4b69c93646..d37fc1917b 100644 --- a/tests/rol/vector_adaptor_no_ghost_01.cc +++ b/tests/rol/vector_adaptor_no_ghost_01.cc @@ -66,13 +66,13 @@ test() prepare_vector(b); prepare_vector(c); - for (auto iterator = a.begin(); iterator != a.end(); iterator++) + for (auto iterator = a.begin(); iterator != a.end(); ++iterator) *iterator = static_cast(Testing::rand()) / RAND_MAX; - for (auto iterator = b.begin(); iterator != b.end(); iterator++) + for (auto iterator = b.begin(); iterator != b.end(); ++iterator) *iterator = static_cast(Testing::rand()) / RAND_MAX; - for (auto iterator = c.begin(); iterator != c.end(); iterator++) + for (auto iterator = c.begin(); iterator != c.end(); ++iterator) *iterator = static_cast(Testing::rand()) / RAND_MAX; a.compress(VectorOperation::insert); diff --git a/tests/rol/vector_adaptor_with_ghost_01.cc b/tests/rol/vector_adaptor_with_ghost_01.cc index 5d4b149633..72c74743bf 100644 --- a/tests/rol/vector_adaptor_with_ghost_01.cc +++ b/tests/rol/vector_adaptor_with_ghost_01.cc @@ -78,13 +78,13 @@ test() prepare_vector(b); prepare_vector(c); - for (auto iterator = a.begin(); iterator != a.end(); iterator++) + for (auto iterator = a.begin(); iterator != a.end(); ++iterator) *iterator = static_cast(Testing::rand()) / RAND_MAX; - for (auto iterator = b.begin(); iterator != b.end(); iterator++) + for (auto iterator = b.begin(); iterator != b.end(); ++iterator) *iterator = static_cast(Testing::rand()) / RAND_MAX; - for (auto iterator = c.begin(); iterator != c.end(); iterator++) + for (auto iterator = c.begin(); iterator != c.end(); ++iterator) *iterator = static_cast(Testing::rand()) / RAND_MAX; a.compress(VectorOperation::insert); diff --git a/tests/serialization/table_1.cc b/tests/serialization/table_1.cc index 0d826d03b5..1284c3680a 100644 --- a/tests/serialization/table_1.cc +++ b/tests/serialization/table_1.cc @@ -33,7 +33,7 @@ test() unsigned int index3 = 2; Table<1, int> t3(index3); - for (unsigned int i = 0; i < index1; i++) + for (unsigned int i = 0; i < index1; ++i) { t1[i] = i + 1; t2[i] = i + 1 + index1; diff --git a/tests/simplex/fe_lib_02.cc b/tests/simplex/fe_lib_02.cc index a5c5aeecca..a839c62790 100644 --- a/tests/simplex/fe_lib_02.cc +++ b/tests/simplex/fe_lib_02.cc @@ -37,11 +37,11 @@ test(const FiniteElement &fe, const Quadrature &quad) for (const auto &point : quad.get_points()) { deallog << point << " : " << std::endl; - for (unsigned int i = 0; i < fe.n_dofs_per_cell(); i++) + for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i) deallog << fe.shape_value(i, point) << " "; - for (unsigned int i = 0; i < fe.n_dofs_per_cell(); i++) + for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i) deallog << fe.shape_grad(i, point) << " "; - for (unsigned int i = 0; i < fe.n_dofs_per_cell(); i++) + for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i) deallog << fe.shape_grad_grad(i, point) << " "; deallog << std::endl; } diff --git a/tests/simplex/fe_p_bubbles_01.cc b/tests/simplex/fe_p_bubbles_01.cc index b15ca4aa52..93a33c28d8 100644 --- a/tests/simplex/fe_p_bubbles_01.cc +++ b/tests/simplex/fe_p_bubbles_01.cc @@ -37,11 +37,11 @@ test(const FiniteElement &fe, const Quadrature &quad) for (const auto &point : quad.get_points()) { deallog << point << " : " << std::endl; - for (unsigned int i = 0; i < fe.n_dofs_per_cell(); i++) + for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i) deallog << fe.shape_value(i, point) << " "; - for (unsigned int i = 0; i < fe.n_dofs_per_cell(); i++) + for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i) deallog << fe.shape_grad(i, point) << " "; - for (unsigned int i = 0; i < fe.n_dofs_per_cell(); i++) + for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i) deallog << fe.shape_grad_grad(i, point) << " "; deallog << std::endl; } diff --git a/tests/simplex/matrix_free_04.cc b/tests/simplex/matrix_free_04.cc index 867efe9d4d..854beb4f4c 100644 --- a/tests/simplex/matrix_free_04.cc +++ b/tests/simplex/matrix_free_04.cc @@ -155,7 +155,7 @@ public: FEFaceIntegrator fe_eval(data, range, true); FEFaceIntegrator fe_eval_neighbor(data, range, false); - for (unsigned int face = range.first; face < range.second; face++) + for (unsigned int face = range.first; face < range.second; ++face) { fe_eval.reinit(face); fe_eval_neighbor.reinit(face); @@ -196,7 +196,7 @@ public: [&](const auto &data, auto &dst, const auto &src, const auto range) { FEFaceIntegrator fe_eval(data, range, true); - for (unsigned int face = range.first; face < range.second; face++) + for (unsigned int face = range.first; face < range.second; ++face) { fe_eval.reinit(face); fe_eval.gather_evaluate(src, diff --git a/tests/simplex/poisson_02.cc b/tests/simplex/poisson_02.cc index 257e14330e..4d9e03c388 100644 --- a/tests/simplex/poisson_02.cc +++ b/tests/simplex/poisson_02.cc @@ -564,7 +564,7 @@ DGHeat::calculateL2Error() cell->get_dof_indices(local_dof_indices); - for (unsigned int q = 0; q < n_q_points; q++) + for (unsigned int q = 0; q < n_q_points; ++q) { const double u_exact = dim == 2 ? -std::sin(M_PI * fe_values.quadrature_point(q)[0]) * @@ -577,7 +577,7 @@ DGHeat::calculateL2Error() // Find the values of x and u_h (the finite element solution) at the // quadrature points - for (unsigned int i = 0; i < dofs_per_cell; i++) + for (unsigned int i = 0; i < dofs_per_cell; ++i) { u_sim += fe_values.shape_value(i, q) * solution[local_dof_indices[i]]; diff --git a/tests/simplex/polynomials_01.cc b/tests/simplex/polynomials_01.cc index 7ae63e8b38..10ea5f4be4 100644 --- a/tests/simplex/polynomials_01.cc +++ b/tests/simplex/polynomials_01.cc @@ -38,7 +38,7 @@ test(const unsigned int degree) std::vector> third_derivatives; std::vector> fourth_derivatives; - for (unsigned int i = 0; i < quad.size(); i++) + for (unsigned int i = 0; i < quad.size(); ++i) { poly.evaluate(quad.point(i), values, diff --git a/tests/slepc/solve_01.cc b/tests/slepc/solve_01.cc index 5b244bc93d..ab37a707d0 100644 --- a/tests/slepc/solve_01.cc +++ b/tests/slepc/solve_01.cc @@ -51,7 +51,7 @@ check_solve(SolverType & solver, solver.set_problem_type(EPS_GHEP); // reset vectors and set them as initial space // to avoid dependency on SLEPc random numbers: - for (unsigned int i = 0; i < u.size(); i++) + for (unsigned int i = 0; i < u.size(); ++i) for (unsigned int j = 0; j < u[i].size(); ++j) u[i][j] = random_value(); @@ -73,7 +73,7 @@ check_solve(SolverType & solver, // << " iterations" << std::endl; deallog << "Eigenvalues:"; - for (unsigned int i = 0; i < v.size(); i++) + for (unsigned int i = 0; i < v.size(); ++i) { deallog << " " << v[i]; if (i != (v.size() - 1)) diff --git a/tests/slepc/solve_04.cc b/tests/slepc/solve_04.cc index 5a921fe727..16fcc0c32b 100644 --- a/tests/slepc/solve_04.cc +++ b/tests/slepc/solve_04.cc @@ -51,7 +51,7 @@ check_solve(SolverType & solver, solver.set_problem_type(EPS_HEP); // reset vectors and set them as initial space // to avoid dependency on random numbers: - for (unsigned int i = 0; i < u.size(); i++) + for (unsigned int i = 0; i < u.size(); ++i) for (unsigned int j = 0; j < u[i].size(); ++j) u[i][j] = random_value(); @@ -108,7 +108,7 @@ check_solve(SolverType & solver, } deallog << "Eigenvalues:"; - for (unsigned int i = 0; i < v.size(); i++) + for (unsigned int i = 0; i < v.size(); ++i) { deallog << " " << v[i]; if (i != (v.size() - 1)) diff --git a/tests/slepc/step-36_parallel.cc b/tests/slepc/step-36_parallel.cc index d68058585b..0b3bb37dd8 100644 --- a/tests/slepc/step-36_parallel.cc +++ b/tests/slepc/step-36_parallel.cc @@ -123,7 +123,7 @@ test(std::string solver_name, std::string preconditioner_name) /* keep constrained dofs */ true); std::vector n_locally_owned_dofs( n_mpi_processes); - for (unsigned int i = 0; i < n_mpi_processes; i++) + for (unsigned int i = 0; i < n_mpi_processes; ++i) n_locally_owned_dofs[i] = locally_owned_dofs_per_processor[i].n_elements(); dealii::SparsityTools::distribute_sparsity_pattern(csp, @@ -323,7 +323,7 @@ test(std::string solver_name, std::string preconditioner_name) // dealii::deallog << "outer iterations: "<< solver_control.last_step // ()< n_locally_owned_dofs( n_mpi_processes); - for (unsigned int i = 0; i < n_mpi_processes; i++) + for (unsigned int i = 0; i < n_mpi_processes; ++i) n_locally_owned_dofs[i] = locally_owned_dofs_per_processor[i].n_elements(); dealii::SparsityTools::distribute_sparsity_pattern(csp, @@ -320,7 +320,7 @@ test(std::string solver_name, std::string preconditioner_name) // dealii::deallog << "outer iterations: "<< solver_control.last_step // ()< n_locally_owned_dofs( n_mpi_processes); - for (unsigned int i = 0; i < n_mpi_processes; i++) + for (unsigned int i = 0; i < n_mpi_processes; ++i) n_locally_owned_dofs[i] = locally_owned_dofs_per_processor[i].n_elements(); dealii::SparsityTools::distribute_sparsity_pattern(csp, @@ -316,7 +316,7 @@ test(std::string solver_name, std::string preconditioner_name) // dealii::deallog << "outer iterations: "<< solver_control.last_step // ()< inline void FDDiagMatrix::diag_structure(SP &structure) const { - for (unsigned int i = 0; i <= ny - 2; i++) + for (unsigned int i = 0; i <= ny - 2; ++i) { - for (unsigned int j = 0; j <= nx - 2; j++) + for (unsigned int j = 0; j <= nx - 2; ++j) { // Number of the row to be entered unsigned int row = j + (nx - 1) * i; @@ -98,9 +98,9 @@ template inline void FDDiagMatrix::diag(MatrixType &A) const { - for (unsigned int i = 0; i <= ny - 2; i++) + for (unsigned int i = 0; i <= ny - 2; ++i) { - for (unsigned int j = 0; j <= nx - 2; j++) + for (unsigned int j = 0; j <= nx - 2; ++j) { // Number of the row to be entered unsigned int row = j + (nx - 1) * i; @@ -113,9 +113,9 @@ template inline void FDDiagMatrix::gnuplot_print(std::ostream &s, const Vector &V) const { - for (unsigned int i = 0; i <= ny - 2; i++) + for (unsigned int i = 0; i <= ny - 2; ++i) { - for (unsigned int j = 0; j <= nx - 2; j++) + for (unsigned int j = 0; j <= nx - 2; ++j) { // Number of the row to be entered unsigned int row = j + (nx - 1) * i; @@ -174,7 +174,7 @@ template inline void FD1DLaplaceMatrix::three_point_structure(SP &structure) const { - for (unsigned int i = 0; i <= n - 2; i++) + for (unsigned int i = 0; i <= n - 2; ++i) { structure.add(i, i); if (i > 0) @@ -189,7 +189,7 @@ template inline void FD1DLaplaceMatrix::three_point(MatrixType &A) const { - for (unsigned int i = 0; i <= n - 2; i++) + for (unsigned int i = 0; i <= n - 2; ++i) { A.set(i, i, 2.0); if (i > 0) diff --git a/tests/symengine/basic_04.cc b/tests/symengine/basic_04.cc index 6e3603e2f5..b41dfdeacc 100644 --- a/tests/symengine/basic_04.cc +++ b/tests/symengine/basic_04.cc @@ -78,7 +78,7 @@ main(int argc, char *argv[]) SE::map_basic_basic dict; std::vector vals(v.size()); - for (unsigned i = 0; i < v.size(); i++) + for (unsigned i = 0; i < v.size(); ++i) { dict[v[i]] = SE::real_double(i); vals[i] = i; @@ -90,7 +90,7 @@ main(int argc, char *argv[]) // Standard substitution auto t1 = std::chrono::high_resolution_clock::now(); - for (unsigned j = 0; j < n_runs; j++) + for (unsigned j = 0; j < n_runs; ++j) { res += SE::eval_double(*h->subs(dict)); } @@ -118,7 +118,7 @@ main(int argc, char *argv[]) << " us" << std::endl; t1 = std::chrono::high_resolution_clock::now(); - for (unsigned j = 0; j < n_runs; j++) + for (unsigned j = 0; j < n_runs; ++j) { res1 += l.call(vals); } @@ -150,7 +150,7 @@ main(int argc, char *argv[]) << " us" << std::endl; t1 = std::chrono::high_resolution_clock::now(); - for (unsigned j = 0; j < n_runs; j++) + for (unsigned j = 0; j < n_runs; ++j) { res2 += l2.call(vals); } diff --git a/tests/symengine/basic_05.cc b/tests/symengine/basic_05.cc index 53dee912ff..23dfd1aa34 100644 --- a/tests/symengine/basic_05.cc +++ b/tests/symengine/basic_05.cc @@ -91,7 +91,7 @@ main(int argc, char *argv[]) SE::map_basic_basic dict; std::vector vals(v.size()); - for (unsigned i = 0; i < v.size(); i++) + for (unsigned i = 0; i < v.size(); ++i) { dict[v[i]] = SE::real_double(i); vals[i] = i; @@ -103,9 +103,9 @@ main(int argc, char *argv[]) // Standard substitution auto t1 = std::chrono::high_resolution_clock::now(); - for (unsigned j = 0; j < n_runs; j++) + for (unsigned j = 0; j < n_runs; ++j) { - for (unsigned k = 0; k < diffs.size(); k++) + for (unsigned k = 0; k < diffs.size(); ++k) { res[k] = SE::eval_double(*diffs[k]->subs(dict)); r += res[k]; @@ -135,10 +135,10 @@ main(int argc, char *argv[]) << " us" << std::endl; t1 = std::chrono::high_resolution_clock::now(); - for (unsigned j = 0; j < n_runs; j++) + for (unsigned j = 0; j < n_runs; ++j) { l.call(res1, vals.data()); - for (unsigned k = 0; k < diffs.size(); k++) + for (unsigned k = 0; k < diffs.size(); ++k) { r2 += res1[k]; } @@ -166,10 +166,10 @@ main(int argc, char *argv[]) << " us" << std::endl; t1 = std::chrono::high_resolution_clock::now(); - for (unsigned j = 0; j < 1000; j++) + for (unsigned j = 0; j < 1000; ++j) { l2.call(res2, vals.data()); - for (unsigned k = 0; k < diffs.size(); k++) + for (unsigned k = 0; k < diffs.size(); ++k) { r3 += res2[k]; } diff --git a/tests/symengine/cse_01.cc b/tests/symengine/cse_01.cc index c5fb4e4a5f..936021f7ca 100644 --- a/tests/symengine/cse_01.cc +++ b/tests/symengine/cse_01.cc @@ -54,11 +54,11 @@ main(int argc, char *argv[]) SE::parse("(a+b+c)*c")}; deallog.push("Independents"); - for (unsigned int i = 0; i < independents.size(); i++) + for (unsigned int i = 0; i < independents.size(); ++i) deallog << *(independents[i]) << std::endl; deallog.pop(); deallog.push("Dependents"); - for (unsigned int i = 0; i < dependents.size(); i++) + for (unsigned int i = 0; i < dependents.size(); ++i) deallog << *(dependents[i]) << std::endl; deallog.pop(); diff --git a/tests/symengine/cse_02.cc b/tests/symengine/cse_02.cc index ab410d1cef..7527ce0707 100644 --- a/tests/symengine/cse_02.cc +++ b/tests/symengine/cse_02.cc @@ -58,11 +58,11 @@ main(int argc, char *argv[]) SE::parse("asin((a+b)*c)")}; deallog.push("Independents"); - for (unsigned int i = 0; i < independents.size(); i++) + for (unsigned int i = 0; i < independents.size(); ++i) deallog << *(independents[i]) << std::endl; deallog.pop(); deallog.push("Dependents"); - for (unsigned int i = 0; i < dependents.size(); i++) + for (unsigned int i = 0; i < dependents.size(); ++i) deallog << *(dependents[i]) << std::endl; deallog.pop(); diff --git a/tests/symengine/cse_04.cc b/tests/symengine/cse_04.cc index e349f37cab..643c418d4d 100644 --- a/tests/symengine/cse_04.cc +++ b/tests/symengine/cse_04.cc @@ -95,7 +95,7 @@ test_explicit() vec_basic dependents = {SE::parse("0.25*kappa*(-1.0 - C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00 - 2.0*log(sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00))) + 0.5*mu_e*(-3 + C_00*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333) + C_11*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333) + C_22*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333))*(1.0 + erf(1.77245385090552*(H_0**2 + H_1**2 + H_2**2)/H_sat_0**2)*sf_sat_0) - 6.28318530717959e-07*mu_r*sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)*(H_0*(1.0*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_1/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_1*(1.0*H_1*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_2*(1.0*H_1*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)))"), SE::parse("2.0*(0.0 + 0.25*kappa*(C_22*C_11 - 1.0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00) - C_12**2) + 0.5*mu_e*(1.0 + erf(1.77245385090552*(H_0**2 + H_1**2 + H_2**2)/H_sat_0**2)*sf_sat_0)*(-0.333333333333333*C_00*(C_22*C_11 - C_12**2)*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*C_11*(C_22*C_11 - C_12**2)*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*C_22*(C_22*C_11 - C_12**2)*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) + (-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333)) - 6.28318530717959e-07*mu_r*(H_0*(-1.0*H_0*(C_22*C_11 - C_12**2)**2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_2*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_1*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_1*(0.0 + 1.0*H_1*C_22/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_2*C_12/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*(C_22*C_00 - C_02**2)*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_01*C_02 - C_12*C_00)*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_2*(0.0 - 1.0*H_1*C_12/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*C_11/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*(C_01*C_02 - C_12*C_00)*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_11*C_00 - C_01**2)*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2))*sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00) - 3.14159265358979e-07*mu_r*(C_22*C_11 - C_12**2)*(H_0*(1.0*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_1/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_1*(1.0*H_1*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_2*(1.0*H_1*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)))/sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00))"), SE::parse("2.0*(0.0 + 0.25*kappa*(C_22*C_00 - 1.0*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00) - C_02**2) + 0.5*mu_e*(1.0 + erf(1.77245385090552*(H_0**2 + H_1**2 + H_2**2)/H_sat_0**2)*sf_sat_0)*(-0.333333333333333*C_00*(C_22*C_00 - C_02**2)*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*C_11*(C_22*C_00 - C_02**2)*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*C_22*(C_22*C_00 - C_02**2)*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) + (-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333)) - 6.28318530717959e-07*mu_r*sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)*(H_0*(0.0 + 1.0*H_0*C_22/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_2*C_02/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_0*(C_22*C_00 - C_02**2)*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_2*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_1*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_1*(-1.0*H_1*(C_22*C_00 - C_02**2)**2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_01*C_02 - C_12*C_00)*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_0*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_2*(0.0 - 1.0*H_0*C_02/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*C_00/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*(C_01*C_02 - C_12*C_00)*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_11*C_00 - C_01**2)*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_0*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2)) - 3.14159265358979e-07*mu_r*(C_22*C_00 - C_02**2)*(H_0*(1.0*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_1/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_1*(1.0*H_1*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_2*(1.0*H_1*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)))/sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00))"), SE::parse("2.0*(0.0 + 0.25*kappa*(C_11*C_00 - 1.0*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00) - C_01**2) + 0.5*mu_e*(-0.333333333333333*C_00*(C_11*C_00 - C_01**2)*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*C_11*(C_11*C_00 - C_01**2)*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*C_22*(C_11*C_00 - C_01**2)*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) + (-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333))*(1.0 + erf(1.77245385090552*(H_0**2 + H_1**2 + H_2**2)/H_sat_0**2)*sf_sat_0) - 6.28318530717959e-07*mu_r*sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)*(H_0*(0.0 + 1.0*H_0*C_11/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*C_01/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_0*(C_11*C_00 - C_01**2)*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_2*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_1*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_1*(0.0 - 1.0*H_0*C_01/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_1*C_00/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*(C_11*C_00 - C_01**2)*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_01*C_02 - C_12*C_00)*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_0*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_2*(-1.0*H_2*(C_11*C_00 - C_01**2)**2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_1*(C_01*C_02 - C_12*C_00)*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_0*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2)) - 3.14159265358979e-07*mu_r*(C_11*C_00 - C_01**2)*(H_0*(1.0*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_1/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_1*(1.0*H_1*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_2*(1.0*H_1*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)))/sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00))"), SE::parse("1.0*(0.0 + 0.25*kappa*(2*C_12*C_02 - 2*C_22*C_01 - 1.0*(2*C_12*C_02 - 2*C_22*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)) + 0.5*mu_e*(1.0 + erf(1.77245385090552*(H_0**2 + H_1**2 + H_2**2)/H_sat_0**2)*sf_sat_0)*(-0.333333333333333*(2*C_12*C_02 - 2*C_22*C_01)*C_00*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*(2*C_12*C_02 - 2*C_22*C_01)*C_11*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*(2*C_12*C_02 - 2*C_22*C_01)*C_22*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333)) - 6.28318530717959e-07*mu_r*sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)*(H_0*(0.0 - 1.0*H_1*C_22/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*C_12/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_0*(C_22*C_11 - C_12**2)*(2.0*C_12*C_02 - 2*C_22*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_2*(2.0*C_12*C_02 - 2*C_22*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_1*(2.0*C_12*C_02 - 2*C_22*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_1*(0.0 - 1.0*H_0*C_22/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*C_02/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*(C_22*C_00 - C_02**2)*(2.0*C_12*C_02 - 2*C_22*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_01*C_02 - C_12*C_00)*(2.0*C_12*C_02 - 2*C_22*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_0*(2.0*C_12*C_02 - 2*C_22*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_2*(0.0 + 1.0*H_0*C_12/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_1*C_02/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 2.0*H_2*C_01/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*(C_01*C_02 - C_12*C_00)*(2.0*C_12*C_02 - 2*C_22*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_11*C_00 - C_01**2)*(2.0*C_12*C_02 - 2*C_22*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_0*(2.0*C_12*C_02 - 2*C_22*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2)) - 3.14159265358979e-07*(2*C_12*C_02 - 2*C_22*C_01)*mu_r*(H_0*(1.0*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_1/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_1*(1.0*H_1*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_2*(1.0*H_1*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)))/sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00))"), SE::parse("1.0*(0.0 + 0.25*kappa*(-2*C_11*C_02 + 2*C_12*C_01 - 1.0*(-2*C_11*C_02 + 2*C_12*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)) + 0.5*mu_e*(1.0 + erf(1.77245385090552*(H_0**2 + H_1**2 + H_2**2)/H_sat_0**2)*sf_sat_0)*(-0.333333333333333*(-2*C_11*C_02 + 2*C_12*C_01)*C_00*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*(-2*C_11*C_02 + 2*C_12*C_01)*C_11*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*(-2*C_11*C_02 + 2*C_12*C_01)*C_22*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333)) - 6.28318530717959e-07*mu_r*sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)*(H_0*(0.0 + 1.0*H_1*C_12/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_2*C_11/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_0*(C_22*C_11 - C_12**2)*(-2*C_11*C_02 + 2.0*C_12*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_2*(-2*C_11*C_02 + 2.0*C_12*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_1*(-2*C_11*C_02 + 2.0*C_12*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_1*(0.0 + 1.0*H_0*C_12/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 2.0*H_1*C_02/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*C_01/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*(C_22*C_00 - C_02**2)*(-2*C_11*C_02 + 2.0*C_12*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_01*C_02 - C_12*C_00)*(-2*C_11*C_02 + 2.0*C_12*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_0*(-2*C_11*C_02 + 2.0*C_12*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_2*(0.0 - 1.0*H_0*C_11/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_1*C_01/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*(C_01*C_02 - C_12*C_00)*(-2*C_11*C_02 + 2.0*C_12*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_11*C_00 - C_01**2)*(-2*C_11*C_02 + 2.0*C_12*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_0*(-2*C_11*C_02 + 2.0*C_12*C_01)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2)) - 3.14159265358979e-07*(-2*C_11*C_02 + 2*C_12*C_01)*mu_r*(H_0*(1.0*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_1/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_1*(1.0*H_1*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_2*(1.0*H_1*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)))/sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00))"), SE::parse("1.0*(0.0 + 0.25*kappa*(2*C_01*C_02 - 2*C_12*C_00 - 1.0*(2*C_01*C_02 - 2*C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)) + 0.5*mu_e*(1.0 + erf(1.77245385090552*(H_0**2 + H_1**2 + H_2**2)/H_sat_0**2)*sf_sat_0)*(-0.333333333333333*(2*C_01*C_02 - 2*C_12*C_00)*C_00*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*(2*C_01*C_02 - 2*C_12*C_00)*C_11*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333) - 0.333333333333333*(2*C_01*C_02 - 2*C_12*C_00)*C_22*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-1.33333333333333)) - 6.28318530717959e-07*mu_r*(H_0*(0.0 - 2.0*H_0*C_12/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_1*C_02/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*C_01/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_0*(C_22*C_11 - C_12**2)*(2.0*C_01*C_02 - 2*C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_2*(2.0*C_01*C_02 - 2*C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_1*(2.0*C_01*C_02 - 2*C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_1*(0.0 + 1.0*H_0*C_02/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_2*C_00/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*(C_22*C_00 - C_02**2)*(2.0*C_01*C_02 - 2*C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_01*C_02 - C_12*C_00)*(2.0*C_01*C_02 - 2*C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(C_12*C_02 - C_22*C_01)*H_0*(2.0*C_01*C_02 - 2*C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2) + H_2*(0.0 + 1.0*H_0*C_01/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*C_00/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) - 1.0*H_1*(C_01*C_02 - C_12*C_00)*(2.0*C_01*C_02 - 2*C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*H_2*(C_11*C_00 - C_01**2)*(2.0*C_01*C_02 - 2*C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2 - 1.0*(-C_11*C_02 + C_12*C_01)*H_0*(2.0*C_01*C_02 - 2*C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)**2))*sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00) - 3.14159265358979e-07*(2*C_01*C_02 - 2*C_12*C_00)*mu_r*(H_0*(1.0*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_1/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_1*(1.0*H_1*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + H_2*(1.0*H_1*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)))/sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00))"), SE::parse("-(-6.28318530717959e-07*mu_r*(1.0*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_1/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_0*(C_22*C_11 - C_12**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_2/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_1/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00))*sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00) + 3.54490770181103*exp(-3.14159265358979*(H_0**2 + H_1**2 + H_2**2)**2/H_sat_0**4)*H_0*mu_e*(-3 + C_00*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333) + C_11*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333) + C_22*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333))*sf_sat_0/(sqrt(pi)*H_sat_0**2))"), SE::parse("-(-6.28318530717959e-07*mu_r*sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)*(1.0*H_1*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_1*(C_22*C_00 - C_02**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(C_12*C_02 - C_22*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + 3.54490770181103*exp(-3.14159265358979*(H_0**2 + H_1**2 + H_2**2)**2/H_sat_0**4)*H_1*mu_e*(-3 + C_00*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333) + C_11*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333) + C_22*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333))*sf_sat_0/(sqrt(pi)*H_sat_0**2))"), SE::parse("-(-6.28318530717959e-07*mu_r*sqrt(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)*(1.0*H_1*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_1*(C_01*C_02 - C_12*C_00)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*H_2*(C_11*C_00 - C_01**2)/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00) + 1.0*(-C_11*C_02 + C_12*C_01)*H_0/(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2.0*C_12*C_01*C_02 + C_22*C_11*C_00)) + 3.54490770181103*exp(-3.14159265358979*(H_0**2 + H_1**2 + H_2**2)**2/H_sat_0**4)*H_2*mu_e*(-3 + C_00*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333) + C_11*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333) + C_22*(-C_11*C_02**2 - C_12**2*C_00 - C_22*C_01**2 + 2*C_12*C_01*C_02 + C_22*C_11*C_00)**(-0.333333333333333))*sf_sat_0/(sqrt(pi)*H_sat_0**2))")}; std::vector vals(independents.size()); - for (unsigned int i = 0; i < independents.size(); i++) + for (unsigned int i = 0; i < independents.size(); ++i) vals[i] = independents_vals[i]; auto eval_symengine = diff --git a/tests/tensors/symmetric_tensor_39.cc b/tests/tensors/symmetric_tensor_39.cc index 035612f407..1f2249954d 100644 --- a/tests/tensors/symmetric_tensor_39.cc +++ b/tests/tensors/symmetric_tensor_39.cc @@ -32,7 +32,7 @@ fill_tensor(dealii::SymmetricTensor<2, dim, dealii::VectorizedArray> &A) Number counter = 0.0; for (unsigned int i = 0; i < dim; ++i) for (unsigned int j = 0; j < dim; ++j) - for (unsigned int v = 0; v < dealii::VectorizedArray::size(); v++) + for (unsigned int v = 0; v < dealii::VectorizedArray::size(); ++v) { A[i][j][v] = counter; counter += 1.0; @@ -51,10 +51,10 @@ main() SymmetricTensor<2, dim, VectorizedArray> B; // I^sym = 0.5(d_ik*d_jl + d_il*d_jk) -> I^sym : A = A^sym - for (unsigned int i = 0; i < dim; i++) - for (unsigned int j = 0; j < dim; j++) - for (unsigned int k = 0; k < dim; k++) - for (unsigned int l = 0; l < dim; l++) + for (unsigned int i = 0; i < dim; ++i) + for (unsigned int j = 0; j < dim; ++j) + for (unsigned int k = 0; k < dim; ++k) + for (unsigned int l = 0; l < dim; ++l) I[i][j][k][l] = ((i == k && j == l && i == l && j == k) ? make_vectorized_array(1.0) : ((i == k && j == l) || (i == l && j == k) ? diff --git a/tests/tensors/tensor.cc b/tests/tensors/tensor.cc index 6da7f6794b..e7193c82a5 100644 --- a/tests/tensors/tensor.cc +++ b/tests/tensors/tensor.cc @@ -41,7 +41,7 @@ main() t.unroll(unrolled); deallog << "unrolled:"; - for (unsigned i = 0; i < 9; i++) + for (unsigned i = 0; i < 9; ++i) deallog << ' ' << unrolled(i); deallog << std::endl; diff --git a/tests/tensors/tensor_complex.cc b/tests/tensors/tensor_complex.cc index 5b8e58a05e..93811a0b28 100644 --- a/tests/tensors/tensor_complex.cc +++ b/tests/tensors/tensor_complex.cc @@ -59,7 +59,7 @@ main() // threshold and so on t.unroll(unrolled); deallog << "unrolled:"; - for (unsigned i = 0; i < 9; i++) + for (unsigned i = 0; i < 9; ++i) deallog << ' ' << unrolled(i); deallog << std::endl; diff --git a/tests/tensors/tensor_float.cc b/tests/tensors/tensor_float.cc index c4607eeecd..1e6c042784 100644 --- a/tests/tensors/tensor_float.cc +++ b/tests/tensors/tensor_float.cc @@ -44,7 +44,7 @@ main() // threshold and so on t.unroll(unrolled); deallog << "unrolled:"; - for (unsigned i = 0; i < 9; i++) + for (unsigned i = 0; i < 9; ++i) deallog << ' ' << static_cast(unrolled(i)); deallog << std::endl; diff --git a/tests/testmatrix.h b/tests/testmatrix.h index b2c62b7d2d..7d5cae05b2 100644 --- a/tests/testmatrix.h +++ b/tests/testmatrix.h @@ -104,9 +104,9 @@ template inline void FDMatrix::five_point_structure(SP &structure) const { - for (unsigned int i = 0; i <= ny - 2; i++) + for (unsigned int i = 0; i <= ny - 2; ++i) { - for (unsigned int j = 0; j <= nx - 2; j++) + for (unsigned int j = 0; j <= nx - 2; ++j) { // Number of the row to be entered unsigned int row = j + (nx - 1) * i; @@ -141,9 +141,9 @@ template inline void FDMatrix::nine_point_structure(SP &structure) const { - for (unsigned int i = 0; i <= ny - 2; i++) + for (unsigned int i = 0; i <= ny - 2; ++i) { - for (unsigned int j = 0; j <= nx - 2; j++) + for (unsigned int j = 0; j <= nx - 2; ++j) { // Number of the row to be entered unsigned int row = j + (nx - 1) * i; @@ -198,9 +198,9 @@ template void FDMatrix::nine_point(MatrixType &A, bool) const { - for (unsigned int i = 0; i <= ny - 2; i++) + for (unsigned int i = 0; i <= ny - 2; ++i) { - for (unsigned int j = 0; j <= nx - 2; j++) + for (unsigned int j = 0; j <= nx - 2; ++j) { // Number of the row to be entered unsigned int row = j + (nx - 1) * i; @@ -254,9 +254,9 @@ template inline void FDMatrix::five_point(MatrixType &A, bool nonsymmetric) const { - for (unsigned int i = 0; i <= ny - 2; i++) + for (unsigned int i = 0; i <= ny - 2; ++i) { - for (unsigned int j = 0; j <= nx - 2; j++) + for (unsigned int j = 0; j <= nx - 2; ++j) { // Number of the row to be entered unsigned int row = j + (nx - 1) * i; @@ -297,9 +297,9 @@ template inline void FDMatrix::upwind(MatrixType &A, bool back) const { - for (unsigned int i = 0; i <= ny - 2; i++) + for (unsigned int i = 0; i <= ny - 2; ++i) { - for (unsigned int j = 0; j <= nx - 2; j++) + for (unsigned int j = 0; j <= nx - 2; ++j) { // Number of the row to be entered unsigned int row = j + (nx - 1) * i; @@ -318,9 +318,9 @@ template inline void FDMatrix::gnuplot_print(std::ostream &s, const Vector &V) const { - for (unsigned int i = 0; i <= ny - 2; i++) + for (unsigned int i = 0; i <= ny - 2; ++i) { - for (unsigned int j = 0; j <= nx - 2; j++) + for (unsigned int j = 0; j <= nx - 2; ++j) { // Number of the row to be entered unsigned int row = j + (nx - 1) * i; diff --git a/tests/tests.h b/tests/tests.h index 6f4d52b80c..5e7a85d8cd 100644 --- a/tests/tests.h +++ b/tests/tests.h @@ -197,7 +197,7 @@ namespace Testing r[0] = (seed == 0) ? 1 : seed; long int word = r[0]; - for (int i = 1; i < 31; i++) + for (int i = 1; i < 31; ++i) { // This does: // r[i] = (16807 * r[i-1]) % 2147483647; @@ -210,13 +210,13 @@ namespace Testing r[i] = word; } k = 31; - for (int i = 31; i < 34; i++) + for (int i = 31; i < 34; ++i) { r[k % 32] = r[(k + 32 - 31) % 32]; k = (k + 1) % 32; } - for (int i = 34; i < 344; i++) + for (int i = 34; i < 344; ++i) { r[k % 32] = nonoverflow_add(r[(k + 32 - 31) % 32], r[(k + 32 - 3) % 32]); diff --git a/tests/trilinos/renumbering_01.cc b/tests/trilinos/renumbering_01.cc index dbdb03c83a..40c5200718 100644 --- a/tests/trilinos/renumbering_01.cc +++ b/tests/trilinos/renumbering_01.cc @@ -145,7 +145,7 @@ private: locally_owned_dofs = dof_handler.locally_owned_dofs(); std::vector new_number(dof_handler.n_dofs()); - for (types::global_dof_index i = 0; i < dof_handler.n_dofs(); i++) + for (types::global_dof_index i = 0; i < dof_handler.n_dofs(); ++i) new_number[i] = dof_handler.n_dofs() - i - 1; std::vector local_new_number; diff --git a/tests/trilinos/slowness_01.cc b/tests/trilinos/slowness_01.cc index fc53161ffc..fb79ed5006 100644 --- a/tests/trilinos/slowness_01.cc +++ b/tests/trilinos/slowness_01.cc @@ -40,8 +40,8 @@ test() // first build the sparsity pattern SparsityPattern sparsity(N * N, N * N, 5); - for (unsigned int i = 0; i < N; i++) - for (unsigned int j = 0; j < N; j++) + for (unsigned int i = 0; i < N; ++i) + for (unsigned int j = 0; j < N; ++j) { const unsigned int global = i * N + j; sparsity.add(global, global); @@ -71,8 +71,8 @@ test() // next build the sparse matrix itself SparseMatrix matrix(sparsity); - for (unsigned int i = 0; i < N; i++) - for (unsigned int j = 0; j < N; j++) + for (unsigned int i = 0; i < N; ++i) + for (unsigned int j = 0; j < N; ++j) { const unsigned int global = i * N + j; matrix.add(global, global, 4); diff --git a/tests/trilinos/slowness_02.cc b/tests/trilinos/slowness_02.cc index 837f6e33a5..f0a2f84f98 100644 --- a/tests/trilinos/slowness_02.cc +++ b/tests/trilinos/slowness_02.cc @@ -40,8 +40,8 @@ test() // build the sparse matrix TrilinosWrappers::SparseMatrix matrix(N * N, N * N, 5U); - for (unsigned int i = 0; i < N; i++) - for (unsigned int j = 0; j < N; j++) + for (unsigned int i = 0; i < N; ++i) + for (unsigned int j = 0; j < N; ++j) { const unsigned int global = i * N + j; matrix.set(global, global, 4); diff --git a/tests/trilinos/slowness_03.cc b/tests/trilinos/slowness_03.cc index 300b18c99a..0448c6ef72 100644 --- a/tests/trilinos/slowness_03.cc +++ b/tests/trilinos/slowness_03.cc @@ -41,8 +41,8 @@ test() // build the sparse matrix IndexSet indices = complete_index_set(N * N); TrilinosWrappers::SparseMatrix matrix(indices, MPI_COMM_WORLD, 5); - for (unsigned int i = 0; i < N; i++) - for (unsigned int j = 0; j < N; j++) + for (unsigned int i = 0; i < N; ++i) + for (unsigned int j = 0; j < N; ++j) { const unsigned int global = i * N + j; matrix.set(global, global, 4); diff --git a/tests/trilinos/slowness_04.cc b/tests/trilinos/slowness_04.cc index eeaa11d7c3..c935b44630 100644 --- a/tests/trilinos/slowness_04.cc +++ b/tests/trilinos/slowness_04.cc @@ -49,10 +49,10 @@ test() std::vector permutation(N); { std::vector unused_indices(N); - for (unsigned int i = 0; i < N; i++) + for (unsigned int i = 0; i < N; ++i) unused_indices[i] = i; - for (unsigned int i = 0; i < N; i++) + for (unsigned int i = 0; i < N; ++i) { // pick a random element among the // unused indices @@ -69,8 +69,8 @@ test() // build the sparse matrix IndexSet indices = complete_index_set(N * N); TrilinosWrappers::SparseMatrix matrix(indices, MPI_COMM_WORLD, 5); - for (unsigned int i_ = 0; i_ < N; i_++) - for (unsigned int j_ = 0; j_ < N; j_++) + for (unsigned int i_ = 0; i_ < N; ++i_) + for (unsigned int j_ = 0; j_ < N; ++j_) { const unsigned int i = permutation[i_]; const unsigned int j = permutation[j_]; diff --git a/tests/trilinos/solver_control_05.cc b/tests/trilinos/solver_control_05.cc index a98d82df3c..41c0134eeb 100644 --- a/tests/trilinos/solver_control_05.cc +++ b/tests/trilinos/solver_control_05.cc @@ -51,12 +51,12 @@ main(int argc, char **argv) // Make matrix DynamicSparsityPattern csp(dim, dim); - for (unsigned int row = 0; row < dim; row++) + for (unsigned int row = 0; row < dim; ++row) csp.add(row, row); TrilinosWrappers::SparseMatrix A; A.reinit(csp); - for (unsigned int row = 0; row < dim; row++) + for (unsigned int row = 0; row < dim; ++row) A.set(row, row, 2.0 * (row + 1)); TrilinosWrappers::MPI::Vector f; diff --git a/tests/vector/vector_58.cc b/tests/vector/vector_58.cc index 4230398deb..0b713a86a3 100644 --- a/tests/vector/vector_58.cc +++ b/tests/vector/vector_58.cc @@ -28,7 +28,7 @@ void fill(Vector &v) { v = 0; - for (unsigned int i = 0; i < v.size(); i++) + for (unsigned int i = 0; i < v.size(); ++i) v(i) = counter + i * 2; ++counter; diff --git a/tests/zoltan/zoltan_02.cc b/tests/zoltan/zoltan_02.cc index fa8cc4559c..21631cc04d 100644 --- a/tests/zoltan/zoltan_02.cc +++ b/tests/zoltan/zoltan_02.cc @@ -76,7 +76,7 @@ main(int argc, char **argv) // color deallog << "Coloring" << std::endl; deallog << "Number of colors used: " << num_colors << std::endl; - for (unsigned int i = 0; i < num_indices; i++) + for (unsigned int i = 0; i < num_indices; ++i) { deallog << i << " " << color_indices[i] << std::endl; } diff --git a/tests/zoltan/zoltan_03.cc b/tests/zoltan/zoltan_03.cc index baf6f3a792..17f073a4cc 100644 --- a/tests/zoltan/zoltan_03.cc +++ b/tests/zoltan/zoltan_03.cc @@ -77,7 +77,7 @@ main(int argc, char **argv) // color deallog << "Coloring" << std::endl; deallog << "Number of colors used: " << num_colors << std::endl; - for (unsigned int i = 0; i < num_indices; i++) + for (unsigned int i = 0; i < num_indices; ++i) { deallog << i << " " << color_indices[i] << std::endl; } diff --git a/tests/zoltan/zoltan_04.cc b/tests/zoltan/zoltan_04.cc index a2d41bb5b4..a68b0c91cb 100644 --- a/tests/zoltan/zoltan_04.cc +++ b/tests/zoltan/zoltan_04.cc @@ -70,7 +70,7 @@ main(int argc, char **argv) // color deallog << "Coloring" << std::endl; deallog << "Number of colors used: " << num_colors << std::endl; - for (unsigned int i = 0; i < num_indices; i++) + for (unsigned int i = 0; i < num_indices; ++i) { deallog << i << " " << color_indices[i] << std::endl; } -- 2.39.5