@@ -817,7 +817,7 @@ _update_boundary_face_type(void)
817817
818818 {
819819 int *bc_flag;
820- CS_MALLOC (bc_flag, mesh->n_b_faces , int );
820+ CS_MALLOC_HD (bc_flag, mesh->n_b_faces , int );
821821
822822 for (cs_lnum_t i = 0 ; i < mesh->n_b_faces ; i++)
823823 bc_flag[i] = bcs->elt_type [i];
@@ -984,7 +984,7 @@ cs_lagr_init_arrays(void)
984984 assert (bound_stat == nullptr );
985985
986986 if (n_boundary_stats > 0 )
987- CS_MALLOC (bound_stat, n_b_faces * n_boundary_stats, cs_real_t );
987+ CS_MALLOC_HD (bound_stat, n_b_faces * n_boundary_stats, cs_real_t );
988988}
989989
990990/* ----------------------------------------------------------------------------
@@ -1531,7 +1531,7 @@ cs_lagr_get_internal_conditions(void)
15311531 cs_glob_lagr_internal_conditions = _create_internal_cond_struct ();
15321532
15331533 if (cs_glob_lagr_internal_conditions->i_face_zone_id == nullptr ) {
1534- CS_MALLOC (cs_glob_lagr_internal_conditions->i_face_zone_id ,
1534+ CS_MALLOC_HD (cs_glob_lagr_internal_conditions->i_face_zone_id ,
15351535 cs_glob_mesh->n_i_faces ,
15361536 int );
15371537
@@ -1754,13 +1754,13 @@ cs_lagr_solve_time_step(const int itypfb[],
17541754 if ( lagr_model->clogging == 1
17551755 || lagr_model->roughness == 1
17561756 || lagr_model->dlvo == 1 )
1757- CS_MALLOC (tempp, mesh->n_cells , cs_real_t );
1757+ CS_MALLOC_HD (tempp, mesh->n_cells , cs_real_t );
17581758
17591759 ipass ++;
17601760
17611761 static cs_real_t *vislen = nullptr ;
17621762 if ((lagr_model->deposition == 1 ) && (ipass == 1 )) {
1763- CS_MALLOC (vislen, n_b_faces, cs_real_t );
1763+ CS_MALLOC_HD (vislen, n_b_faces, cs_real_t );
17641764 for (cs_lnum_t ifac = 0 ; ifac < n_b_faces; ifac++)
17651765 vislen[ifac] = -cs_math_big_r;
17661766 }
@@ -2127,41 +2127,41 @@ cs_lagr_solve_time_step(const int itypfb[],
21272127 /* First pass allocate and compute it */
21282128 if (extra_i[phase_id].grad_pr == nullptr ) {
21292129 const cs_lnum_t ncelet = cs_glob_mesh->n_cells_with_ghosts ;
2130- CS_MALLOC (extra_i[phase_id].grad_pr , ncelet, cs_real_3_t );
2130+ CS_MALLOC_HD (extra_i[phase_id].grad_pr , ncelet, cs_real_3_t );
21312131
21322132 // TODO : check if the pressure and velocity allocs can be removed
21332133 if ( ( cs_glob_lagr_time_scheme->interpol_field != 0
21342134 || cs_glob_lagr_time_scheme->extended_t_scheme != 0 )
21352135 && cs_glob_lagr_model->idistu == 1 )
2136- CS_MALLOC (extra_i[phase_id].grad_lagr_time , ncelet, cs_real_3_t );
2136+ CS_MALLOC_HD (extra_i[phase_id].grad_lagr_time , ncelet, cs_real_3_t );
21372137
21382138 if ( cs_glob_lagr_model->modcpl > 0
21392139 || cs_glob_lagr_model->shape > 0
21402140 || cs_glob_lagr_time_scheme->interpol_field != 0 )
2141- CS_MALLOC (extra_i[phase_id].grad_vel , ncelet, cs_real_33_t );
2141+ CS_MALLOC_HD (extra_i[phase_id].grad_vel , ncelet, cs_real_33_t );
21422142
21432143 if ( cs_glob_lagr_model->physical_model != CS_LAGR_PHYS_OFF
21442144 && extra->temperature != nullptr
21452145 && cs_glob_lagr_time_scheme->interpol_field > 0
21462146 && phase_id == 0 )
2147- CS_MALLOC (extra_i[phase_id].grad_tempf , ncelet, cs_real_3_t );
2147+ CS_MALLOC_HD (extra_i[phase_id].grad_tempf , ncelet, cs_real_3_t );
21482148
21492149 /* Allocate the gradients of second order statistics */
21502150 for (int i = 0 ; i < 9 ; i++)
2151- CS_MALLOC (extra_i[phase_id].grad_cov_skp [i], ncelet, cs_real_3_t );
2151+ CS_MALLOC_HD (extra_i[phase_id].grad_cov_skp [i], ncelet, cs_real_3_t );
21522152 for (int i = 0 ; i < 6 ; i++)
2153- CS_MALLOC (extra_i[phase_id].grad_cov_sk [i], ncelet, cs_real_3_t );
2153+ CS_MALLOC_HD (extra_i[phase_id].grad_cov_sk [i], ncelet, cs_real_3_t );
21542154
21552155 if ( cs_glob_lagr_time_scheme->extended_t_scheme !=0
21562156 && cs_glob_lagr_model->idistu == 1 ) {
2157- CS_MALLOC (extra_i[phase_id].grad_lagr_time , ncelet, cs_real_3_t );
2157+ CS_MALLOC_HD (extra_i[phase_id].grad_lagr_time , ncelet, cs_real_3_t );
21582158 if (cs_glob_lagr_model->modcpl == 1 )
2159- CS_MALLOC (extra_i[phase_id].grad_lagr_time_r_et , ncelet, cs_real_3_t );
2159+ CS_MALLOC_HD (extra_i[phase_id].grad_lagr_time_r_et , ncelet, cs_real_3_t );
21602160 }
21612161
21622162 if (cs_glob_lagr_model->modcpl > 0 ) {
2163- CS_MALLOC (extra_i[phase_id].anisotropic_lagr_time , ncelet, cs_real_3_t );
2164- CS_MALLOC (extra_i[phase_id].anisotropic_bx , ncelet, cs_real_3_t );
2163+ CS_MALLOC_HD (extra_i[phase_id].anisotropic_lagr_time , ncelet, cs_real_3_t );
2164+ CS_MALLOC_HD (extra_i[phase_id].anisotropic_bx , ncelet, cs_real_3_t );
21652165 }
21662166 cs_lagr_aux_mean_fluid_quantities (0 ,
21672167 phase_id,
@@ -2257,8 +2257,8 @@ cs_lagr_solve_time_step(const int itypfb[],
22572257 n_occupied_cells
22582258 = _get_n_occupied_cells (p_set, 0 , p_set->n_particles );
22592259
2260- CS_MALLOC (occupied_cell_ids, n_occupied_cells, cs_lnum_t );
2261- CS_MALLOC (particle_list, n_occupied_cells+1 , cs_lnum_t );
2260+ CS_MALLOC_HD (occupied_cell_ids, n_occupied_cells, cs_lnum_t );
2261+ CS_MALLOC_HD (particle_list, n_occupied_cells+1 , cs_lnum_t );
22622262
22632263 _occupied_cells (p_set, 0 , p_set->n_particles ,
22642264 n_occupied_cells,
@@ -2275,7 +2275,7 @@ cs_lagr_solve_time_step(const int itypfb[],
22752275 /* Initialize lists (ids of cells and particles) */
22762276 cs_lnum_t *cell_particle_idx;
22772277
2278- CS_MALLOC (cell_particle_idx, n_occupied_cells+1 , cs_lnum_t );
2278+ CS_MALLOC_HD (cell_particle_idx, n_occupied_cells+1 , cs_lnum_t );
22792279 cell_particle_idx[0 ] = 0 ;
22802280
22812281 cs_lnum_t enter_parts = p_set->n_particles ;
0 commit comments