6
6
*/
7
7
#include " Laser/LaserProfiles.H"
8
8
9
- #include " Utils/Algorithms/LinearInterpolation.H"
10
9
#include " Utils/Parser/ParserUtils.H"
11
10
#include " Utils/TextMsg.H"
12
11
#include " Utils/WarpX_Complex.H"
13
12
#include " Utils/WarpXConst.H"
14
13
14
+ #include < ablastr/math/LinearInterpolation.H>
15
15
#include < ablastr/warn_manager/WarnManager.H>
16
16
17
17
#include < AMReX.H>
@@ -489,7 +489,7 @@ WarpXLaserProfiles::FromFileLaserProfile::internal_fill_amplitude_uniform_cartes
489
489
(i_interp-tmp_idx_first_time)*tmp_nx*tmp_ny+
490
490
j_interp*tmp_nx + k_interp;
491
491
};
492
- const Complex val = utils::algorithms ::trilinear_interp (
492
+ const Complex val = ablastr::math ::trilinear_interp (
493
493
t_left, t_right,
494
494
x_0, x_1,
495
495
y_0, y_1,
@@ -574,33 +574,35 @@ WarpXLaserProfiles::FromFileLaserProfile::internal_fill_amplitude_uniform_cylind
574
574
Complex fact = Complex{costheta, sintheta};
575
575
576
576
// 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);
585
586
586
587
// higher modes
587
588
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 ()) ;
604
606
fact = fact*Complex{costheta, sintheta};
605
607
}
606
608
amplitude[i] = (val*exp_omega_t ).real ();
@@ -683,7 +685,7 @@ WarpXLaserProfiles::FromFileLaserProfile::internal_fill_amplitude_uniform_binary
683
685
(i_interp-tmp_idx_first_time)*tmp_nx*tmp_ny+
684
686
j_interp*tmp_ny + k_interp;
685
687
};
686
- amplitude[i] = utils::algorithms ::trilinear_interp (
688
+ amplitude[i] = ablastr::math ::trilinear_interp (
687
689
t_left, t_right,
688
690
x_0, x_1,
689
691
y_0, y_1,
@@ -702,7 +704,7 @@ WarpXLaserProfiles::FromFileLaserProfile::internal_fill_amplitude_uniform_binary
702
704
const auto idx = [=](int i_interp, int j_interp){
703
705
return (i_interp-tmp_idx_first_time) * tmp_nx + j_interp;
704
706
};
705
- amplitude[i] = utils::algorithms ::bilinear_interp (
707
+ amplitude[i] = ablastr::math ::bilinear_interp (
706
708
t_left, t_right,
707
709
x_0, x_1,
708
710
p_E_binary_data[idx (idx_t_left, idx_x_left)],
0 commit comments