7 #ifndef WARPX_LaserProfiles_H_
8 #define WARPX_LaserProfiles_H_
95 amrex::Real
const * AMREX_RESTRICT
const Xp,
96 amrex::Real
const * AMREX_RESTRICT
const Yp,
98 amrex::Real * AMREX_RESTRICT
const amplitude)
const = 0;
122 amrex::Real
const * AMREX_RESTRICT
const Xp,
123 amrex::Real
const * AMREX_RESTRICT
const Yp,
125 amrex::Real * AMREX_RESTRICT
const amplitude)
const override final;
129 amrex::Real
waist = std::numeric_limits<amrex::Real>::quiet_NaN();
130 amrex::Real
duration = std::numeric_limits<amrex::Real>::quiet_NaN();
131 amrex::Real
t_peak = std::numeric_limits<amrex::Real>::quiet_NaN();
164 amrex::Real
const * AMREX_RESTRICT
const Xp,
165 amrex::Real
const * AMREX_RESTRICT
const Yp,
167 amrex::Real * AMREX_RESTRICT
const amplitude)
const override final;
197 update (amrex::Real t)
override final;
218 amrex::Real *
AMREX_RESTRICT const amplitude)
const override final;
232 const int idx_t_left,
251 const int idx_t_left,
272 const int idx_t_left,
387 std::function<std::unique_ptr<ILaserProfile>()>
392 [] () {
return std::make_unique<GaussianLaserProfile>();} },
393 {
"parse_field_function",
394 [] () {
return std::make_unique<FieldFunctionLaserProfile>();} },
396 [] () {
return std::make_unique<FromFileLaserProfile>();} }
Definition: LaserProfiles.H:149
struct WarpXLaserProfiles::FieldFunctionLaserProfile::@5 m_params
amrex::Parser m_parser
Definition: LaserProfiles.H:174
void init(const amrex::ParmParse &ppl, CommonLaserParameters params) override final
Definition: LaserProfileFieldFunction.cpp:28
std::string field_function
Definition: LaserProfiles.H:171
void update(amrex::Real) override final
Definition: LaserProfiles.H:159
void fill_amplitude(const int np, amrex::Real const *AMREX_RESTRICT const Xp, amrex::Real const *AMREX_RESTRICT const Yp, amrex::Real t, amrex::Real *AMREX_RESTRICT const amplitude) const override final
Definition: LaserProfileFieldFunction.cpp:39
Definition: LaserProfiles.H:184
std::string binary_file_name
Definition: LaserProfiles.H:334
int last_time_index
Definition: LaserProfiles.H:366
amrex::Real y_max
Definition: LaserProfiles.H:358
int first_time_index
Definition: LaserProfiles.H:364
amrex::Real t_max
Definition: LaserProfiles.H:350
void internal_fill_amplitude_uniform_cylindrical(const int idx_t_left, const int np, amrex::Real const *AMREX_RESTRICT const Xp, amrex::Real const *AMREX_RESTRICT const Yp, amrex::Real t, amrex::Real *AMREX_RESTRICT const amplitude) const
Function to fill the amplitude in case of a uniform grid and for the lasy format in RZ geometry....
Definition: LaserProfileFromFile.cpp:496
void fill_amplitude(const int np, amrex::Real const *AMREX_RESTRICT const Xp, amrex::Real const *AMREX_RESTRICT const Yp, amrex::Real t, amrex::Real *AMREX_RESTRICT const amplitude) const override final
compute field amplitude at particles' position for a laser beam loaded from an E(x,...
Definition: LaserProfileFromFile.cpp:133
void internal_fill_amplitude_uniform_cartesian(const int idx_t_left, const int np, amrex::Real const *AMREX_RESTRICT const Xp, amrex::Real const *AMREX_RESTRICT const Yp, amrex::Real t, amrex::Real *AMREX_RESTRICT const amplitude) const
Function to fill the amplitude in case of a uniform grid and for the lasy format in 3D Cartesian....
Definition: LaserProfileFromFile.cpp:411
int time_chunk_size
Definition: LaserProfiles.H:362
void init(const amrex::ParmParse &ppl, CommonLaserParameters params) override final
Definition: LaserProfileFromFile.cpp:53
amrex::Real r_max
Definition: LaserProfiles.H:360
void parse_binary_file(std::string binary_file_name)
parse a field file in the binary 'binary' format (whose details are given below).
Definition: LaserProfileFromFile.cpp:221
int nt
Definition: LaserProfiles.H:342
void read_data_t_chunk(int t_begin, int t_end)
Load field data within the temporal range [t_begin, t_end].
Definition: LaserProfileFromFile.cpp:294
bool file_in_lasy_format
Definition: LaserProfiles.H:338
std::string lasy_file_name
Definition: LaserProfiles.H:336
void update(amrex::Real t) override final
Reads new field data chunk from file if needed.
Definition: LaserProfileFromFile.cpp:114
int nr
Definition: LaserProfiles.H:344
amrex::Real y_min
Definition: LaserProfiles.H:356
CommonLaserParameters m_common_params
Definition: LaserProfiles.H:377
amrex::Real t_delay
Definition: LaserProfiles.H:373
amrex::Gpu::DeviceVector< Complex > E_lasy_data
Definition: LaserProfiles.H:368
void parse_lasy_file(std::string lasy_file_name)
parse a field file in the HDF5 'lasy' format
Definition: LaserProfileFromFile.cpp:164
amrex::Real r_min
Definition: LaserProfiles.H:359
void read_binary_data_t_chunk(int t_begin, int t_end)
Load field data within the temporal range [t_begin, t_end].
Definition: LaserProfileFromFile.cpp:355
void internal_fill_amplitude_uniform_binary(const int idx_t_left, const int np, amrex::Real const *AMREX_RESTRICT const Xp, amrex::Real const *AMREX_RESTRICT const Yp, amrex::Real t, amrex::Real *AMREX_RESTRICT const amplitude) const
Function to fill the amplitude in case of a uniform grid and for the binary format....
Definition: LaserProfileFromFile.cpp:595
int nx
Definition: LaserProfiles.H:342
std::pair< int, int > find_left_right_time_indices(amrex::Real t) const
Finds left and right time indices corresponding to time t.
Definition: LaserProfileFromFile.cpp:284
amrex::Real x_max
Definition: LaserProfiles.H:354
amrex::Gpu::DeviceVector< amrex::Real > E_binary_data
Definition: LaserProfiles.H:370
std::string fileGeom
Definition: LaserProfiles.H:332
struct WarpXLaserProfiles::FromFileLaserProfile::@6 m_params
m_params contains all the internal parameters used by this laser profile
int n_rz_azimuthal_components
Definition: LaserProfiles.H:346
int ny
Definition: LaserProfiles.H:342
amrex::Real x_min
Definition: LaserProfiles.H:352
amrex::Real t_min
Definition: LaserProfiles.H:348
Definition: LaserProfiles.H:107
amrex::Real phi2
Definition: LaserProfiles.H:135
void fill_amplitude(const int np, amrex::Real const *AMREX_RESTRICT const Xp, amrex::Real const *AMREX_RESTRICT const Yp, amrex::Real t, amrex::Real *AMREX_RESTRICT const amplitude) const override final
Definition: LaserProfileGaussian.cpp:99
amrex::Real zeta
Definition: LaserProfiles.H:133
amrex::Real theta_stc
Direction of the spatio-temporal couplings.
Definition: LaserProfiles.H:139
amrex::Real phi0
Definition: LaserProfiles.H:136
amrex::Real focal_distance
Definition: LaserProfiles.H:132
struct WarpXLaserProfiles::GaussianLaserProfile::@4 m_params
amrex::Real t_peak
Definition: LaserProfiles.H:131
amrex::Real duration
Definition: LaserProfiles.H:130
void init(const amrex::ParmParse &ppl, CommonLaserParameters params) override final
Definition: LaserProfileGaussian.cpp:33
CommonLaserParameters m_common_params
Definition: LaserProfiles.H:142
amrex::Real waist
Definition: LaserProfiles.H:129
amrex::Vector< amrex::Real > stc_direction
Definition: LaserProfiles.H:138
void update(amrex::Real) override final
Definition: LaserProfiles.H:117
amrex::Real beta
Definition: LaserProfiles.H:134
Definition: LaserProfiles.H:53
virtual void update(amrex::Real t)=0
virtual void fill_amplitude(const int np, amrex::Real const *AMREX_RESTRICT const Xp, amrex::Real const *AMREX_RESTRICT const Yp, amrex::Real t, amrex::Real *AMREX_RESTRICT const amplitude) const =0
virtual void init(const amrex::ParmParse &ppl, CommonLaserParameters params)=0
virtual ~ILaserProfile()
Definition: LaserProfiles.H:100
Definition: LaserProfiles.H:27
const std::map< std::string, std::function< std::unique_ptr< ILaserProfile >)>> laser_profiles_dictionary
Definition: LaserProfiles.H:389
Definition: LaserProfiles.H:34
amrex::Real e_max
central wavelength
Definition: LaserProfiles.H:36
amrex::Real wavelength
Definition: LaserProfiles.H:35
amrex::Vector< amrex::Real > p_X
maximum electric field at peak
Definition: LaserProfiles.H:37
amrex::Vector< amrex::Real > nvec
Definition: LaserProfiles.H:38