From: Peter Munch Date: Tue, 4 May 2021 18:51:11 +0000 (+0200) Subject: "n_locally_owned_particle_ids() -> n_locally_owned_particles() X-Git-Tag: v9.3.0-rc1~138^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F12138%2Fhead;p=dealii.git "n_locally_owned_particle_ids() -> n_locally_owned_particles() --- diff --git a/include/deal.II/particles/particle_handler.h b/include/deal.II/particles/particle_handler.h index 87f8c1e444..da073418d6 100644 --- a/include/deal.II/particles/particle_handler.h +++ b/include/deal.II/particles/particle_handler.h @@ -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 diff --git a/include/deal.II/particles/utilities.h b/include/deal.II/particles/utilities.h index b6721504a8..3b60163226 100644 --- a/include/deal.II/particles/utilities.h +++ b/include/deal.II/particles/utilities.h @@ -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 diff --git a/source/particles/data_out.cc b/source/particles/data_out.cc index b3de658979..9c016d5f06 100644 --- a/source/particles/data_out.cc +++ b/source/particles/data_out.cc @@ -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) diff --git a/source/particles/particle_handler.cc b/source/particles/particle_handler.cc index db3be26395..92d8d59613 100644 --- a/source/particles/particle_handler.cc +++ b/source/particles/particle_handler.cc @@ -767,7 +767,7 @@ namespace Particles template types::particle_index - ParticleHandler::n_locally_owned_particle_ids() const + ParticleHandler::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 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> real_locations; diff --git a/source/particles/utilities.cc b/source/particles/utilities.cc index b8d32727b6..c90a04079f 100644 --- a/source/particles/utilities.cc +++ b/source/particles/utilities.cc @@ -36,7 +36,7 @@ namespace Particles const AffineConstraints & 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 &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 diff --git a/tests/particles/interpolate_on_particle_01.cc b/tests/particles/interpolate_on_particle_01.cc index 837e77b370..1a49db8ce0 100644 --- a/tests/particles/interpolate_on_particle_01.cc +++ b/tests/particles/interpolate_on_particle_01.cc @@ -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); diff --git a/tests/particles/particle_interpolation_01.cc b/tests/particles/particle_interpolation_01.cc index 0d950ca732..abc6bd26f1 100644 --- a/tests/particles/particle_interpolation_01.cc +++ b/tests/particles/particle_interpolation_01.cc @@ -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); diff --git a/tests/particles/particle_interpolation_02.cc b/tests/particles/particle_interpolation_02.cc index f06433a15f..5cacdff221 100644 --- a/tests/particles/particle_interpolation_02.cc +++ b/tests/particles/particle_interpolation_02.cc @@ -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); diff --git a/tests/particles/particle_interpolation_03.cc b/tests/particles/particle_interpolation_03.cc index b89d95bb2b..b3edfb11ce 100644 --- a/tests/particles/particle_interpolation_03.cc +++ b/tests/particles/particle_interpolation_03.cc @@ -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); diff --git a/tests/particles/particle_interpolation_04.cc b/tests/particles/particle_interpolation_04.cc index c1f4a263b5..886e848890 100644 --- a/tests/particles/particle_interpolation_04.cc +++ b/tests/particles/particle_interpolation_04.cc @@ -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); diff --git a/tests/particles/particle_interpolation_05.cc b/tests/particles/particle_interpolation_05.cc index ca1ad396f2..15c2c382f6 100644 --- a/tests/particles/particle_interpolation_05.cc +++ b/tests/particles/particle_interpolation_05.cc @@ -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); diff --git a/tests/particles/set_particle_positions_02.cc b/tests/particles/set_particle_positions_02.cc index c307a18d16..ae6853c9f7 100644 --- a/tests/particles/set_particle_positions_02.cc +++ b/tests/particles/set_particle_positions_02.cc @@ -72,10 +72,10 @@ test() Tensor<1, spacedim> displacement; displacement[0] = 0.1; std::vector> new_particle_positions( - particle_handler.n_locally_owned_particle_ids()); + particle_handler.n_locally_owned_particles()); std::vector> 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)