7 #ifndef WARPX_LaserProfiles_H_
8 #define WARPX_LaserProfiles_H_
95 amrex::Real
const * AMREX_RESTRICT Xp,
96 amrex::Real
const * AMREX_RESTRICT Yp,
98 amrex::Real* AMREX_RESTRICT amplitude)
const = 0;
128 amrex::Real
const * AMREX_RESTRICT Xp,
129 amrex::Real
const * AMREX_RESTRICT Yp,
131 amrex::Real * AMREX_RESTRICT amplitude)
const final;
135 amrex::Real
waist = std::numeric_limits<amrex::Real>::quiet_NaN();
136 amrex::Real
duration = std::numeric_limits<amrex::Real>::quiet_NaN();
137 amrex::Real
t_peak = std::numeric_limits<amrex::Real>::quiet_NaN();
170 amrex::Real
const * AMREX_RESTRICT Xp,
171 amrex::Real
const * AMREX_RESTRICT Yp,
173 amrex::Real * AMREX_RESTRICT amplitude)
const final;
203 update (amrex::Real t)
final;
393 std::function<std::unique_ptr<ILaserProfile>()>
398 [] () {
return std::make_unique<GaussianLaserProfile>();} },
399 {
"parse_field_function",
400 [] () {
return std::make_unique<FieldFunctionLaserProfile>();} },
402 [] () {
return std::make_unique<FromFileLaserProfile>();} }
Definition: LaserProfiles.H:155
struct WarpXLaserProfiles::FieldFunctionLaserProfile::@5 m_params
void fill_amplitude(int np, amrex::Real const *AMREX_RESTRICT Xp, amrex::Real const *AMREX_RESTRICT Yp, amrex::Real t, amrex::Real *AMREX_RESTRICT amplitude) const final
Definition: LaserProfileFieldFunction.cpp:39
void init(const amrex::ParmParse &ppl, CommonLaserParameters params) final
Definition: LaserProfileFieldFunction.cpp:28
amrex::Parser m_parser
Definition: LaserProfiles.H:180
std::string field_function
Definition: LaserProfiles.H:177
void update(amrex::Real) final
Definition: LaserProfiles.H:165
Definition: LaserProfiles.H:190
std::string binary_file_name
Definition: LaserProfiles.H:338
int last_time_index
Definition: LaserProfiles.H:372
amrex::Real y_max
Definition: LaserProfiles.H:364
void internal_fill_amplitude_uniform_binary(int idx_t_left, int np, amrex::Real const *AMREX_RESTRICT Xp, amrex::Real const *AMREX_RESTRICT Yp, amrex::Real t, amrex::Real *AMREX_RESTRICT amplitude) const
Function to fill the amplitude in case of a uniform grid and for the binary format....
Definition: LaserProfileFromFile.cpp:612
void fill_amplitude(int np, amrex::Real const *AMREX_RESTRICT Xp, amrex::Real const *AMREX_RESTRICT Yp, amrex::Real t, amrex::Real *AMREX_RESTRICT amplitude) const final
compute field amplitude at particles' position for a laser beam loaded from an E(x,...
Definition: LaserProfileFromFile.cpp:134
int first_time_index
Definition: LaserProfiles.H:370
amrex::Real t_max
Definition: LaserProfiles.H:356
int time_chunk_size
Definition: LaserProfiles.H:368
amrex::Real r_max
Definition: LaserProfiles.H:366
void init(const amrex::ParmParse &ppl, CommonLaserParameters params) final
Definition: LaserProfileFromFile.cpp:53
int file_in_cartesian_geom
Definition: LaserProfiles.H:344
int nt
Definition: LaserProfiles.H:348
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:313
void internal_fill_amplitude_uniform_cylindrical(int idx_t_left, int np, amrex::Real const *AMREX_RESTRICT Xp, amrex::Real const *AMREX_RESTRICT Yp, amrex::Real t, amrex::Real *AMREX_RESTRICT amplitude) const
Function to fill the amplitude in case of a uniform grid and for the lasy format in RZ geometry....
Definition: LaserProfileFromFile.cpp:513
bool file_in_lasy_format
Definition: LaserProfiles.H:342
std::string lasy_file_name
Definition: LaserProfiles.H:340
void parse_lasy_file(const std::string &lasy_file_name)
parse a field file in the HDF5 'lasy' format
Definition: LaserProfileFromFile.cpp:165
void internal_fill_amplitude_uniform_cartesian(int idx_t_left, int np, amrex::Real const *AMREX_RESTRICT Xp, amrex::Real const *AMREX_RESTRICT Yp, amrex::Real t, amrex::Real *AMREX_RESTRICT amplitude) const
Function to fill the amplitude in case of a uniform grid and for the lasy format in 3D Cartesian....
Definition: LaserProfileFromFile.cpp:428
int nr
Definition: LaserProfiles.H:350
amrex::Real y_min
Definition: LaserProfiles.H:362
CommonLaserParameters m_common_params
Definition: LaserProfiles.H:383
void parse_binary_file(const std::string &binary_file_name)
parse a field file in the binary 'binary' format (whose details are given below).
Definition: LaserProfileFromFile.cpp:240
amrex::Real t_delay
Definition: LaserProfiles.H:379
amrex::Gpu::DeviceVector< Complex > E_lasy_data
Definition: LaserProfiles.H:374
amrex::Real r_min
Definition: LaserProfiles.H:365
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:372
int nx
Definition: LaserProfiles.H:348
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:303
amrex::Real x_max
Definition: LaserProfiles.H:360
amrex::Gpu::DeviceVector< amrex::Real > E_binary_data
Definition: LaserProfiles.H:376
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:352
void update(amrex::Real t) final
Reads new field data chunk from file if needed.
Definition: LaserProfileFromFile.cpp:114
int ny
Definition: LaserProfiles.H:348
amrex::Real x_min
Definition: LaserProfiles.H:358
amrex::Real t_min
Definition: LaserProfiles.H:354
Definition: LaserProfiles.H:113
amrex::Real phi2
Definition: LaserProfiles.H:141
amrex::Real zeta
Definition: LaserProfiles.H:139
amrex::Real theta_stc
Direction of the spatio-temporal couplings.
Definition: LaserProfiles.H:145
amrex::Real phi0
Definition: LaserProfiles.H:142
void fill_amplitude(int np, amrex::Real const *AMREX_RESTRICT Xp, amrex::Real const *AMREX_RESTRICT Yp, amrex::Real t, amrex::Real *AMREX_RESTRICT amplitude) const final
Definition: LaserProfileGaussian.cpp:100
amrex::Real focal_distance
Definition: LaserProfiles.H:138
struct WarpXLaserProfiles::GaussianLaserProfile::@4 m_params
amrex::Real t_peak
Definition: LaserProfiles.H:137
amrex::Real duration
Definition: LaserProfiles.H:136
CommonLaserParameters m_common_params
Definition: LaserProfiles.H:148
void update(amrex::Real) final
Definition: LaserProfiles.H:123
amrex::Real waist
Definition: LaserProfiles.H:135
amrex::Vector< amrex::Real > stc_direction
Definition: LaserProfiles.H:144
void init(const amrex::ParmParse &ppl, CommonLaserParameters params) final
Definition: LaserProfileGaussian.cpp:33
amrex::Real beta
Definition: LaserProfiles.H:140
Definition: LaserProfiles.H:53
ILaserProfile(ILaserProfile const &)=default
virtual void update(amrex::Real t)=0
virtual ~ILaserProfile()=default
virtual void init(const amrex::ParmParse &ppl, CommonLaserParameters params)=0
virtual void fill_amplitude(int np, amrex::Real const *AMREX_RESTRICT Xp, amrex::Real const *AMREX_RESTRICT Yp, amrex::Real t, amrex::Real *AMREX_RESTRICT amplitude) const =0
ILaserProfile(ILaserProfile &&)=default
ILaserProfile & operator=(ILaserProfile const &)=default
Definition: LaserProfiles.H:27
const std::map< std::string, std::function< std::unique_ptr< ILaserProfile >)>> laser_profiles_dictionary
Definition: LaserProfiles.H:395
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