16 #ifndef dealii_particles_particle_handler_h 17 #define dealii_particles_particle_handler_h 19 #include <deal.II/base/array_view.h> 20 #include <deal.II/base/mpi.h> 21 #include <deal.II/base/smartpointer.h> 22 #include <deal.II/base/subscriptor.h> 24 #include <deal.II/distributed/tria.h> 26 #include <deal.II/fe/mapping.h> 28 #include <deal.II/particles/particle.h> 29 #include <deal.II/particles/particle_iterator.h> 30 #include <deal.II/particles/property_pool.h> 32 #include <boost/range/iterator_range.hpp> 33 #include <boost/serialization/map.hpp> 35 DEAL_II_NAMESPACE_OPEN
37 #ifdef DEAL_II_WITH_P4EST 53 template <
int dim,
int spacedim = dim>
83 const unsigned int n_properties = 0);
98 const unsigned int n_properties = 0);
362 template <
class Archive>
364 serialize(Archive &ar,
const unsigned int version);
384 std::multimap<internal::LevelInd, Particle<dim, spacedim>>
particles;
456 std::function<const void *(const particle_iterator &, const void *)>
467 # ifdef DEAL_II_WITH_MPI 499 &new_cells_for_particles = std::map<
523 const boost::iterator_range<std::vector<char>::const_iterator>
529 template <
int dim,
int spacedim>
530 template <
class Archive>
539 &global_number_of_particles &global_max_particles_per_cell
540 & next_free_particle_index;
544 #endif // DEAL_II_WITH_P4EST 546 DEAL_II_NAMESPACE_CLOSE
std::multimap< internal::LevelInd, Particle< dim, spacedim > > ghost_particles
types::particle_index n_global_particles() const
void sort_particles_into_subdomains_and_cells()
types::particle_index n_locally_owned_particles() const
std::vector< char > store_particles(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const typename Triangulation< dim, spacedim >::CellStatus status) const
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)
types::particle_index next_free_particle_index
SmartPointer< const parallel::distributed::Triangulation< dim, spacedim >, ParticleHandler< dim, spacedim > > triangulation
void update_cached_numbers()
unsigned int global_max_particles_per_cell
virtual ~ParticleHandler() override=default
unsigned int particle_index
void register_load_callback_function(const bool serialization)
unsigned int subdomain_id
void insert_particles(const std::multimap< typename Triangulation< dim, spacedim >::active_cell_iterator, 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)
std::function< std::size_t()> size_callback
Abstract base class for mapping classes.
void register_store_callback_function()
particle_iterator begin() const
void exchange_ghost_particles()
std::unique_ptr< PropertyPool > property_pool
types::particle_index get_next_free_particle_index() const
boost::iterator_range< particle_iterator > particle_iterator_range
void serialize(Archive &ar, const unsigned int version)
std::multimap< internal::LevelInd, Particle< dim, spacedim > > particles
std::function< void *(const particle_iterator &, void *)> store_callback
PropertyPool & get_property_pool() const
SmartPointer< const Mapping< dim, spacedim >, ParticleHandler< dim, spacedim > > mapping
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 >>())
void load_particles(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const typename Triangulation< dim, spacedim >::CellStatus status, const boost::iterator_range< std::vector< char >::const_iterator > &data_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