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 PARTICLE_INDEX_MPI_TYPE MPI_UNSIGNED_LONG_LONG 66 # ifdef DEAL_II_WITH_MPI 71 # define PARTICLE_INDEX_MPI_TYPE MPI_UNSIGNED 87 using LevelInd = std::pair<int, int>;
100 template <
int dim,
int spacedim = dim>
192 write_data(
void *&data)
const;
209 get_location()
const;
218 set_reference_location(
const Point<dim> &new_reference_location);
224 get_reference_location()
const;
247 has_properties()
const;
272 get_properties()
const;
280 serialized_size_in_bytes()
const;
286 template <
class Archive>
288 save(Archive &ar,
const unsigned int version)
const;
294 template <
class Archive>
296 load(Archive &ar,
const unsigned int version);
298 BOOST_SERIALIZATION_SPLIT_MEMBER()
330 template <
int dim,
int spacedim>
331 template <
class Archive>
335 unsigned int n_properties = 0;
337 ar &location &reference_location &
id &n_properties;
339 if (n_properties > 0)
341 properties =
new double[n_properties];
342 ar &boost::serialization::make_array(properties, n_properties);
346 template <
int dim,
int spacedim>
347 template <
class Archive>
351 unsigned int n_properties = 0;
352 if ((property_pool !=
nullptr) &&
353 (properties != PropertyPool::invalid_handle))
354 n_properties = get_properties().size();
356 ar &location &reference_location &
id &n_properties;
358 if (n_properties > 0)
359 ar &boost::serialization::make_array(properties, n_properties);
363 DEAL_II_NAMESPACE_CLOSE
PropertyPool::Handle properties
Point< spacedim > location
unsigned long long int particle_index
Point< dim > reference_location
PropertyPool * property_pool