typename PropertyPool<dim, spacedim>::Handle property_pool_handle;
};
+
+
/* ---------------------- inline and template functions ------------------ */
template <int dim, int spacedim>
{
unsigned int n_properties = 0;
+ Point<spacedim> location;
+ Point<dim> reference_location;
ar &location &reference_location &id &n_properties;
+ set_location(location);
+ set_reference_location(reference_location);
+
if (n_properties > 0)
{
ArrayView<double> properties(get_properties());
(property_pool_handle != PropertyPool<dim, spacedim>::invalid_handle))
n_properties = get_properties().size();
+ Point<spacedim> location = get_location();
+ Point<dim> reference_location = get_reference_location();
+
ar &location &reference_location &id &n_properties;
if (n_properties > 0)
id = *id_data++;
const double *pdata = reinterpret_cast<const double *>(id_data);
+ Point<spacedim> location;
for (unsigned int i = 0; i < spacedim; ++i)
location(i) = *pdata++;
+ set_location(location);
+ Point<dim> reference_location;
for (unsigned int i = 0; i < dim; ++i)
reference_location(i) = *pdata++;
+ set_reference_location(reference_location);
property_pool = new_property_pool;
if (property_pool != nullptr)
// Write location data
for (unsigned int i = 0; i < spacedim; ++i, ++pdata)
- *pdata = location(i);
+ *pdata = get_location()[i];
// Write reference location data
for (unsigned int i = 0; i < dim; ++i, ++pdata)
- *pdata = reference_location(i);
+ *pdata = get_reference_location()[i];
// Write property data
if (has_properties())
}
+
template <int dim, int spacedim>
void
Particle<dim, spacedim>::update_particle_data(const void *&data)
id = *id_data++;
const double *pdata = reinterpret_cast<const double *>(id_data);
+ Point<spacedim> location;
for (unsigned int i = 0; i < spacedim; ++i)
location(i) = *pdata++;
+ set_location(location);
+ Point<dim> reference_location;
for (unsigned int i = 0; i < dim; ++i)
reference_location(i) = *pdata++;
+ set_reference_location(reference_location);
// See if there are properties to load
if (has_properties())
}
+
template <int dim, int spacedim>
std::size_t
Particle<dim, spacedim>::serialized_size_in_bytes() const