@@ -18,7 +18,7 @@ BaseParticles::BaseParticles(SPHBody &sph_body, BaseMaterial *base_material)
1818 base_material_(*base_material),
1919 restart_xml_parser_(" xml_restart" , " particles" ),
2020 reload_xml_parser_(" xml_particle_reload" , " particles" ),
21- copy_particle_data_(all_particle_data_ ),
21+ copy_particle_state_(all_state_data_ ),
2222 write_restart_variable_to_xml_(variables_to_restart_, restart_xml_parser_),
2323 write_reload_variable_to_xml_(variables_to_reload_, reload_xml_parser_),
2424 read_restart_variable_from_xml_(variables_to_restart_, restart_xml_parser_)
@@ -38,13 +38,11 @@ void BaseParticles::initializeBasicParticleVariables()
3838 // ----------------------------------------------------------------------
3939 // unregistered variables and data
4040 // ----------------------------------------------------------------------
41- original_id_ = addUnregisteredVariable (" OriginalID" ,
42- [&](size_t i) -> size_t
43- { return i; });
44- sorted_id_ = addUnregisteredVariable (" SortedID" ,
45- [&](size_t i) -> size_t
46- { return i; });
47- sequence_ = addUnregisteredVariable (" Sequence" );
41+ original_id_ = registerSharedVariable<size_t >(" OriginalID" ,
42+ [&](size_t i) -> size_t
43+ { return i; });
44+ sorted_id_ = registerSharedVariableFrom<size_t >(" SortedID" , " OriginalID" );
45+ sequence_ = registerSharedVariable<size_t >(" Sequence" );
4846 particle_sorting_ = particle_sort_ptr_keeper_.createPtr <ParticleSorting>(*this );
4947}
5048// =================================================================================================//
@@ -82,7 +80,7 @@ void BaseParticles::increaseAllParticlesBounds(size_t buffer_size)
8280// =================================================================================================//
8381void BaseParticles::copyFromAnotherParticle (size_t index, size_t another_index)
8482{
85- copy_particle_data_ (index, another_index);
83+ copy_particle_state_ (index, another_index);
8684}
8785// =================================================================================================//
8886size_t BaseParticles::allocateGhostParticles (size_t ghost_size)
0 commit comments