66 */
77#include " Laser/LaserProfiles.H"
88
9- #include " Utils/Algorithms/LinearInterpolation.H"
109#include " Utils/Parser/ParserUtils.H"
1110#include " Utils/TextMsg.H"
1211#include " Utils/WarpX_Complex.H"
1312#include " Utils/WarpXConst.H"
1413
14+ #include < ablastr/math/LinearInterpolation.H>
1515#include < ablastr/warn_manager/WarnManager.H>
1616
1717#include < AMReX.H>
@@ -489,7 +489,7 @@ WarpXLaserProfiles::FromFileLaserProfile::internal_fill_amplitude_uniform_cartes
489489 (i_interp-tmp_idx_first_time)*tmp_nx*tmp_ny+
490490 j_interp*tmp_nx + k_interp;
491491 };
492- const Complex val = utils::algorithms ::trilinear_interp (
492+ const Complex val = ablastr::math ::trilinear_interp (
493493 t_left, t_right,
494494 x_0, x_1,
495495 y_0, y_1,
@@ -574,33 +574,35 @@ WarpXLaserProfiles::FromFileLaserProfile::internal_fill_amplitude_uniform_cylind
574574 Complex fact = Complex{costheta, sintheta};
575575
576576 // azimuthal mode 0
577- val += utils::algorithms::bilinear_interp (
578- t_left, t_right,
579- r_0, r_1,
580- p_E_lasy_data[idx (0 , idx_t_left, idx_r_left)],
581- p_E_lasy_data[idx (0 , idx_t_left, idx_r_right)],
582- p_E_lasy_data[idx (0 , idx_t_right, idx_r_left)],
583- p_E_lasy_data[idx (0 , idx_t_right, idx_r_right)],
584- t, Rp_i);
577+ val +=
578+ ablastr::math::bilinear_interp (
579+ t_left, t_right,
580+ r_0, r_1,
581+ p_E_lasy_data[idx (0 , idx_t_left, idx_r_left)],
582+ p_E_lasy_data[idx (0 , idx_t_left, idx_r_right)],
583+ p_E_lasy_data[idx (0 , idx_t_right, idx_r_left)],
584+ p_E_lasy_data[idx (0 , idx_t_right, idx_r_right)],
585+ t, Rp_i);
585586
586587 // higher modes
587588 for (int m=1 ; m <= tmp_n_rz_azimuthal_components/2 ; m++) {
588- val += utils::algorithms::bilinear_interp (
589- t_left, t_right,
590- r_0, r_1,
591- p_E_lasy_data[idx (2 *m-1 , idx_t_left, idx_r_left)],
592- p_E_lasy_data[idx (2 *m-1 , idx_t_left, idx_r_right)],
593- p_E_lasy_data[idx (2 *m-1 , idx_t_right, idx_r_left)],
594- p_E_lasy_data[idx (2 *m-1 , idx_t_right, idx_r_right)],
595- t, Rp_i)*(fact.real ()) +
596- utils::algorithms::bilinear_interp (
597- t_left, t_right,
598- r_0, r_1,
599- p_E_lasy_data[idx (2 *m, idx_t_left, idx_r_left)],
600- p_E_lasy_data[idx (2 *m, idx_t_left, idx_r_right)],
601- p_E_lasy_data[idx (2 *m, idx_t_right, idx_r_left)],
602- p_E_lasy_data[idx (2 *m, idx_t_right, idx_r_right)],
603- t, Rp_i)*(fact.imag ()) ;
589+ val +=
590+ ablastr::math::bilinear_interp (
591+ t_left, t_right,
592+ r_0, r_1,
593+ p_E_lasy_data[idx (2 *m-1 , idx_t_left, idx_r_left)],
594+ p_E_lasy_data[idx (2 *m-1 , idx_t_left, idx_r_right)],
595+ p_E_lasy_data[idx (2 *m-1 , idx_t_right, idx_r_left)],
596+ p_E_lasy_data[idx (2 *m-1 , idx_t_right, idx_r_right)],
597+ t, Rp_i)*(fact.real ()) +
598+ ablastr::math::bilinear_interp (
599+ t_left, t_right,
600+ r_0, r_1,
601+ p_E_lasy_data[idx (2 *m, idx_t_left, idx_r_left)],
602+ p_E_lasy_data[idx (2 *m, idx_t_left, idx_r_right)],
603+ p_E_lasy_data[idx (2 *m, idx_t_right, idx_r_left)],
604+ p_E_lasy_data[idx (2 *m, idx_t_right, idx_r_right)],
605+ t, Rp_i)*(fact.imag ()) ;
604606 fact = fact*Complex{costheta, sintheta};
605607 }
606608 amplitude[i] = (val*exp_omega_t ).real ();
@@ -683,7 +685,7 @@ WarpXLaserProfiles::FromFileLaserProfile::internal_fill_amplitude_uniform_binary
683685 (i_interp-tmp_idx_first_time)*tmp_nx*tmp_ny+
684686 j_interp*tmp_ny + k_interp;
685687 };
686- amplitude[i] = utils::algorithms ::trilinear_interp (
688+ amplitude[i] = ablastr::math ::trilinear_interp (
687689 t_left, t_right,
688690 x_0, x_1,
689691 y_0, y_1,
@@ -702,7 +704,7 @@ WarpXLaserProfiles::FromFileLaserProfile::internal_fill_amplitude_uniform_binary
702704 const auto idx = [=](int i_interp, int j_interp){
703705 return (i_interp-tmp_idx_first_time) * tmp_nx + j_interp;
704706 };
705- amplitude[i] = utils::algorithms ::bilinear_interp (
707+ amplitude[i] = ablastr::math ::bilinear_interp (
706708 t_left, t_right,
707709 x_0, x_1,
708710 p_E_binary_data[idx (idx_t_left, idx_x_left)],
0 commit comments