16 #ifndef dealii_particles_particle_handler_h 17 #define dealii_particles_particle_handler_h 19 #include <deal.II/particles/particle.h> 20 #include <deal.II/particles/particle_iterator.h> 21 #include <deal.II/particles/property_pool.h> 23 #include <deal.II/distributed/tria.h> 24 #include <deal.II/base/subscriptor.h> 25 #include <deal.II/base/mpi.h> 26 #include <deal.II/base/array_view.h> 27 #include <deal.II/base/smartpointer.h> 28 #include <deal.II/fe/mapping.h> 30 #include <boost/serialization/map.hpp> 31 #include <boost/range/iterator_range.hpp> 33 DEAL_II_NAMESPACE_OPEN
35 #ifdef DEAL_II_WITH_P4EST 51 template <
int dim,
int spacedim=dim>
80 const unsigned int n_properties = 0);
94 const unsigned int n_properties = 0);
332 template <
class Archive>
333 void serialize (Archive &ar,
const unsigned int version);
350 std::multimap<internal::LevelInd, Particle<dim,spacedim> >
particles;
433 #ifdef DEAL_II_WITH_MPI 484 template <
int dim,
int spacedim>
485 template <
class Archive>
493 &global_number_of_particles
494 &global_max_particles_per_cell
495 &next_free_particle_index;
499 #endif // DEAL_II_WITH_P4EST 501 DEAL_II_NAMESPACE_CLOSE
types::particle_index n_global_particles() const
std::function< std::size_t()> size_callback
void sort_particles_into_subdomains_and_cells()
types::particle_index n_locally_owned_particles() const
unsigned int particle_index
void remove_particle(const particle_iterator &particle)
void initialize(const parallel::distributed::Triangulation< dim, spacedim > &tria, const Mapping< dim, spacedim > &mapping, const unsigned int n_properties=0)
types::particle_index n_global_max_particles_per_cell() const
std::function< const void *(const particle_iterator &, const void *)> load_callback
particle_iterator insert_particle(const Particle< dim, spacedim > &particle, const typename Triangulation< dim, spacedim >::active_cell_iterator &cell)
void send_recv_particles(const std::map< types::subdomain_id, std::vector< particle_iterator > > &particles_to_send, std::multimap< internal::LevelInd, Particle< dim, spacedim > > &received_particles, const std::map< types::subdomain_id, std::vector< typename Triangulation< dim, spacedim >::active_cell_iterator > > &new_cells_for_particles=std::map< types::subdomain_id, std::vector< typename Triangulation< dim, spacedim >::active_cell_iterator > >())
types::particle_index next_free_particle_index
void update_cached_numbers()
unsigned int global_max_particles_per_cell
void register_load_callback_function(const bool serialization)
void store_particles(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const typename Triangulation< dim, spacedim >::CellStatus status, void *data) const
std::multimap< internal::LevelInd, Particle< dim, spacedim > > particles
particle_iterator begin_ghost() const
unsigned int n_properties_per_particle() const
types::particle_index global_number_of_particles
particle_iterator_range particles_in_cell(const typename Triangulation< dim, spacedim >::active_cell_iterator &cell)
void insert_particles(const std::multimap< typename Triangulation< dim, spacedim >::active_cell_iterator, Particle< dim, spacedim > > &particles)
Abstract base class for mapping classes.
particle_iterator begin() const
void exchange_ghost_particles()
unsigned int subdomain_id
ParticleIterator< dim, spacedim > particle_iterator
std::unique_ptr< PropertyPool > property_pool
SmartPointer< const Mapping< dim, spacedim >, ParticleHandler< dim, spacedim > > mapping
void load_particles(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const typename Triangulation< dim, spacedim >::CellStatus status, const void *data)
types::particle_index get_next_free_particle_index() const
std::multimap< internal::LevelInd, Particle< dim, spacedim > > ghost_particles
void serialize(Archive &ar, const unsigned int version)
std::function< void *(const particle_iterator &, void *)> store_callback
PropertyPool & get_property_pool() const
void register_store_callback_function(const bool serialization)
SmartPointer< const parallel::distributed::Triangulation< dim, spacedim >, ParticleHandler< dim, spacedim > > triangulation
boost::iterator_range< particle_iterator > particle_iterator_range
particle_iterator end_ghost() const
particle_iterator end() const
void register_additional_store_load_functions(const std::function< std::size_t()> &size_callback, const std::function< void *(const particle_iterator &, void *)> &store_callback, const std::function< const void *(const particle_iterator &, const void *)> &load_callback)
unsigned int n_particles_in_cell(const typename Triangulation< dim, spacedim >::active_cell_iterator &cell) const