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 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>
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) &&
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
void set_property_pool(PropertyPool &property_pool)
Particle< dim, spacedim > & operator=(const Particle< dim, spacedim > &particle)
void write_data(void *&data) const
types::particle_index get_id() const
void set_properties(const ArrayView< const double > &new_properties)
const Point< spacedim > & get_location() const
const ArrayView< double > get_properties()
void set_reference_location(const Point< dim > &new_reference_location)
std::size_t serialized_size_in_bytes() const
void save(Archive &ar, const unsigned int version) const
unsigned int particle_index
void load(Archive &ar, const unsigned int version)
static const Handle invalid_handle
const Point< dim > & get_reference_location() const
Point< dim > reference_location
bool has_properties() const
void set_location(const Point< spacedim > &new_location)
PropertyPool * property_pool