7 #ifndef WARPX_LaserProfiles_H_
8 #define WARPX_LaserProfiles_H_
93 amrex::Real
const * AMREX_RESTRICT
const Xp,
94 amrex::Real
const * AMREX_RESTRICT
const Yp,
96 amrex::Real * AMREX_RESTRICT
const amplitude)
const = 0;
120 amrex::Real
const * AMREX_RESTRICT
const Xp,
121 amrex::Real
const * AMREX_RESTRICT
const Yp,
123 amrex::Real * AMREX_RESTRICT
const amplitude)
const override final;
127 amrex::Real
waist = std::numeric_limits<amrex::Real>::quiet_NaN();
128 amrex::Real
duration = std::numeric_limits<amrex::Real>::quiet_NaN();
129 amrex::Real
t_peak = std::numeric_limits<amrex::Real>::quiet_NaN();
162 amrex::Real
const * AMREX_RESTRICT
const Xp,
163 amrex::Real
const * AMREX_RESTRICT
const Yp,
165 amrex::Real * AMREX_RESTRICT
const amplitude)
const override final;
195 update (amrex::Real t)
override final;
216 amrex::Real *
AMREX_RESTRICT const amplitude)
const override final;
230 const int idx_t_left,
249 const int idx_t_left,
355 std::function<std::unique_ptr<ILaserProfile>()>
360 [] () {
return std::make_unique<GaussianLaserProfile>();} },
361 {
"parse_field_function",
362 [] () {
return std::make_unique<FieldFunctionLaserProfile>();} },
364 [] () {
return std::make_unique<FromFileLaserProfile>();} }
Definition: LaserProfiles.H:147
struct WarpXLaserProfiles::FieldFunctionLaserProfile::@5 m_params
amrex::Parser m_parser
Definition: LaserProfiles.H:172
void init(const amrex::ParmParse &ppl, CommonLaserParameters params) override final
Definition: LaserProfileFieldFunction.cpp:28
std::string field_function
Definition: LaserProfiles.H:169
void update(amrex::Real) override final
Definition: LaserProfiles.H:157
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:182
std::string binary_file_name
Definition: LaserProfiles.H:308
int last_time_index
Definition: LaserProfiles.H:334
amrex::Real y_max
Definition: LaserProfiles.H:328
int first_time_index
Definition: LaserProfiles.H:332
amrex::Real t_max
Definition: LaserProfiles.H:320
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 and for the lasy format. This function canno...
Definition: LaserProfileFromFile.cpp:385
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:144
int time_chunk_size
Definition: LaserProfiles.H:330
void init(const amrex::ParmParse &ppl, CommonLaserParameters params) override final
Definition: LaserProfileFromFile.cpp:55
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:214
int nt
Definition: LaserProfiles.H:316
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:287
bool file_in_lasy_format
Definition: LaserProfiles.H:312
std::string lasy_file_name
Definition: LaserProfiles.H:310
void update(amrex::Real t) override final
Reads new field data chunk from file if needed.
Definition: LaserProfileFromFile.cpp:124
amrex::Real y_min
Definition: LaserProfiles.H:326
CommonLaserParameters m_common_params
Definition: LaserProfiles.H:345
amrex::Real t_delay
Definition: LaserProfiles.H:341
amrex::Gpu::DeviceVector< Complex > E_lasy_data
Definition: LaserProfiles.H:336
void parse_lasy_file(std::string lasy_file_name)
parse a field file in the HDF5 'lasy' format
Definition: LaserProfileFromFile.cpp:171
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:329
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:471
int nx
Definition: LaserProfiles.H:316
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:277
amrex::Real x_max
Definition: LaserProfiles.H:324
amrex::Gpu::DeviceVector< amrex::Real > E_binary_data
Definition: LaserProfiles.H:338
struct WarpXLaserProfiles::FromFileLaserProfile::@6 m_params
m_params contains all the internal parameters used by this laser profile
int ny
Definition: LaserProfiles.H:316
amrex::Real x_min
Definition: LaserProfiles.H:322
amrex::Real t_min
Definition: LaserProfiles.H:318
Definition: LaserProfiles.H:105
amrex::Real phi2
Definition: LaserProfiles.H:133
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:131
amrex::Real theta_stc
Direction of the spatio-temporal couplings.
Definition: LaserProfiles.H:137
amrex::Real phi0
Definition: LaserProfiles.H:134
amrex::Real focal_distance
Definition: LaserProfiles.H:130
struct WarpXLaserProfiles::GaussianLaserProfile::@4 m_params
amrex::Real t_peak
Definition: LaserProfiles.H:129
amrex::Real duration
Definition: LaserProfiles.H:128
void init(const amrex::ParmParse &ppl, CommonLaserParameters params) override final
Definition: LaserProfileGaussian.cpp:33
CommonLaserParameters m_common_params
Definition: LaserProfiles.H:140
amrex::Real waist
Definition: LaserProfiles.H:127
amrex::Vector< amrex::Real > stc_direction
Definition: LaserProfiles.H:136
void update(amrex::Real) override final
Definition: LaserProfiles.H:115
amrex::Real beta
Definition: LaserProfiles.H:132
Definition: LaserProfiles.H:51
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:98
Definition: LaserProfiles.H:25
const std::map< std::string, std::function< std::unique_ptr< ILaserProfile >)>> laser_profiles_dictionary
Definition: LaserProfiles.H:357
Definition: LaserProfiles.H:32
amrex::Real e_max
central wavelength
Definition: LaserProfiles.H:34
amrex::Real wavelength
Definition: LaserProfiles.H:33
amrex::Vector< amrex::Real > p_X
maximum electric field at peak
Definition: LaserProfiles.H:35
amrex::Vector< amrex::Real > nvec
Definition: LaserProfiles.H:36