]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Indent 15645/head
authorBruno Blais <blais.bruno@gmail.com>
Tue, 4 Jul 2023 16:49:27 +0000 (12:49 -0400)
committerBruno Blais <blais.bruno@gmail.com>
Tue, 4 Jul 2023 16:49:27 +0000 (12:49 -0400)
examples/step-68/step-68.cc
tests/performance/timing_step_68.cc

index dc70cc20f120725d2df455fec2551e2d1fd16ea0..f8ef37a541c041d8e9c45c76bec51b27d41fe520 100644 (file)
@@ -568,31 +568,31 @@ namespace Step68
         Assert(pic.begin() == particle, ExcInternalError());
         std::vector<Point<dim>> 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<dim> 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<double> 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<dim>            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<double> 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);
+          }
       }
   }
 
index 5a0fff6dcc26d5ff3d51d8c48bada93f8e1c213f..2af9b2c200e676288cd96831fb809bf825195f55 100644 (file)
@@ -321,7 +321,8 @@ namespace Step68
   }
 
   template <int dim>
-  void ParticleTracking<dim>::euler_step_interpolated(const double dt)
+  void
+  ParticleTracking<dim>::euler_step_interpolated(const double dt)
   {
     Vector<double> local_dof_values(fluid_fe.dofs_per_cell);
 
@@ -340,35 +341,33 @@ namespace Step68
         Assert(pic.begin() == particle, ExcInternalError());
         std::vector<Point<dim>> 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<dim> 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<double> 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<dim>            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<double> 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 <int dim>
   void
   ParticleTracking<dim>::output_particles()

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.