]> https://gitweb.dealii.org/ - dealii.git/commitdiff
"n_locally_owned_particle_ids() -> n_locally_owned_particles() 12138/head
authorPeter Munch <peterrmuench@gmail.com>
Tue, 4 May 2021 18:51:11 +0000 (20:51 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Tue, 4 May 2021 18:51:11 +0000 (20:51 +0200)
12 files changed:
include/deal.II/particles/particle_handler.h
include/deal.II/particles/utilities.h
source/particles/data_out.cc
source/particles/particle_handler.cc
source/particles/utilities.cc
tests/particles/interpolate_on_particle_01.cc
tests/particles/particle_interpolation_01.cc
tests/particles/particle_interpolation_02.cc
tests/particles/particle_interpolation_03.cc
tests/particles/particle_interpolation_04.cc
tests/particles/particle_interpolation_05.cc
tests/particles/set_particle_positions_02.cc

index 87f8c1e444cdc4ff1ffb6321db77fba48d951c85..da073418d6a28640b60a8010283161429996fe15 100644 (file)
@@ -497,7 +497,7 @@ namespace Particles
      * get_particle_positions() function, and then modify the resulting vector.
      *
      * @param [in] new_positions A vector of points of dimension
-     * particle_handler.n_locally_owned_particle_ids()
+     * particle_handler.n_locally_owned_particles()
      *
      * @param [in] displace_particles When true, this function adds the value
      * of the vector of points to the
@@ -641,7 +641,7 @@ namespace Particles
      * triangulation.
      */
     types::particle_index
-    n_locally_owned_particle_ids() const;
+    n_locally_owned_particles() const;
 
     /**
      * Return the next free particle index in the global set
index b6721504a8a8347be9f1dccb728dcde5b8252521..3b60163226f69f9926009d288cabc6b887aeb478 100644 (file)
@@ -191,7 +191,7 @@ namespace Particles
       OutputVectorType &                               interpolated_field,
       const ComponentMask &field_comps = ComponentMask())
     {
-      if (particle_handler.n_locally_owned_particle_ids() == 0)
+      if (particle_handler.n_locally_owned_particles() == 0)
         {
           interpolated_field.compress(VectorOperation::add);
           return; // nothing else to do here
index b3de65897941c95fbd23a84caa366fa619b4319c..9c016d5f0635d911e35c4d6deeef3312b1952554 100644 (file)
@@ -40,7 +40,7 @@ namespace Particles
         "belong to a single vector or tensor."));
 
     if ((data_component_names.size() > 0) &&
-        (particles.n_locally_owned_particle_ids() > 0))
+        (particles.n_locally_owned_particles() > 0))
       {
         Assert(
           particles.begin()->has_properties(),
@@ -75,7 +75,7 @@ namespace Particles
     const unsigned int n_property_components = data_component_names.size();
     const unsigned int n_data_components     = dataset_names.size();
 
-    patches.resize(particles.n_locally_owned_particle_ids());
+    patches.resize(particles.n_locally_owned_particles());
 
     auto particle = particles.begin();
     for (unsigned int i = 0; particle != particles.end(); ++particle, ++i)
index db3be2639566c285ed3e512062afa614b67afe31..92d8d5961335eb25d374845bbfacfc32fd30a544 100644 (file)
@@ -767,7 +767,7 @@ namespace Particles
 
   template <int dim, int spacedim>
   types::particle_index
-  ParticleHandler<dim, spacedim>::n_locally_owned_particle_ids() const
+  ParticleHandler<dim, spacedim>::n_locally_owned_particles() const
   {
     return particles.size();
   }
@@ -812,7 +812,7 @@ namespace Particles
     const bool                    add_to_output_vector)
   {
     // There should be one point per particle to gather
-    AssertDimension(positions.size(), n_locally_owned_particle_ids());
+    AssertDimension(positions.size(), n_locally_owned_particles());
 
     unsigned int i = 0;
     for (auto it = begin(); it != end(); ++it, ++i)
@@ -833,7 +833,7 @@ namespace Particles
     const bool                          displace_particles)
   {
     // There should be one point per particle to fix the new position
-    AssertDimension(new_positions.size(), n_locally_owned_particle_ids());
+    AssertDimension(new_positions.size(), n_locally_owned_particles());
 
     unsigned int i = 0;
     for (auto it = begin(); it != end(); ++it, ++i)
@@ -929,7 +929,7 @@ namespace Particles
     // processes around (with an invalid cell).
 
     std::vector<particle_iterator> particles_out_of_cell;
-    particles_out_of_cell.reserve(n_locally_owned_particle_ids());
+    particles_out_of_cell.reserve(n_locally_owned_particles());
 
     // Now update the reference locations of the moved particles
     std::vector<Point<spacedim>> real_locations;
index b8d32727b69f3cce20e9147a98f57389dfda50b0..c90a04079f6d57a273947b13ec015638556bebaa 100644 (file)
@@ -36,7 +36,7 @@ namespace Particles
       const AffineConstraints<number> &                constraints,
       const ComponentMask &                            space_comps)
     {
-      if (particle_handler.n_locally_owned_particle_ids() == 0)
+      if (particle_handler.n_locally_owned_particles() == 0)
         return; // nothing to do here
 
       const auto &tria = space_dh.get_triangulation();
@@ -119,7 +119,7 @@ namespace Particles
       const AffineConstraints<typename MatrixType::value_type> &constraints,
       const ComponentMask &                                     space_comps)
     {
-      if (particle_handler.n_locally_owned_particle_ids() == 0)
+      if (particle_handler.n_locally_owned_particles() == 0)
         {
           matrix.compress(VectorOperation::add);
           return; // nothing else to do here
index 837e77b370222bb89f920361bfb15e4fea349764..1a49db8ce04a10f6a005ace5c0f0d83f46a9cc1e 100644 (file)
@@ -78,7 +78,7 @@ test()
             << particle_handler.n_global_particles() << std::endl;
 
   const auto n_local_particles_dofs =
-    particle_handler.n_locally_owned_particle_ids() * n_comps;
+    particle_handler.n_locally_owned_particles() * n_comps;
 
   auto particle_sizes =
     Utilities::MPI::all_gather(MPI_COMM_WORLD, n_local_particles_dofs);
index 0d950ca732d47b04b9606dd3af08a69024fcd793..abc6bd26f194112f8ba34b54c4f3e5c26ec4b78e 100644 (file)
@@ -99,7 +99,7 @@ test()
     space_dh, particle_handler, dsp, constraints, space_mask);
 
   const auto n_local_particles_dofs =
-    particle_handler.n_locally_owned_particle_ids() * n_comps;
+    particle_handler.n_locally_owned_particles() * n_comps;
 
   auto particle_sizes =
     Utilities::MPI::all_gather(MPI_COMM_WORLD, n_local_particles_dofs);
index f06433a15fdeffb6f5a61071ef4014b7f5abc70c..5cacdff2213271917f2a01ad720a4077cee8da23 100644 (file)
@@ -103,7 +103,7 @@ test()
     space_dh, particle_handler, dsp, constraints, space_mask);
 
   const auto n_local_particles_dofs =
-    particle_handler.n_locally_owned_particle_ids() * n_comps;
+    particle_handler.n_locally_owned_particles() * n_comps;
 
   auto particle_sizes =
     Utilities::MPI::all_gather(MPI_COMM_WORLD, n_local_particles_dofs);
index b89d95bb2b557885b8579ef6ba65f30fa6242660..b3edfb11ce6f3ddefc65cc71d7112701bb718459 100644 (file)
@@ -102,7 +102,7 @@ test()
     space_dh, particle_handler, dsp, constraints, space_mask);
 
   const auto n_local_particles_dofs =
-    particle_handler.n_locally_owned_particle_ids() * n_comps;
+    particle_handler.n_locally_owned_particles() * n_comps;
 
   auto particle_sizes =
     Utilities::MPI::all_gather(MPI_COMM_WORLD, n_local_particles_dofs);
index c1f4a263b535a013e180f0cb09a4d39e663c9885..886e848890e5f398b7c570d7bc2033b971a594e4 100644 (file)
@@ -97,7 +97,7 @@ test()
     space_dh, particle_handler, dsp, constraints, space_mask);
 
   const auto n_local_particles_dofs =
-    particle_handler.n_locally_owned_particle_ids() * n_comps;
+    particle_handler.n_locally_owned_particles() * n_comps;
 
   auto particle_sizes =
     Utilities::MPI::all_gather(MPI_COMM_WORLD, n_local_particles_dofs);
index ca1ad396f2dcf309242472650e208169a89c815d..15c2c382f6333c20ec9b85efde15e85e59df8cd1 100644 (file)
@@ -99,7 +99,7 @@ test()
     space_dh, particle_handler, dsp, constraints, space_mask);
 
   const auto n_local_particles_dofs =
-    particle_handler.n_locally_owned_particle_ids() * n_comps;
+    particle_handler.n_locally_owned_particles() * n_comps;
 
   auto particle_sizes =
     Utilities::MPI::all_gather(MPI_COMM_WORLD, n_local_particles_dofs);
index c307a18d169b1955ddd242e12e6ca7f2b794836b..ae6853c9f72f978bbc599efce7e25bb1613e720f 100644 (file)
@@ -72,10 +72,10 @@ test()
   Tensor<1, spacedim> displacement;
   displacement[0] = 0.1;
   std::vector<Point<spacedim>> new_particle_positions(
-    particle_handler.n_locally_owned_particle_ids());
+    particle_handler.n_locally_owned_particles());
 
   std::vector<Point<spacedim>> old_particle_positions(
-    particle_handler.n_locally_owned_particle_ids());
+    particle_handler.n_locally_owned_particles());
   particle_handler.get_particle_positions(old_particle_positions);
 
   for (unsigned int i = 0; i < old_particle_positions.size(); ++i)

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.