/**
* Get a cell iterator to the cell surrounding the current particle.
- * As particles are organized in the structure of a triangulation,
- * but the triangulation itself is not stored in the particle this
- * operation requires a reference to the triangulation.
*/
const typename Triangulation<dim, spacedim>::cell_iterator &
get_surrounding_cell() const;
- /**
- * @deprecated Deprecated version of the function with the same
- * name above.
- */
- DEAL_II_DEPRECATED
- const typename Triangulation<dim, spacedim>::cell_iterator &
- get_surrounding_cell(
- const Triangulation<dim, spacedim> &triangulation) const;
-
/**
* Write the data of this object to a stream for the purpose of
* serialization using the [BOOST serialization
- template <int dim, int spacedim>
- inline const typename Triangulation<dim, spacedim>::cell_iterator &
- ParticleAccessor<dim, spacedim>::get_surrounding_cell(
- const Triangulation<dim, spacedim> & /*triangulation*/) const
- {
- Assert(state() == IteratorState::valid, ExcInternalError());
- Assert(particles_in_cell->cell.state() == IteratorState::valid,
- ExcInternalError());
-
- return particles_in_cell->cell;
- }
-
-
-
template <int dim, int spacedim>
inline ArrayView<double>
ParticleAccessor<dim, spacedim>::get_properties()
for (const auto &particle : particle_handler)
{
deallog << "Particle index " << particle.get_id() << " is in cell "
- << particle.get_surrounding_cell(tr) << std::endl;
+ << particle.get_surrounding_cell() << std::endl;
deallog << "Particle location: " << particle.get_location()
<< std::endl;
}
for (const auto &particle : particle_handler)
{
deallog << "Particle index " << particle.get_id() << " is in cell "
- << particle.get_surrounding_cell(tr) << std::endl;
+ << particle.get_surrounding_cell() << std::endl;
deallog << "Particle location: " << particle.get_location()
<< std::endl;
}
for (const auto &particle : particle_handler)
{
deallog << "Particle index " << particle.get_id() << " is in cell "
- << particle.get_surrounding_cell(tr) << std::endl;
+ << particle.get_surrounding_cell() << std::endl;
deallog << "Particle location: " << particle.get_location()
<< std::endl;
}
for (const auto &particle : particle_handler)
{
deallog << "Particle index " << particle.get_id() << " is in cell "
- << particle.get_surrounding_cell(tr) << std::endl;
+ << particle.get_surrounding_cell() << std::endl;
deallog << "Particle location: " << particle.get_location()
<< std::endl;
}
for (const auto &particle : particle_handler)
{
deallog << "Particle index " << particle.get_id() << " is in cell "
- << particle.get_surrounding_cell(tr) << std::endl;
+ << particle.get_surrounding_cell() << std::endl;
deallog << "Particle location: " << particle.get_location()
<< std::endl;
}
for (const auto &particle : particle_handler)
{
deallog << "Particle index " << particle.get_id() << " is in cell "
- << particle.get_surrounding_cell(tr) << std::endl;
+ << particle.get_surrounding_cell() << std::endl;
deallog << "Particle location: " << particle.get_location()
<< std::endl;
}
for (const auto &particle : particle_handler)
{
deallog << "Particle index " << particle.get_id() << " is in cell "
- << particle.get_surrounding_cell(tr) << std::endl;
+ << particle.get_surrounding_cell() << std::endl;
deallog << "Particle location: " << particle.get_location()
<< std::endl;
}
for (const auto &particle : particle_handler)
{
deallog << "Particle index " << particle.get_id() << " is in cell "
- << particle.get_surrounding_cell(tr) << std::endl;
+ << particle.get_surrounding_cell() << std::endl;
deallog << "Particle location: " << particle.get_location()
<< std::endl;
}
for (const auto &particle : particle_handler)
{
deallog << "Particle index " << particle.get_id() << " is in cell "
- << particle.get_surrounding_cell(tr) << std::endl;
+ << particle.get_surrounding_cell() << std::endl;
deallog << "Particle location: " << particle.get_location()
<< std::endl;
}
for (const auto &particle : particle_handler)
deallog << "Before sort particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle.get_surrounding_cell() << std::endl;
particle_handler.sort_particles_into_subdomains_and_cells();
for (const auto &particle : particle_handler)
deallog << "After sort particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle.get_surrounding_cell() << std::endl;
// Move all points up by 0.5. This will change cell for particle 1, and will
// move particle 2 out of the domain. Note that we need to change the
particle_handler.sort_particles_into_subdomains_and_cells();
for (const auto &particle : particle_handler)
deallog << "After shift particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle.get_surrounding_cell() << std::endl;
}
deallog << "OK" << std::endl;
for (const auto &particle : particle_handler)
deallog << "Before sort particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tr)
+ << " is in cell " << particle.get_surrounding_cell()
<< " on process "
<< Utilities::MPI::this_mpi_process(tr.get_communicator())
<< std::flush << std::endl;
for (const auto &particle : particle_handler)
deallog << "After sort particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tr)
+ << " is in cell " << particle.get_surrounding_cell()
<< " on process "
<< Utilities::MPI::this_mpi_process(tr.get_communicator())
<< std::flush << std::endl;
particle_handler.sort_particles_into_subdomains_and_cells();
for (const auto &particle : particle_handler)
deallog << "After shift particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tr)
+ << " is in cell " << particle.get_surrounding_cell()
<< " on process "
<< Utilities::MPI::this_mpi_process(tr.get_communicator())
<< std::flush << std::endl;
for (const auto &particle : particle_handler)
deallog << "Before refinement particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle.get_surrounding_cell() << std::endl;
// Check that all particles are moved to children
particle_handler.prepare_for_coarsening_and_refinement();
for (const auto &particle : particle_handler)
deallog << "After refinement particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle.get_surrounding_cell() << std::endl;
// Reverse the refinement and check again
for (auto cell = tr.begin_active(); cell != tr.end(); ++cell)
for (const auto &particle : particle_handler)
deallog << "After coarsening particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle.get_surrounding_cell() << std::endl;
}
deallog << "OK" << std::endl;
particle != particle_handler.end();
++particle)
deallog << "Particle id " << particle->get_id() << " is in cell "
- << particle->get_surrounding_cell(tr) << std::endl
+ << particle->get_surrounding_cell() << std::endl
<< " at location " << particle->get_location() << std::endl
<< " at reference location "
<< particle->get_reference_location() << std::endl;
for (const auto &particle : particle_handler)
deallog << "Before sort particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tria_pft)
+ << " is in cell " << particle.get_surrounding_cell()
<< " on process "
<< Utilities::MPI::this_mpi_process(
tria_pft.get_communicator())
for (const auto &particle : particle_handler)
deallog << "After sort particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tria_pft)
+ << " is in cell " << particle.get_surrounding_cell()
<< " on process "
<< Utilities::MPI::this_mpi_process(tria_pft.get_communicator())
<< std::flush << std::endl;
particle_handler.sort_particles_into_subdomains_and_cells();
for (const auto &particle : particle_handler)
deallog << "After shift particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tria_pft)
+ << " is in cell " << particle.get_surrounding_cell()
<< " on process "
<< Utilities::MPI::this_mpi_process(tria_pft.get_communicator())
<< std::flush << std::endl;
for (const auto &particle : particle_handler)
deallog << "Before refinement particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle.get_surrounding_cell() << std::endl;
// Check that all particles are moved to children
particle_handler.prepare_for_coarsening_and_refinement();
for (const auto &particle : particle_handler)
deallog << "After refinement particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle.get_surrounding_cell() << std::endl;
// Reverse the refinement and check again
for (auto cell = tr.begin_active(); cell != tr.end(); ++cell)
for (const auto &particle : particle_handler)
deallog << "After coarsening particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle.get_surrounding_cell() << std::endl;
}
deallog << "OK" << std::endl;
for (const auto &particle : particle_handler)
deallog << "Before refinement particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle.get_surrounding_cell() << std::endl;
// Check that all particles are moved to children
particle_handler.prepare_for_coarsening_and_refinement();
for (const auto &particle : particle_handler)
deallog << "After refinement particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle.get_surrounding_cell() << std::endl;
// Reverse the refinement and check again
for (auto cell = tr.begin_active(); cell != tr.end(); ++cell)
for (const auto &particle : particle_handler)
deallog << "After coarsening particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle.get_surrounding_cell() << std::endl;
}
deallog << "OK" << std::endl;
for (const auto &particle : particle_handler)
deallog << "Before sort particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle.get_surrounding_cell() << std::endl;
particle_handler.sort_particles_into_subdomains_and_cells();
for (const auto &particle : particle_handler)
deallog << "After sort particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle.get_surrounding_cell() << std::endl;
// Move all points up by 0.5. This will change cell for particle 1, and will
// move particle 2 out of the domain. Note that we need to change the
particle_handler.sort_particles_into_subdomains_and_cells();
for (const auto &particle : particle_handler)
deallog << "After shift particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle.get_surrounding_cell() << std::endl;
}
deallog << "OK" << std::endl;
particle != particle_handler.end();
++particle)
deallog << "Particle id " << particle->get_id() << " is in cell "
- << particle->get_surrounding_cell(tr) << std::endl
+ << particle->get_surrounding_cell() << std::endl
<< " at location " << particle->get_location() << std::endl
<< " at reference location "
<< particle->get_reference_location() << std::endl;
for (const auto &particle : particle_handler)
deallog << "Before sort particle id " << particle.get_id()
- << " is in cell "
- << particle.get_surrounding_cell(tria_shared)
+ << " is in cell " << particle.get_surrounding_cell()
<< " on process "
<< Utilities::MPI::this_mpi_process(
tria_shared.get_communicator())
for (const auto &particle : particle_handler)
deallog << "After sort particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tria_shared)
+ << " is in cell " << particle.get_surrounding_cell()
<< " on process "
<< Utilities::MPI::this_mpi_process(
tria_shared.get_communicator())
particle_handler.sort_particles_into_subdomains_and_cells();
for (const auto &particle : particle_handler)
deallog << "After shift particle id " << particle.get_id()
- << " is in cell " << particle.get_surrounding_cell(tria_shared)
+ << " is in cell " << particle.get_surrounding_cell()
<< " on process "
<< Utilities::MPI::this_mpi_process(
tria_shared.get_communicator())
auto particle = particle_handler.begin();
while (particle != particle_handler.end())
{
- const auto cell =
- particle->get_surrounding_cell(background_triangulation);
+ const auto cell = particle->get_surrounding_cell();
const auto dh_cell =
typename DoFHandler<dim>::cell_iterator(*cell, &fluid_dh);
particle != particle_handler.end();
++particle)
deallog << "Before serialization particle id " << particle->get_id()
- << " is in cell " << particle->get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle->get_surrounding_cell() << std::endl;
// save data to archive
std::ostringstream oss;
particle != particle_handler.end();
++particle)
deallog << "In between particle id " << particle->get_id() << " is in cell "
- << particle->get_surrounding_cell(tr) << std::endl;
+ << particle->get_surrounding_cell() << std::endl;
// verify correctness of the serialization. Note that the deserialization of
// the particle handler has to happen before the triangulation (otherwise it
particle != particle_handler.end();
++particle)
deallog << "After serialization particle id " << particle->get_id()
- << " is in cell " << particle->get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle->get_surrounding_cell() << std::endl;
deallog << "OK" << std::endl << std::endl;
}
particle != particle_handler.end();
++particle)
deallog << "Before serialization particle id " << particle->get_id()
- << " is in cell " << particle->get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle->get_surrounding_cell() << std::endl;
// save data to archive
std::ostringstream oss;
particle != particle_handler.end();
++particle)
deallog << "In between particle id " << particle->get_id() << " is in cell "
- << particle->get_surrounding_cell(tr) << std::endl;
+ << particle->get_surrounding_cell() << std::endl;
// verify correctness of the serialization. Note that the deserialization of
// the particle handler has to happen before the triangulation (otherwise it
particle != particle_handler.end();
++particle)
deallog << "After serialization particle id " << particle->get_id()
- << " is in cell " << particle->get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle->get_surrounding_cell() << std::endl;
deallog << "OK" << std::endl << std::endl;
}
particle != particle_handler.end();
++particle)
deallog << "Before serialization particle id " << particle->get_id()
- << " is in cell " << particle->get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle->get_surrounding_cell() << std::endl;
// save data to archive
std::ostringstream oss;
particle != particle_handler.end();
++particle)
deallog << "In between particle id " << particle->get_id() << " is in cell "
- << particle->get_surrounding_cell(tr) << std::endl;
+ << particle->get_surrounding_cell() << std::endl;
// verify correctness of the serialization. Note that the deserialization of
// the particle handler has to happen before the triangulation (otherwise it
particle != particle_handler.end();
++particle)
deallog << "After serialization particle id " << particle->get_id()
- << " is in cell " << particle->get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle->get_surrounding_cell() << std::endl;
deallog << "OK" << std::endl << std::endl;
}
particle != particle_handler.end();
++particle)
deallog << "Before serialization particle id " << particle->get_id()
- << " is in cell " << particle->get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle->get_surrounding_cell() << std::endl;
// save data to archive
std::ostringstream oss;
particle != particle_handler.end();
++particle)
deallog << "In between particle id " << particle->get_id() << " is in cell "
- << particle->get_surrounding_cell(tr) << std::endl;
+ << particle->get_surrounding_cell() << std::endl;
// verify correctness of the serialization. Note that the deserialization of
// the particle handler has to happen before the triangulation (otherwise it
particle != particle_handler.end();
++particle)
deallog << "After serialization particle id " << particle->get_id()
- << " is in cell " << particle->get_surrounding_cell(tr)
- << std::endl;
+ << " is in cell " << particle->get_surrounding_cell() << std::endl;
deallog << "OK" << std::endl << std::endl;
}
auto particle = particle_handler.begin();
while (particle != particle_handler.end())
{
- const auto cell =
- particle->get_surrounding_cell(background_triangulation);
+ const auto cell = particle->get_surrounding_cell();
const auto dh_cell =
typename DoFHandler<dim>::cell_iterator(*cell, &fluid_dh);