54 properties.
size() / n_properties - currently_available_handles.size();
57 ExcMessage(
"This property pool currently still holds " +
59 " open handles to memory that was allocated "
60 "via allocate_properties_array() but that has "
61 "not been returned via "
62 "deregister_particle()."));
67 locations.shrink_to_fit();
69 reference_locations.clear();
70 reference_locations.shrink_to_fit();
76 properties.shrink_to_fit();
78 currently_available_handles.clear();
79 currently_available_handles.shrink_to_fit();
88 Handle handle = invalid_handle;
89 if (currently_available_handles.size() > 0)
91 handle = currently_available_handles.back();
92 currently_available_handles.pop_back();
96 handle = locations.size();
98 locations.resize(locations.size() + 1);
99 reference_locations.resize(reference_locations.size() + 1);
100 ids.resize(ids.size() + 1);
101 properties.resize(properties.size() + n_properties);
109 for (
double &
x : get_properties(handle))
unsigned int n_properties_per_slot() const
unsigned int n_registered_slots() const
void deregister_particle(Handle &handle)
void reserve(const std::size_t size)
PropertyPool(const unsigned int n_properties_per_slot)
void sort_memory_slots(const std::vector< Handle > &handles_to_sort)
Handle register_particle()