16#ifndef dealii_particles_particle_accessor_h
17#define dealii_particles_particle_accessor_h
34 class ParticleIterator;
36 class ParticleHandler;
42 template <
int dim,
int spacedim = dim>
214 template <
class Archive>
264 std::multimap<internal::LevelInd, Particle<dim, spacedim>> *
map;
283 template <
int dim,
int spacedim>
284 template <
class Archive>
287 const unsigned int version)
289 return particle->second.serialize(ar, version);
295 template <
int dim,
int spacedim>
303 template <
int dim,
int spacedim>
315 template <
int dim,
int spacedim>
322 return particle->second.read_particle_data_from_memory(data);
327 template <
int dim,
int spacedim>
334 return particle->second.write_particle_data_to_memory(data);
339 template <
int dim,
int spacedim>
345 particle->second.set_location(new_loc);
350 template <
int dim,
int spacedim>
356 return particle->second.get_location();
361 template <
int dim,
int spacedim>
368 particle->second.set_reference_location(new_loc);
373 template <
int dim,
int spacedim>
379 return particle->second.get_reference_location();
384 template <
int dim,
int spacedim>
390 return particle->second.get_id();
395 template <
int dim,
int spacedim>
402 particle->second.set_property_pool(new_property_pool);
407 template <
int dim,
int spacedim>
413 return particle->second.has_properties();
418 template <
int dim,
int spacedim>
421 const std::vector<double> &new_properties)
425 particle->second.set_properties(new_properties);
430 template <
int dim,
int spacedim>
437 particle->second.set_properties(new_properties);
442 template <
int dim,
int spacedim>
448 return particle->second.get_properties();
453 template <
int dim,
int spacedim>
461 &
triangulation, particle->first.first, particle->first.second);
467 template <
int dim,
int spacedim>
473 return particle->second.get_properties();
478 template <
int dim,
int spacedim>
484 return particle->second.serialized_size_in_bytes();
489 template <
int dim,
int spacedim>
499 template <
int dim,
int spacedim>
509 template <
int dim,
int spacedim>
514 return (map != other.
map) || (particle != other.
particle);
519 template <
int dim,
int spacedim>
524 return (map == other.
map) && (particle == other.
particle);
546 template <
int dim,
int spacedim>
556 operator()(const ::Particles::ParticleAccessor<dim, spacedim>
559 return accessor.get_location();
std::multimap< internal::LevelInd, Particle< dim, spacedim > > * map
const Point< spacedim > & get_location() const
types::particle_index get_id() const
const void * read_particle_data_from_memory(const void *data)
Triangulation< dim, spacedim >::cell_iterator get_surrounding_cell(const Triangulation< dim, spacedim > &triangulation) const
bool operator!=(const ParticleAccessor< dim, spacedim > &other) const
const ArrayView< double > get_properties()
void set_location(const Point< spacedim > &new_location)
void serialize(Archive &ar, const unsigned int version)
std::multimap< internal::LevelInd, Particle< dim, spacedim > >::iterator particle
ParticleAccessor(const std::multimap< internal::LevelInd, Particle< dim, spacedim > > &map, const typename std::multimap< internal::LevelInd, Particle< dim, spacedim > >::iterator &particle)
const ArrayView< const double > get_properties() const
void set_property_pool(PropertyPool< dim, spacedim > &property_pool)
void set_reference_location(const Point< dim > &new_reference_location)
const Point< dim > & get_reference_location() const
std::size_t serialized_size_in_bytes() const
void set_properties(const std::vector< double > &new_properties)
bool has_properties() const
void * write_particle_data_to_memory(void *data) const
void set_properties(const ArrayView< const double > &new_properties)
bool operator==(const ParticleAccessor< dim, spacedim > &other) const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
static ::ExceptionBase & ExcInternalError()
std::pair< int, int > LevelInd
const ::parallel::distributed::Triangulation< dim, spacedim > * triangulation
result_type operator()(const ::Particles::ParticleAccessor< dim, spacedim > &accessor) const