7 #ifndef WARPX_LaserProfiles_H_ 8 #define WARPX_LaserProfiles_H_ 10 #include <AMReX_Gpu.H> 11 #include <AMReX_ParmParse.H> 12 #include <AMReX_Parser.H> 13 #include <AMReX_REAL.H> 14 #include <AMReX_Vector.H> 34 amrex::Vector<amrex::Real>
p_X;
35 amrex::Vector<amrex::Real>
nvec;
66 const amrex::ParmParse& ppl,
67 const amrex::ParmParse& ppc,
94 amrex::Real
const * AMREX_RESTRICT
const Xp,
95 amrex::Real
const * AMREX_RESTRICT
const Yp,
97 amrex::Real * AMREX_RESTRICT
const amplitude)
const = 0;
111 const amrex::ParmParse& ppl,
112 const amrex::ParmParse& ppc,
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();
132 amrex::Real focal_distance = std::numeric_limits<amrex::Real>::quiet_NaN();
133 amrex::Real zeta = 0;
134 amrex::Real beta = 0;
135 amrex::Real phi2 = 0;
136 amrex::Real phi0 = 0;
154 const amrex::ParmParse& ppl,
155 const amrex::ParmParse& ppc,
165 amrex::Real
const * AMREX_RESTRICT
const Xp,
166 amrex::Real
const * AMREX_RESTRICT
const Yp,
168 amrex::Real * AMREX_RESTRICT
const amplitude)
const override final;
172 amrex::Real waist = std::numeric_limits<amrex::Real>::quiet_NaN();
173 amrex::Real duration = std::numeric_limits<amrex::Real>::quiet_NaN();
174 amrex::Real focal_distance = std::numeric_limits<amrex::Real>::quiet_NaN();
189 const amrex::ParmParse& ppl,
190 const amrex::ParmParse& ppc,
200 amrex::Real
const * AMREX_RESTRICT
const Xp,
201 amrex::Real
const * AMREX_RESTRICT
const Yp,
203 amrex::Real * AMREX_RESTRICT
const amplitude)
const override final;
225 const amrex::ParmParse& ppl,
226 const amrex::ParmParse& ppc,
234 update (amrex::Real t)
override final;
252 amrex::Real
const * AMREX_RESTRICT
const Xp,
253 amrex::Real
const * AMREX_RESTRICT
const Yp,
255 amrex::Real * AMREX_RESTRICT
const amplitude)
const override final;
268 void internal_fill_amplitude_uniform(
269 const int idx_t_left,
271 amrex::Real
const * AMREX_RESTRICT
const Xp,
272 amrex::Real
const * AMREX_RESTRICT
const Yp,
274 amrex::Real * AMREX_RESTRICT
const amplitude)
const;
287 void internal_fill_amplitude_nonuniform(
288 const int idx_t_left,
290 amrex::Real
const * AMREX_RESTRICT
const Xp,
291 amrex::Real
const * AMREX_RESTRICT
const Yp,
293 amrex::Real * AMREX_RESTRICT
const amplitude)
const;
311 void parse_txye_file(std::string txye_file_name);
318 std::pair<int,int> find_left_right_time_indices(amrex::Real t)
const;
327 void read_data_t_chuck(
int t_begin,
int t_end);
337 bool is_grid_uniform =
false;
363 amrex::Gpu::DeviceVector<amrex::Real>
E_data;
366 amrex::Real t_delay = amrex::Real(0.0);
380 std::function<std::unique_ptr<ILaserProfile>()>
385 [] () {
return std::make_unique<GaussianLaserProfile>();} },
387 [] () {
return std::make_unique<HarrisLaserProfile>();} },
388 {
"parse_field_function",
389 [] () {
return std::make_unique<FieldFunctionLaserProfile>();} },
391 [] () {
return std::make_unique<FromTXYEFileLaserProfile>();} }
396 #endif //WARPX_LaserProfiles_H_ amrex::Gpu::DeviceVector< amrex::Real > d_x_coords
Definition: LaserProfiles.H:350
amrex::Vector< amrex::Real > nvec
Definition: LaserProfiles.H:35
Definition: LaserProfiles.H:30
Definition: LaserProfiles.H:183
int last_time_index
Definition: LaserProfiles.H:361
amrex::Gpu::DeviceVector< amrex::Real > d_y_coords
Definition: LaserProfiles.H:355
void update(amrex::Real) override final
Definition: LaserProfiles.H:195
amrex::Gpu::DeviceVector< amrex::Real > E_data
Definition: LaserProfiles.H:363
amrex::Vector< amrex::Real > h_x_coords
Definition: LaserProfiles.H:349
int ny
Definition: LaserProfiles.H:341
CommonLaserParameters m_common_params
Definition: LaserProfiles.H:177
amrex::Vector< amrex::Real > h_y_coords
Definition: LaserProfiles.H:354
int first_time_index
Definition: LaserProfiles.H:359
Definition: LaserProfiles.H:24
int time_chunk_size
Definition: LaserProfiles.H:357
Definition: LaserProfiles.H:219
amrex::Vector< amrex::Real > t_coords
Definition: LaserProfiles.H:345
void update(amrex::Real) override final
Definition: LaserProfiles.H:160
const std::map< std::string, std::function< std::unique_ptr< ILaserProfile >)>> laser_profiles_dictionary
Definition: LaserProfiles.H:382
amrex::Real e_max
central wavelength
Definition: LaserProfiles.H:33
amrex::Vector< amrex::Real > p_X
maximum electric field at peak
Definition: LaserProfiles.H:34
amrex::Parser m_parser
Definition: LaserProfiles.H:210
std::string field_function
Definition: LaserProfiles.H:207
amrex::Real wavelength
Definition: LaserProfiles.H:32
void update(amrex::Real) override final
Definition: LaserProfiles.H:117
Definition: LaserProfiles.H:49
CommonLaserParameters m_common_params
Definition: LaserProfiles.H:370
CommonLaserParameters m_common_params
Definition: LaserProfiles.H:142
amrex::Vector< amrex::Real > stc_direction
Definition: LaserProfiles.H:138
Definition: LaserProfiles.H:148
std::string txye_file_name
Definition: LaserProfiles.H:335
virtual ~ILaserProfile()
Definition: LaserProfiles.H:99
Definition: GetExternalFields.H:15
Definition: LaserProfiles.H:105
amrex::Real theta_stc
Direction of the spatio-temporal couplings.
Definition: LaserProfiles.H:139