@@ -2288,7 +2288,7 @@ _local_propagation(cs_lagr_particle_set_t *p_set,
22882288 max_propagation_loops = cs::max (mesh->n_cells , max_propagation_loops);
22892289
22902290 /* local loops on the cell within a given proc
2291- * if either the deterministic virtual partiner or the stochastic particle
2291+ * if either the deterministic virtual partner or the stochastic particle
22922292 * is blocked on face_treatment the particle is blocked *
22932293 * current tracking step associated to the particle
22942294 * 0 : ghost trajectory associated to deterministic virtual partner
@@ -3684,19 +3684,19 @@ _finalize_displacement(cs_lagr_particle_set_t *p_set)
36843684
36853685 /* Copy unordered particle data to buffer */
36863686
3687- for (cs_lnum_t i = 0 ; i < n_particles; i ++) {
3687+ for (cs_lnum_t p_id = 0 ; p_id < n_particles; p_id ++) {
36883688
3689- cs_lnum_t cur_part_state = _get_tracking_info (p_set, i )->state ;
3689+ cs_lnum_t cur_part_state = _get_tracking_info (p_set, p_id )->state ;
36903690
36913691 CS_NO_WARN_IF_UNUSED (cur_part_state);
36923692 assert ( cur_part_state < CS_LAGR_PART_OUT
36933693 && cur_part_state != CS_LAGR_PART_TO_SYNC);
36943694
3695- cs_lnum_t cell_id = cs_lagr_particles_get_lnum (p_set, i ,
3695+ cs_lnum_t cell_id = cs_lagr_particles_get_lnum (p_set, p_id ,
36963696 CS_LAGR_CELL_ID);
36973697
3698- memcpy (swap_buffer + p_am->extents *i ,
3699- p_set->p_buffer + p_am->extents *i ,
3698+ memcpy (swap_buffer + p_am->extents *p_id ,
3699+ p_set->p_buffer + p_am->extents *p_id ,
37003700 p_am->extents );
37013701
37023702 cell_idx[cell_id+1 ] += 1 ;
@@ -3715,10 +3715,10 @@ _finalize_displacement(cs_lagr_particle_set_t *p_set)
37153715 const cs_lnum_t p_extents = p_set->p_am ->extents ;
37163716 const cs_lnum_t cell_num_displ = p_set->p_am ->displ [0 ][CS_LAGR_CELL_ID];
37173717
3718- for (cs_lnum_t i = 0 ; i < n_particles; i ++) {
3718+ for (cs_lnum_t p_id = 0 ; p_id < n_particles; p_id ++) {
37193719
37203720 cs_lnum_t cell_id
3721- = *((const cs_lnum_t *)(swap_buffer + p_extents*i + cell_num_displ));
3721+ = *((const cs_lnum_t *)(swap_buffer + p_extents*p_id + cell_num_displ));
37223722
37233723 assert (cell_id > -1 );
37243724
@@ -3727,7 +3727,7 @@ _finalize_displacement(cs_lagr_particle_set_t *p_set)
37273727 cell_idx[cell_id] += 1 ;
37283728
37293729 memcpy (p_set->p_buffer + p_am->extents *particle_id,
3730- swap_buffer + p_am->extents *i ,
3730+ swap_buffer + p_am->extents *p_id ,
37313731 p_am->extents );
37323732
37333733 }
0 commit comments