From b1c277b8e1626739970e4c3037dcabd137fa33e7 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 2 Jan 2024 10:31:54 -0700 Subject: [PATCH] Use prefix ++ universally. --- examples/step-32/step-32.cc | 2 +- examples/step-75/step-75.cc | 4 +- include/deal.II/base/partitioner.templates.h | 4 +- include/deal.II/base/vectorization.h | 2 +- include/deal.II/grid/connectivity.h | 4 +- include/deal.II/hp/collection.h | 2 +- .../lac/affine_constraints.templates.h | 4 +- include/deal.II/lac/block_vector_base.h | 4 +- include/deal.II/lac/la_parallel_vector.h | 4 +- include/deal.II/lac/petsc_matrix_base.h | 4 +- include/deal.II/lac/read_write_vector.h | 4 +- include/deal.II/lac/solver_cg.h | 2 +- include/deal.II/lac/solver_qmrs.h | 4 +- include/deal.II/lac/trilinos_vector.h | 4 +- include/deal.II/lac/vector.h | 4 +- include/deal.II/matrix_free/constraint_info.h | 2 +- include/deal.II/matrix_free/fe_evaluation.h | 4 +- .../deal.II/optimization/line_minimization.h | 4 +- include/deal.II/optimization/solver_bfgs.h | 2 +- include/deal.II/trilinos/nox.templates.h | 2 +- source/base/data_out_base.cc | 4 +- source/base/function_signed_distance.cc | 2 +- .../base/mpi_compute_index_owner_internal.cc | 2 +- source/dofs/dof_handler.cc | 4 +- source/dofs/dof_tools_constraints.cc | 2 +- source/fe/fe_q_bubbles.cc | 2 +- source/fe/fe_q_dg0.cc | 2 +- source/grid/grid_generator.cc | 16 ++++---- source/grid/grid_out.cc | 6 +-- source/grid/grid_tools.cc | 8 ++-- source/grid/grid_tools_dof_handlers.cc | 4 +- source/grid/grid_tools_topology.cc | 4 +- source/grid/tria.cc | 2 +- source/lac/petsc_communication_pattern.cc | 6 +-- source/lac/solver_control.cc | 2 +- source/lac/trilinos_sparse_matrix.cc | 2 +- source/matrix_free/task_info.cc | 38 +++++++++---------- source/numerics/data_out_resample.cc | 2 +- source/numerics/matrix_tools_once.cc | 4 +- source/numerics/point_value_history.cc | 6 +-- source/particles/particle_handler.cc | 8 ++-- source/sundials/ida.cc | 2 +- 42 files changed, 97 insertions(+), 97 deletions(-) diff --git a/examples/step-32/step-32.cc b/examples/step-32/step-32.cc index ff6fef3eda..e8376c9bac 100644 --- a/examples/step-32/step-32.cc +++ b/examples/step-32/step-32.cc @@ -3221,7 +3221,7 @@ namespace Step32 data_out.write_vtu_with_pvtu_record( "./", "solution", out_index, MPI_COMM_WORLD, 5); - out_index++; + ++out_index; } diff --git a/examples/step-75/step-75.cc b/examples/step-75/step-75.cc index 417819f0e9..3a0416154b 100644 --- a/examples/step-75/step-75.cc +++ b/examples/step-75/step-75.cc @@ -733,7 +733,7 @@ namespace Step75 { if (cell->is_locally_owned()) cell->set_active_fe_index(cell_other->active_fe_index()); - cell_other++; + ++cell_other; } } else // coarse level @@ -758,7 +758,7 @@ namespace Step75 cell->set_active_fe_index(fe_index_for_degree[next_degree]); } - cell_other++; + ++cell_other; } } diff --git a/include/deal.II/base/partitioner.templates.h b/include/deal.II/base/partitioner.templates.h index 86132a20dc..c4643a6d06 100644 --- a/include/deal.II/base/partitioner.templates.h +++ b/include/deal.II/base/partitioner.templates.h @@ -709,7 +709,7 @@ namespace Utilities locally_owned_array[j] = internal::get_min(*read_position, locally_owned_array[j]); - read_position++; + ++read_position; } else if (vector_operation == VectorOperation::max) for (const auto &import_range : import_indices_data) @@ -720,7 +720,7 @@ namespace Utilities locally_owned_array[j] = internal::get_max(*read_position, locally_owned_array[j]); - read_position++; + ++read_position; } else for (const auto &import_range : import_indices_data) diff --git a/include/deal.II/base/vectorization.h b/include/deal.II/base/vectorization.h index fc9019b335..ea0bb552bc 100644 --- a/include/deal.II/base/vectorization.h +++ b/include/deal.II/base/vectorization.h @@ -173,7 +173,7 @@ public: operator++() { AssertIndexRange(lane + 1, T::size() + 1); - lane++; + ++lane; return *this; } diff --git a/include/deal.II/grid/connectivity.h b/include/deal.II/grid/connectivity.h index 2bdfff98a0..94a6c36a55 100644 --- a/include/deal.II/grid/connectivity.h +++ b/include/deal.II/grid/connectivity.h @@ -1120,7 +1120,7 @@ namespace internal { ref_key = std::get<0>(keys[i]); - n_unique_entities++; + ++n_unique_entities; n_unique_entity_vertices += cell_types[static_cast( ad_entity_types[offset_i])] @@ -1151,7 +1151,7 @@ namespace internal if (ref_key != std::get<0>(keys[i])) { // new key: default orientation is correct - counter++; + ++counter; ref_key = std::get<0>(keys[i]); ref_indices = ad_entity_vertices[offset_i]; diff --git a/include/deal.II/hp/collection.h b/include/deal.II/hp/collection.h index 8c342ea5b6..e6374a96af 100644 --- a/include/deal.II/hp/collection.h +++ b/include/deal.II/hp/collection.h @@ -104,7 +104,7 @@ namespace hp operator++() { AssertIndexRange(index + 1, data->size() + 1); - index++; + ++index; return *this; } diff --git a/include/deal.II/lac/affine_constraints.templates.h b/include/deal.II/lac/affine_constraints.templates.h index fe265b8594..2fba32511c 100644 --- a/include/deal.II/lac/affine_constraints.templates.h +++ b/include/deal.II/lac/affine_constraints.templates.h @@ -427,7 +427,7 @@ namespace internal for (const auto &i : constrained_indices_by_ranks) if (i.first != my_rank) - n_rec_ranks++; + ++n_rec_ranks; for (unsigned int i = 0; i < n_rec_ranks; ++i) { @@ -3246,7 +3246,7 @@ namespace internal Assert(i >= n_inhomogeneous_rows, ExcInternalError()); std::swap(total_row_indices[n_active_rows + i], total_row_indices[n_active_rows + n_inhomogeneous_rows]); - n_inhomogeneous_rows++; + ++n_inhomogeneous_rows; } diff --git a/include/deal.II/lac/block_vector_base.h b/include/deal.II/lac/block_vector_base.h index d719085526..ffacac419f 100644 --- a/include/deal.II/lac/block_vector_base.h +++ b/include/deal.II/lac/block_vector_base.h @@ -2179,8 +2179,8 @@ BlockVectorBase::extract_subvector_to( while (indices_begin != indices_end) { *values_begin = operator()(*indices_begin); - indices_begin++; - values_begin++; + ++indices_begin; + ++values_begin; } } diff --git a/include/deal.II/lac/la_parallel_vector.h b/include/deal.II/lac/la_parallel_vector.h index 215de86a86..688c422686 100644 --- a/include/deal.II/lac/la_parallel_vector.h +++ b/include/deal.II/lac/la_parallel_vector.h @@ -1687,8 +1687,8 @@ namespace LinearAlgebra while (indices_begin != indices_end) { *values_begin = operator()(*indices_begin); - indices_begin++; - values_begin++; + ++indices_begin; + ++values_begin; } } diff --git a/include/deal.II/lac/petsc_matrix_base.h b/include/deal.II/lac/petsc_matrix_base.h index f715bfdac6..dd5a750ec1 100644 --- a/include/deal.II/lac/petsc_matrix_base.h +++ b/include/deal.II/lac/petsc_matrix_base.h @@ -1373,7 +1373,7 @@ namespace PETScWrappers { column_indices[n_columns] = col_indices[j]; column_values[n_columns] = value; - n_columns++; + ++n_columns; } } AssertIndexRange(n_columns, n_cols + 1); @@ -1517,7 +1517,7 @@ namespace PETScWrappers { column_indices[n_columns] = col_indices[j]; column_values[n_columns] = value; - n_columns++; + ++n_columns; } } AssertIndexRange(n_columns, n_cols + 1); diff --git a/include/deal.II/lac/read_write_vector.h b/include/deal.II/lac/read_write_vector.h index 0fae3f43c0..8effad5f4e 100644 --- a/include/deal.II/lac/read_write_vector.h +++ b/include/deal.II/lac/read_write_vector.h @@ -1063,8 +1063,8 @@ namespace LinearAlgebra while (indices_begin != indices_end) { *values_begin = operator()(*indices_begin); - indices_begin++; - values_begin++; + ++indices_begin; + ++values_begin; } } diff --git a/include/deal.II/lac/solver_cg.h b/include/deal.II/lac/solver_cg.h index fc2c5485a8..2da1ef44b8 100644 --- a/include/deal.II/lac/solver_cg.h +++ b/include/deal.II/lac/solver_cg.h @@ -1298,7 +1298,7 @@ SolverCG::solve(const MatrixType &A, while (solver_state == SolverControl::iterate) { - it++; + ++it; worker.do_iteration(it); diff --git a/include/deal.II/lac/solver_qmrs.h b/include/deal.II/lac/solver_qmrs.h index 1e05d8e59c..dd4f42753f 100644 --- a/include/deal.II/lac/solver_qmrs.h +++ b/include/deal.II/lac/solver_qmrs.h @@ -371,8 +371,8 @@ SolverQMRS::iterate(const MatrixType &A, while (state == SolverControl::iterate) { - step++; - it++; + ++step; + ++it; //-------------------------------------------------------------- // Step 1: apply the system matrix and compute one inner product //-------------------------------------------------------------- diff --git a/include/deal.II/lac/trilinos_vector.h b/include/deal.II/lac/trilinos_vector.h index 20347cc1b4..fdf33ee866 100644 --- a/include/deal.II/lac/trilinos_vector.h +++ b/include/deal.II/lac/trilinos_vector.h @@ -1573,8 +1573,8 @@ namespace TrilinosWrappers while (indices_begin != indices_end) { *values_begin = operator()(*indices_begin); - indices_begin++; - values_begin++; + ++indices_begin; + ++values_begin; } } diff --git a/include/deal.II/lac/vector.h b/include/deal.II/lac/vector.h index 60ece3d0aa..36b9fefc2b 100644 --- a/include/deal.II/lac/vector.h +++ b/include/deal.II/lac/vector.h @@ -1255,8 +1255,8 @@ Vector::extract_subvector_to(ForwardIterator indices_begin, while (indices_begin != indices_end) { *values_begin = operator()(*indices_begin); - indices_begin++; - values_begin++; + ++indices_begin; + ++values_begin; } } diff --git a/include/deal.II/matrix_free/constraint_info.h b/include/deal.II/matrix_free/constraint_info.h index d3c7d7727c..77afa5b41d 100644 --- a/include/deal.II/matrix_free/constraint_info.h +++ b/include/deal.II/matrix_free/constraint_info.h @@ -641,7 +641,7 @@ namespace internal value); operation.post_constraints(value, local_vector[ind_local][v]); - ind_local++; + ++ind_local; } AssertIndexRange(ind_local, n_dofs_per_cell + 1); diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index 92a43ad4a8..6f42a6809d 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -3631,7 +3631,7 @@ FEEvaluationBase:: for (unsigned int comp = 0; comp < n_components; ++comp) operation.post_constraints(value[comp], values_dofs[comp][ind_local][v]); - ind_local++; + ++ind_local; } AssertIndexRange(ind_local, dofs_per_component + 1); @@ -3687,7 +3687,7 @@ FEEvaluationBase:: operation.post_constraints(value, values_dofs[comp][ind_local][v]); - ind_local++; + ++ind_local; } AssertIndexRange(ind_local, dofs_per_component + 1); diff --git a/include/deal.II/optimization/line_minimization.h b/include/deal.II/optimization/line_minimization.h index 82227fa59c..6e682aa6c3 100644 --- a/include/deal.II/optimization/line_minimization.h +++ b/include/deal.II/optimization/line_minimization.h @@ -596,7 +596,7 @@ namespace LineMinimization const auto fgi = func(ai); fi = fgi.first; gi = fgi.second; - i++; + ++i; if (debug_output) deallog << "Bracketing phase: " << i << std::endl @@ -704,7 +704,7 @@ namespace LineMinimization const std::pair fgi = func(ai); fi = fgi.first; gi = fgi.second; - i++; + ++i; if (debug_output) deallog << "Sectioning phase: " << i << std::endl diff --git a/include/deal.II/optimization/solver_bfgs.h b/include/deal.II/optimization/solver_bfgs.h index 81a21d771f..4822a128f0 100644 --- a/include/deal.II/optimization/solver_bfgs.h +++ b/include/deal.II/optimization/solver_bfgs.h @@ -372,7 +372,7 @@ SolverBFGS::solve( deallog << "Line search a=" << alpha << " f=" << f << std::endl; // 3. Check convergence - k++; + ++k; const Number g_l2 = g.l2_norm(); conv = this->iteration_status(k, g_l2, x); if (conv != SolverControl::iterate) diff --git a/include/deal.II/trilinos/nox.templates.h b/include/deal.II/trilinos/nox.templates.h index fca727f2b1..6d86f03462 100644 --- a/include/deal.II/trilinos/nox.templates.h +++ b/include/deal.II/trilinos/nox.templates.h @@ -985,7 +985,7 @@ namespace TrilinosWrappers ExcMessage( "No residual function has been attached to the NOXSolver object.")); - n_residual_evaluations++; + ++n_residual_evaluations; // evaluate residual return internal::NOXWrappers::call_and_possibly_capture_exception( diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index b0f60a5e82..78863bb887 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -7174,7 +7174,7 @@ namespace DataOutBase << "\" style=\"stroke:black; fill:url(#" << triangle_counter << "); stroke-width:" << flags.line_thickness << "\"/>" << '\n'; - triangle_counter++; + ++triangle_counter; } } @@ -8593,7 +8593,7 @@ DataOutBase::write_filtered_data( // Advance n_th_vector to at least the current data set we are on while (n_th_vector < nonscalar_data_ranges.size() && std::get<0>(nonscalar_data_ranges[n_th_vector]) < data_set) - n_th_vector++; + ++n_th_vector; // Determine the dimension of this data if (n_th_vector < nonscalar_data_ranges.size() && diff --git a/source/base/function_signed_distance.cc b/source/base/function_signed_distance.cc index a7de839c63..d0d7ee6177 100644 --- a/source/base/function_signed_distance.cc +++ b/source/base/function_signed_distance.cc @@ -269,7 +269,7 @@ namespace Functions t = std::min(numbers::PI_2, std::max(0.0, t)); x = a * std::cos(t); y = b * std::sin(t); - iter++; + ++iter; } while (std::abs(delta_t) > tolerance && iter < max_iter); AssertIndexRange(iter, max_iter); diff --git a/source/base/mpi_compute_index_owner_internal.cc b/source/base/mpi_compute_index_owner_internal.cc index a147963e3e..ef3fd7300d 100644 --- a/source/base/mpi_compute_index_owner_internal.cc +++ b/source/base/mpi_compute_index_owner_internal.cc @@ -529,7 +529,7 @@ namespace Utilities indices.first.push_back(i); indices.second.push_back(index); } - index++; + ++index; } Assert(targets.size() == indices_to_look_up_by_dict_rank.size(), diff --git a/source/dofs/dof_handler.cc b/source/dofs/dof_handler.cc index 94bea20d69..bd299bbe8a 100644 --- a/source/dofs/dof_handler.cc +++ b/source/dofs/dof_handler.cc @@ -761,7 +761,7 @@ namespace internal ++fe) if (vertex_fe_association[fe][v] == true) { - fe_slots_needed++; + ++fe_slots_needed; vertex_slots_needed += dof_handler.get_fe(fe).n_dofs_per_vertex(); } @@ -1202,7 +1202,7 @@ namespace internal ++fe) if (line_fe_association[fe][line] == true) { - fe_slots_needed++; + ++fe_slots_needed; line_slots_needed += dof_handler.get_fe(fe).n_dofs_per_line(); } diff --git a/source/dofs/dof_tools_constraints.cc b/source/dofs/dof_tools_constraints.cc index 518a2ecf63..baa9d26030 100644 --- a/source/dofs/dof_tools_constraints.cc +++ b/source/dofs/dof_tools_constraints.cc @@ -2308,7 +2308,7 @@ namespace DoFTools vector_dofs[fe.face_system_to_component_index(k, face_no) .first - first_vector_component] = k; - n_found++; + ++n_found; if (n_found == dim) break; } diff --git a/source/fe/fe_q_bubbles.cc b/source/fe/fe_q_bubbles.cc index ef72b4cd71..bb5e976090 100644 --- a/source/fe/fe_q_bubbles.cc +++ b/source/fe/fe_q_bubbles.cc @@ -293,7 +293,7 @@ FE_Q_Bubbles::get_name() const else points[index - 1] = unit_support_points[j](0); - index++; + ++index; } } // Do not consider the discontinuous node for dimension 1 diff --git a/source/fe/fe_q_dg0.cc b/source/fe/fe_q_dg0.cc index 5161c294dd..e5e898233b 100644 --- a/source/fe/fe_q_dg0.cc +++ b/source/fe/fe_q_dg0.cc @@ -119,7 +119,7 @@ FE_Q_DG0::get_name() const else points[index - 1] = unit_support_points[j](0); - index++; + ++index; } } // Do not consider the discontinuous node for dimension 1 diff --git a/source/grid/grid_generator.cc b/source/grid/grid_generator.cc index 29656d165f..f598404ba2 100644 --- a/source/grid/grid_generator.cc +++ b/source/grid/grid_generator.cc @@ -2909,7 +2909,7 @@ namespace GridGenerator unsigned int n_val_cells = 0; for (unsigned int i = 0; i < n_cells; ++i) if (material_id[i] != numbers::invalid_material_id) - n_val_cells++; + ++n_val_cells; std::vector> cells(n_val_cells); unsigned int id = 0; @@ -2919,7 +2919,7 @@ namespace GridGenerator cells[id].vertices[0] = x; cells[id].vertices[1] = x + 1; cells[id].material_id = material_id[x]; - id++; + ++id; } // create triangulation SubCellData t; @@ -2978,7 +2978,7 @@ namespace GridGenerator for (unsigned int i = 0; i < material_id.size(0); ++i) for (unsigned int j = 0; j < material_id.size(1); ++j) if (material_id[i][j] != numbers::invalid_material_id) - n_val_cells++; + ++n_val_cells; std::vector> cells(n_val_cells); unsigned int id = 0; @@ -2991,7 +2991,7 @@ namespace GridGenerator cells[id].vertices[2] = (y + 1) * (repetitions[0] + 1) + x; cells[id].vertices[3] = (y + 1) * (repetitions[0] + 1) + x + 1; cells[id].material_id = material_id[x][y]; - id++; + ++id; } // create triangulation @@ -3079,7 +3079,7 @@ namespace GridGenerator for (unsigned int j = 0; j < material_id.size(1); ++j) for (unsigned int k = 0; k < material_id.size(2); ++k) if (material_id[i][j][k] != numbers::invalid_material_id) - n_val_cells++; + ++n_val_cells; std::vector> cells(n_val_cells); unsigned int id = 0; @@ -3099,7 +3099,7 @@ namespace GridGenerator cells[id].vertices[6] = (z + 1) * n_xy + (y + 1) * n_x + x; cells[id].vertices[7] = (z + 1) * n_xy + (y + 1) * n_x + x + 1; cells[id].material_id = material_id[x][y][z]; - id++; + ++id; } // create triangulation @@ -4215,12 +4215,12 @@ namespace GridGenerator cell->face(0)->set_boundary_id(0); cell->face(2)->set_boundary_id(1); - cell++; + ++cell; cell->face(1)->set_boundary_id(2); cell->face(2)->set_boundary_id(1); cell->face(3)->set_boundary_id(3); - cell++; + ++cell; cell->face(0)->set_boundary_id(0); cell->face(1)->set_boundary_id(4); diff --git a/source/grid/grid_out.cc b/source/grid/grid_out.cc index 203083bc25..d29d6b21d2 100644 --- a/source/grid/grid_out.cc +++ b/source/grid/grid_out.cc @@ -2213,7 +2213,7 @@ GridOut::write_svg(const Triangulation<2, 2> &tria, std::ostream &out) const << "stroke:rgb(25,25,25); stroke-width:" << svg_flags.line_thickness << '}' << '\n'; - labeling_index++; + ++labeling_index; } } @@ -2956,7 +2956,7 @@ GridOut::write_svg(const Triangulation<2, 2> &tria, std::ostream &out) const out << "" << '\n'; - labeling_index++; + ++labeling_index; } } @@ -3784,7 +3784,7 @@ GridOut::n_boundary_faces(const Triangulation &tria) const for (const auto &face : tria.active_face_iterators()) if ((face->at_boundary()) && (face->boundary_id() != 0)) - n_faces++; + ++n_faces; return n_faces; } diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index 43b778a793..4997ff1756 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -3038,7 +3038,7 @@ namespace GridTools unsigned int boundary_face_counter = 0; for (auto f : cell->face_indices()) if (cell->face(f)->at_boundary()) - boundary_face_counter++; + ++boundary_face_counter; if (boundary_face_counter > dim) { has_cells_with_more_than_dim_faces_on_boundary = true; @@ -3050,14 +3050,14 @@ namespace GridTools if (has_cells_with_more_than_dim_faces_on_boundary) { tria.refine_global(1); - refinement_cycles++; + ++refinement_cycles; } } if (has_cells_with_dim_faces_on_boundary) { tria.refine_global(1); - refinement_cycles++; + ++refinement_cycles; } else { @@ -5025,7 +5025,7 @@ namespace GridTools vertex_list_reduced[local_vertex_count] = vertex_list_all[new_line_table[configuration][i]]; local_remap[new_line_table[configuration][i]] = local_vertex_count; - local_vertex_count++; + ++local_vertex_count; } // write back vertices diff --git a/source/grid/grid_tools_dof_handlers.cc b/source/grid/grid_tools_dof_handlers.cc index ca9232c1d7..4c6d30cc3d 100644 --- a/source/grid/grid_tools_dof_handlers.cc +++ b/source/grid/grid_tools_dof_handlers.cc @@ -711,7 +711,7 @@ namespace GridTools vertex_indices[count_vertex_indices].first = d; vertex_indices[count_vertex_indices].second = unit_point[d] > 0.5 ? 1 : 0; - count_vertex_indices++; + ++count_vertex_indices; } else free_direction = d; @@ -985,7 +985,7 @@ namespace GridTools { for (const unsigned int v : cell->vertex_indices()) vertices_outside_subdomain[cell->vertex_index(v)] = true; - n_non_predicate_cells++; + ++n_non_predicate_cells; } // If all the active cells conform to the predicate diff --git a/source/grid/grid_tools_topology.cc b/source/grid/grid_tools_topology.cc index 3e0b329e58..a7a501d0db 100644 --- a/source/grid/grid_tools_topology.cc +++ b/source/grid/grid_tools_topology.cc @@ -1684,7 +1684,7 @@ namespace GridTools while (continue_refinement && (iter < max_iterations)) { if (max_iterations != numbers::invalid_unsigned_int) - iter++; + ++iter; continue_refinement = false; for (const auto &cell : tria.active_cell_iterators()) @@ -1718,7 +1718,7 @@ namespace GridTools while (continue_refinement && (iter < max_iterations)) { - iter++; + ++iter; continue_refinement = false; for (const auto &cell : tria.active_cell_iterators()) { diff --git a/source/grid/tria.cc b/source/grid/tria.cc index 3db640cb6e..f1e48f669c 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -3561,7 +3561,7 @@ namespace internal subcell_object->vertices != key) continue; - counter++; + ++counter; // set manifold id manifold_id = subcell_object->manifold_id; diff --git a/source/lac/petsc_communication_pattern.cc b/source/lac/petsc_communication_pattern.cc index 88a93ccfae..563a1d2bef 100644 --- a/source/lac/petsc_communication_pattern.cc +++ b/source/lac/petsc_communication_pattern.cc @@ -129,7 +129,7 @@ namespace PETScWrappers } else has_invalid = true; - loc++; + ++loc; } if (!has_invalid) indices_has_loc.clear(); @@ -145,7 +145,7 @@ namespace PETScWrappers } else has_invalid = true; - loc++; + ++loc; } if (!has_invalid) indices_want_loc.clear(); @@ -215,7 +215,7 @@ namespace PETScWrappers } remotes[cnt].rank = owner; remotes[cnt].index = idx - ranges[owner]; - cnt++; + ++cnt; } AssertPETSc(PetscSFCreate(communicator, &sf2)); diff --git a/source/lac/solver_control.cc b/source/lac/solver_control.cc index ecf626a743..074e21e53a 100644 --- a/source/lac/solver_control.cc +++ b/source/lac/solver_control.cc @@ -401,7 +401,7 @@ ConsecutiveControl::check(const unsigned int step, const double check_value) // check if we need to override the success: if (state == success) { - n_converged_iterations++; + ++n_converged_iterations; if (n_converged_iterations == n_consecutive_iterations) { return success; diff --git a/source/lac/trilinos_sparse_matrix.cc b/source/lac/trilinos_sparse_matrix.cc index 231e9e3f83..4de2f286ae 100644 --- a/source/lac/trilinos_sparse_matrix.cc +++ b/source/lac/trilinos_sparse_matrix.cc @@ -1455,7 +1455,7 @@ namespace TrilinosWrappers { local_index_array[n_columns] = col_indices[j]; local_value_array[n_columns] = value; - n_columns++; + ++n_columns; } } diff --git a/source/matrix_free/task_info.cc b/source/matrix_free/task_info.cc index ab3090bc14..936b5eef13 100644 --- a/source/matrix_free/task_info.cc +++ b/source/matrix_free/task_info.cc @@ -473,12 +473,12 @@ namespace internal slice_index, *this, false); - slice_index++; + ++slice_index; for (; slice_index < partition_row_index[part + 1]; slice_index++) { worker[worker_index]->set_ref_count(1); - worker_index++; + ++worker_index; worker[worker_index] = new (worker[worker_index - 1]->allocate_child()) color::PartitionWork(funct, @@ -492,7 +492,7 @@ namespace internal blocked_worker[(part - 1) / 2]->dummy = new (worker[worker_index]->allocate_child()) tbb::empty_task; - worker_index++; + ++worker_index; if (spawn_index_child == -1) tbb::task::spawn(*blocked_worker[(part - 1) / 2]); else @@ -509,7 +509,7 @@ namespace internal new (worker[worker_index]->allocate_child()) MPICommunication(funct, false); tbb::task::spawn(*worker_dist); - worker_index++; + ++worker_index; } part += 1; if (part < partition_row_index.size() - 1) @@ -522,7 +522,7 @@ namespace internal slice_index, *this, true); - slice_index++; + ++slice_index; if (slice_index < partition_row_index[part + 1]) { blocked_worker[part / 2]->set_ref_count(1); @@ -532,7 +532,7 @@ namespace internal slice_index, *this, false); - slice_index++; + ++slice_index; } else { @@ -546,7 +546,7 @@ namespace internal if (slice_index > partition_row_index[part]) { worker[worker_index]->set_ref_count(1); - worker_index++; + ++worker_index; } worker[worker_index] = new (worker[worker_index - 1]->allocate_child()) @@ -556,7 +556,7 @@ namespace internal false); } spawn_index_child = worker_index; - worker_index++; + ++worker_index; } else { @@ -1778,7 +1778,7 @@ namespace internal partition_list[start_up]); partition_partition_list[counter++] = partition_list[start_up]; - start_up++; + ++start_up; break; } } @@ -1805,7 +1805,7 @@ namespace internal neighbor_it->column()); partition_partition_list[counter++] = neighbor_it->column(); - partition_counter++; + ++partition_counter; } } } @@ -1862,7 +1862,7 @@ namespace internal if (remaining_per_cell_batch[0] != 0) { filled = false; - missing_macros++; + ++missing_macros; } } missing_macros = @@ -1928,8 +1928,8 @@ namespace internal .push_back(neighbor->column()); partition_partition_list[counter] = neighbor->column(); - counter++; - partition_counter++; + ++counter; + ++partition_counter; if (remaining_per_cell_batch [this_index] == 0 && missing_macros > 0) @@ -1992,7 +1992,7 @@ namespace internal { irregular_cells[n_cell_batches_before] = partition_counter % vectorization_length; - n_cell_batches_before++; + ++n_cell_batches_before; } } } @@ -2072,7 +2072,7 @@ namespace internal for (unsigned int color = 0; color <= max_color; ++color) { cell_partition_data.push_back(color_counter); - index_counter++; + ++index_counter; for (unsigned int k = partition_size[part]; k < partition_size[part + 1]; k++) @@ -2179,7 +2179,7 @@ namespace internal neighbor_list.push_back(start_up); partition_list[counter++] = start_up; partition_size.back()++; - start_up++; + ++start_up; remainder--; if (remainder == cluster_size) remainder = 0; @@ -2223,7 +2223,7 @@ namespace internal while (neighbor_list.size() > 0) { - partition++; + ++partition; // counter for number of cells so far in current partition unsigned int partition_counter = 0; @@ -2251,7 +2251,7 @@ namespace internal // use as neighbors in next partition neighbor_neighbor_list.push_back(neighbor->column()); partition_list[counter++] = neighbor->column(); - partition_counter++; + ++partition_counter; } } } @@ -2315,7 +2315,7 @@ namespace internal } } if (remainder != 0) - partition++; + ++partition; AssertDimension(partition_size[partition], n_blocks); } diff --git a/source/numerics/data_out_resample.cc b/source/numerics/data_out_resample.cc index df7f7abf8e..9a0166f1dd 100644 --- a/source/numerics/data_out_resample.cc +++ b/source/numerics/data_out_resample.cc @@ -185,7 +185,7 @@ DataOutResample::build_patches( DataOut_DoFData:: DataVectorType::type_dof_data); - counter++; + ++counter; } } diff --git a/source/numerics/matrix_tools_once.cc b/source/numerics/matrix_tools_once.cc index 92d3b25d72..60052d3777 100644 --- a/source/numerics/matrix_tools_once.cc +++ b/source/numerics/matrix_tools_once.cc @@ -186,7 +186,7 @@ namespace MatrixTools if (boundary_value.first >= matrix.block(block, 0).m() + offset) { offset += matrix.block(block, 0).m(); - block++; + ++block; } const types::global_dof_index index = boundary_value.first - offset; block_boundary_values[block].insert( @@ -368,7 +368,7 @@ namespace MatrixTools if (boundary_value.first >= matrix.block(block, 0).m() + offset) { offset += matrix.block(block, 0).m(); - block++; + ++block; } const types::global_dof_index index = boundary_value.first - offset; diff --git a/source/numerics/point_value_history.cc b/source/numerics/point_value_history.cc index 9d36090e66..a9c260e980 100644 --- a/source/numerics/point_value_history.cc +++ b/source/numerics/point_value_history.cc @@ -633,7 +633,7 @@ PointValueHistory::evaluate_field(const std::string &vector_name, .push_back( internal::ElementAccess::get(solution, solution_index)); - store_index++; + ++store_index; } } } @@ -864,7 +864,7 @@ PointValueHistory::evaluate_field( data_store_field ->second[data_store_index * n_stored + store_index] .push_back(computed_quantities[0](comp)); - store_index++; + ++store_index; } } } @@ -952,7 +952,7 @@ PointValueHistory::evaluate_field_at_requested_location( data_store_field ->second[data_store_index * n_stored + store_index] .push_back(value(comp)); - store_index++; + ++store_index; } } } diff --git a/source/particles/particle_handler.cc b/source/particles/particle_handler.cc index 197bcb853c..f0e21a920f 100644 --- a/source/particles/particle_handler.cc +++ b/source/particles/particle_handler.cc @@ -1851,7 +1851,7 @@ namespace Particles parallel_triangulation->get_communicator(), &(requests[send_ops])); AssertThrowMPI(ierr); - send_ops++; + ++send_ops; } for (unsigned int i = 0; i < n_neighbors; ++i) @@ -1866,7 +1866,7 @@ namespace Particles parallel_triangulation->get_communicator(), &(requests[send_ops + recv_ops])); AssertThrowMPI(ierr); - recv_ops++; + ++recv_ops; } const int ierr = MPI_Waitall(send_ops + recv_ops, requests.data(), MPI_STATUSES_IGNORE); @@ -2009,7 +2009,7 @@ namespace Particles parallel_triangulation->get_communicator(), &(requests[send_ops])); AssertThrowMPI(ierr); - send_ops++; + ++send_ops; } for (unsigned int i = 0; i < neighbors.size(); ++i) @@ -2024,7 +2024,7 @@ namespace Particles parallel_triangulation->get_communicator(), &(requests[send_ops + recv_ops])); AssertThrowMPI(ierr); - recv_ops++; + ++recv_ops; } const int ierr = MPI_Waitall(send_ops + recv_ops, requests.data(), MPI_STATUSES_IGNORE); diff --git a/source/sundials/ida.cc b/source/sundials/ida.cc index 6d57319cb7..bac6cab459 100644 --- a/source/sundials/ida.cc +++ b/source/sundials/ida.cc @@ -166,7 +166,7 @@ namespace SUNDIALS while (solver_should_restart(t, solution, solution_dot)) reset(t, h, solution, solution_dot); - step_number++; + ++step_number; output_step(t, solution, solution_dot, step_number); } -- 2.39.5