7 #ifndef WARPX_LaserProfiles_H_
8 #define WARPX_LaserProfiles_H_
92 amrex::Real
const * AMREX_RESTRICT
const Xp,
93 amrex::Real
const * AMREX_RESTRICT
const Yp,
95 amrex::Real * AMREX_RESTRICT
const amplitude)
const = 0;
119 amrex::Real
const * AMREX_RESTRICT
const Xp,
120 amrex::Real
const * AMREX_RESTRICT
const Yp,
122 amrex::Real * AMREX_RESTRICT
const amplitude)
const override final;
126 amrex::Real
waist = std::numeric_limits<amrex::Real>::quiet_NaN();
127 amrex::Real
duration = std::numeric_limits<amrex::Real>::quiet_NaN();
128 amrex::Real
t_peak = std::numeric_limits<amrex::Real>::quiet_NaN();
161 amrex::Real
const * AMREX_RESTRICT
const Xp,
162 amrex::Real
const * AMREX_RESTRICT
const Yp,
164 amrex::Real * AMREX_RESTRICT
const amplitude)
const override final;
168 amrex::Real
waist = std::numeric_limits<amrex::Real>::quiet_NaN();
169 amrex::Real
duration = std::numeric_limits<amrex::Real>::quiet_NaN();
195 amrex::Real
const * AMREX_RESTRICT
const Xp,
196 amrex::Real
const * AMREX_RESTRICT
const Yp,
198 amrex::Real * AMREX_RESTRICT
const amplitude)
const override final;
228 update (amrex::Real t)
override final;
249 amrex::Real *
AMREX_RESTRICT const amplitude)
const override final;
263 const int idx_t_left,
282 const int idx_t_left,
374 std::function<std::unique_ptr<ILaserProfile>()>
379 [] () {
return std::make_unique<GaussianLaserProfile>();} },
381 [] () {
return std::make_unique<HarrisLaserProfile>();} },
382 {
"parse_field_function",
383 [] () {
return std::make_unique<FieldFunctionLaserProfile>();} },
385 [] () {
return std::make_unique<FromTXYEFileLaserProfile>();} }
Definition: LaserProfiles.H:180
struct WarpXLaserProfiles::FieldFunctionLaserProfile::@6 m_params
amrex::Parser m_parser
Definition: LaserProfiles.H:205
void init(const amrex::ParmParse &ppl, CommonLaserParameters params) override final
Definition: LaserProfileFieldFunction.cpp:28
std::string field_function
Definition: LaserProfiles.H:202
void update(amrex::Real) override final
Definition: LaserProfiles.H:190
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:215
void read_data_t_chuck(int t_begin, int t_end)
Load field data within the temporal range [t_begin, t_end)
Definition: LaserProfileFromTXYEFile.cpp:279
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: LaserProfileFromTXYEFile.cpp:111
bool is_grid_uniform
Definition: LaserProfiles.H:331
amrex::Real t_delay
Definition: LaserProfiles.H:360
int nt
Definition: LaserProfiles.H:335
void update(amrex::Real t) override final
Reads new field data chunk from file if needed.
Definition: LaserProfileFromTXYEFile.cpp:93
struct WarpXLaserProfiles::FromTXYEFileLaserProfile::@7 m_params
m_params contains all the internal parameters used by this laser profile
amrex::Vector< amrex::Real > h_y_coords
Definition: LaserProfiles.H:348
int first_time_index
Definition: LaserProfiles.H:353
CommonLaserParameters m_common_params
Definition: LaserProfiles.H:364
std::pair< int, int > find_left_right_time_indices(amrex::Real t) const
Finds left and right time indices corresponding to time t.
Definition: LaserProfileFromTXYEFile.cpp:260
int nx
Definition: LaserProfiles.H:335
amrex::Gpu::DeviceVector< amrex::Real > d_y_coords
Definition: LaserProfiles.H:349
int ny
Definition: LaserProfiles.H:335
void internal_fill_amplitude_nonuniform(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 non-uniform grid. This function cannot be private due to ...
Definition: LaserProfileFromTXYEFile.cpp:443
amrex::Gpu::DeviceVector< amrex::Real > d_x_coords
Definition: LaserProfiles.H:344
amrex::Vector< amrex::Real > t_coords
Definition: LaserProfiles.H:339
amrex::Gpu::DeviceVector< amrex::Real > E_data
Definition: LaserProfiles.H:357
amrex::Vector< amrex::Real > h_x_coords
Definition: LaserProfiles.H:343
int time_chunk_size
Definition: LaserProfiles.H:351
int last_time_index
Definition: LaserProfiles.H:355
std::string txye_file_name
Definition: LaserProfiles.H:329
void internal_fill_amplitude_uniform(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. This function cannot be private due to rest...
Definition: LaserProfileFromTXYEFile.cpp:329
void init(const amrex::ParmParse &ppl, CommonLaserParameters params) override final
Definition: LaserProfileFromTXYEFile.cpp:46
void parse_txye_file(std::string txye_file_name)
parse a field file in the binary 'txye' format (whose details are given below).
Definition: LaserProfileFromTXYEFile.cpp:144
Definition: LaserProfiles.H:104
amrex::Real phi2
Definition: LaserProfiles.H:132
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:130
amrex::Real theta_stc
Direction of the spatio-temporal couplings.
Definition: LaserProfiles.H:136
amrex::Real phi0
Definition: LaserProfiles.H:133
amrex::Real focal_distance
Definition: LaserProfiles.H:129
struct WarpXLaserProfiles::GaussianLaserProfile::@4 m_params
amrex::Real t_peak
Definition: LaserProfiles.H:128
amrex::Real duration
Definition: LaserProfiles.H:127
void init(const amrex::ParmParse &ppl, CommonLaserParameters params) override final
Definition: LaserProfileGaussian.cpp:33
CommonLaserParameters m_common_params
Definition: LaserProfiles.H:139
amrex::Real waist
Definition: LaserProfiles.H:126
amrex::Vector< amrex::Real > stc_direction
Definition: LaserProfiles.H:135
void update(amrex::Real) override final
Definition: LaserProfiles.H:114
amrex::Real beta
Definition: LaserProfiles.H:131
Definition: LaserProfiles.H:146
void init(const amrex::ParmParse &ppl, CommonLaserParameters params) override final
Definition: LaserProfileHarris.cpp:23
amrex::Real waist
Definition: LaserProfiles.H:168
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: LaserProfileHarris.cpp:51
CommonLaserParameters m_common_params
Definition: LaserProfiles.H:173
void update(amrex::Real) override final
Definition: LaserProfiles.H:156
amrex::Real focal_distance
Definition: LaserProfiles.H:170
amrex::Real duration
Definition: LaserProfiles.H:169
struct WarpXLaserProfiles::HarrisLaserProfile::@5 m_params
Definition: LaserProfiles.H:50
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:97
Definition: LaserProfiles.H:24
const std::map< std::string, std::function< std::unique_ptr< ILaserProfile >)>> laser_profiles_dictionary
Definition: LaserProfiles.H:376
Definition: LaserProfiles.H:31
amrex::Real e_max
central wavelength
Definition: LaserProfiles.H:33
amrex::Real wavelength
Definition: LaserProfiles.H:32
amrex::Vector< amrex::Real > p_X
maximum electric field at peak
Definition: LaserProfiles.H:34
amrex::Vector< amrex::Real > nvec
Definition: LaserProfiles.H:35