16 #ifndef dealii_particles_particle_h 17 #define dealii_particles_particle_h 19 #include <deal.II/base/array_view.h> 20 #include <deal.II/base/point.h> 21 #include <deal.II/base/types.h> 23 #include <deal.II/particles/property_pool.h> 25 DEAL_II_NAMESPACE_OPEN
31 #ifdef DEAL_II_WITH_64BIT_INDICES 45 # ifdef DEAL_II_WITH_MPI 50 # define DEAL_II_PARTICLE_INDEX_MPI_TYPE MPI_UNSIGNED_LONG_LONG 64 using particle_index =
unsigned int;
66 # ifdef DEAL_II_WITH_MPI 71 # define DEAL_II_PARTICLE_INDEX_MPI_TYPE MPI_UNSIGNED 87 using LevelInd = std::pair<int, int>;
100 template <
int dim,
int spacedim = dim>
193 write_data(
void *&data)
const;
210 get_location()
const;
219 set_reference_location(
const Point<dim> &new_reference_location);
225 get_reference_location()
const;
248 has_properties()
const;
279 get_properties()
const;
287 serialized_size_in_bytes()
const;
293 template <
class Archive>
295 save(Archive &ar,
const unsigned int version)
const;
301 template <
class Archive>
303 load(Archive &ar,
const unsigned int version);
305 BOOST_SERIALIZATION_SPLIT_MEMBER()
337 template <
int dim,
int spacedim>
338 template <
class Archive>
342 unsigned int n_properties = 0;
344 ar &location &reference_location &
id &n_properties;
346 if (n_properties > 0)
348 properties =
new double[n_properties];
349 ar &boost::serialization::make_array(properties, n_properties);
353 template <
int dim,
int spacedim>
354 template <
class Archive>
358 unsigned int n_properties = 0;
359 if ((property_pool !=
nullptr) &&
360 (properties != PropertyPool::invalid_handle))
361 n_properties = get_properties().size();
363 ar &location &reference_location &
id &n_properties;
365 if (n_properties > 0)
366 ar &boost::serialization::make_array(properties, n_properties);
370 DEAL_II_NAMESPACE_CLOSE
PropertyPool::Handle properties
Point< spacedim > location
unsigned int particle_index
Point< dim > reference_location
PropertyPool * property_pool