From 50da03efa670ce30edd5a561dd8c6171bbfb1e01 Mon Sep 17 00:00:00 2001 From: Bruno Blais Date: Tue, 4 Jul 2023 12:49:27 -0400 Subject: [PATCH] Indent --- examples/step-68/step-68.cc | 40 ++++++++++++++-------------- tests/performance/timing_step_68.cc | 41 ++++++++++++++--------------- 2 files changed, 40 insertions(+), 41 deletions(-) diff --git a/examples/step-68/step-68.cc b/examples/step-68/step-68.cc index dc70cc20f1..f8ef37a541 100644 --- a/examples/step-68/step-68.cc +++ b/examples/step-68/step-68.cc @@ -568,31 +568,31 @@ namespace Step68 Assert(pic.begin() == particle, ExcInternalError()); std::vector> particle_positions; for (auto &p : pic) - particle_positions.push_back(p.get_reference_location()); + particle_positions.push_back(p.get_reference_location()); evaluator.reinit(cell, particle_positions); evaluator.evaluate(make_array_view(local_dof_values), - EvaluationFlags::values); + EvaluationFlags::values); // We move the particles using the interpolated velocity field - for (unsigned int particle_index = 0; - particle != pic.end(); - ++particle, ++particle_index) - { - Point particle_location = particle->get_location(); - const Tensor<1, dim> &particle_velocity = evaluator.get_value(particle_index) ; - particle_location += particle_velocity*dt; - particle->set_location(particle_location); - - // Again, we store the particle velocity and the processor id in the - // particle properties for visualization purposes. - ArrayView properties = particle->get_properties(); - for (int d = 0; d < dim; ++d) - properties[d] = particle_velocity[d]; - - properties[dim] = - Utilities::MPI::this_mpi_process(mpi_communicator); - } + for (unsigned int particle_index = 0; particle != pic.end(); + ++particle, ++particle_index) + { + Point particle_location = particle->get_location(); + const Tensor<1, dim> &particle_velocity = + evaluator.get_value(particle_index); + particle_location += particle_velocity * dt; + particle->set_location(particle_location); + + // Again, we store the particle velocity and the processor id in the + // particle properties for visualization purposes. + ArrayView properties = particle->get_properties(); + for (int d = 0; d < dim; ++d) + properties[d] = particle_velocity[d]; + + properties[dim] = + Utilities::MPI::this_mpi_process(mpi_communicator); + } } } diff --git a/tests/performance/timing_step_68.cc b/tests/performance/timing_step_68.cc index 5a0fff6dcc..2af9b2c200 100644 --- a/tests/performance/timing_step_68.cc +++ b/tests/performance/timing_step_68.cc @@ -321,7 +321,8 @@ namespace Step68 } template - void ParticleTracking::euler_step_interpolated(const double dt) + void + ParticleTracking::euler_step_interpolated(const double dt) { Vector local_dof_values(fluid_fe.dofs_per_cell); @@ -340,35 +341,33 @@ namespace Step68 Assert(pic.begin() == particle, ExcInternalError()); std::vector> particle_positions; for (auto &p : pic) - particle_positions.push_back(p.get_reference_location()); + particle_positions.push_back(p.get_reference_location()); evaluator.reinit(cell, particle_positions); evaluator.evaluate(make_array_view(local_dof_values), - EvaluationFlags::values); - - for (unsigned int particle_index = 0; - particle != pic.end(); - ++particle, ++particle_index) - { - Point particle_location = particle->get_location(); - const Tensor<1, dim> &particle_velocity = evaluator.get_value(particle_index) ; - particle_location += particle_velocity*dt; - particle->set_location(particle_location); + EvaluationFlags::values); - ArrayView properties = particle->get_properties(); - for (int d = 0; d < dim; ++d) - properties[d] = particle_velocity[d]; - - properties[dim] = - Utilities::MPI::this_mpi_process(mpi_communicator); - } + for (unsigned int particle_index = 0; particle != pic.end(); + ++particle, ++particle_index) + { + Point particle_location = particle->get_location(); + const Tensor<1, dim> &particle_velocity = + evaluator.get_value(particle_index); + particle_location += particle_velocity * dt; + particle->set_location(particle_location); + + ArrayView properties = particle->get_properties(); + for (int d = 0; d < dim; ++d) + properties[d] = particle_velocity[d]; + + properties[dim] = + Utilities::MPI::this_mpi_process(mpi_communicator); + } } } - - template void ParticleTracking::output_particles() -- 2.39.5