* 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
* 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
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
"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(),
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)
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();
}
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)
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)
// 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;
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();
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
<< 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);
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);
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);
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);
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);
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);
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)