7 #ifndef WARPX_LaserProfiles_H_ 8 #define WARPX_LaserProfiles_H_ 12 #include <AMReX_REAL.H> 13 #include <AMReX_ParmParse.H> 14 #include <AMReX_Vector.H> 15 #include <AMReX_Gpu.H> 35 amrex::Vector<amrex::Real>
p_X;
36 amrex::Vector<amrex::Real>
nvec;
67 const amrex::ParmParse& ppl,
68 const amrex::ParmParse& ppc,
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;
112 const amrex::ParmParse& ppl,
113 const amrex::ParmParse& ppc,
123 amrex::Real
const * AMREX_RESTRICT
const Xp,
124 amrex::Real
const * AMREX_RESTRICT
const Yp,
126 amrex::Real * AMREX_RESTRICT
const amplitude)
const override final;
130 amrex::Real waist = std::numeric_limits<amrex::Real>::quiet_NaN();
131 amrex::Real duration = std::numeric_limits<amrex::Real>::quiet_NaN();
132 amrex::Real t_peak = std::numeric_limits<amrex::Real>::quiet_NaN();
133 amrex::Real focal_distance = std::numeric_limits<amrex::Real>::quiet_NaN();
134 amrex::Real zeta = 0;
135 amrex::Real beta = 0;
136 amrex::Real phi2 = 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;
226 const amrex::ParmParse& ppl,
227 const amrex::ParmParse& ppc,
235 update (amrex::Real t)
override final;
253 amrex::Real
const * AMREX_RESTRICT
const Xp,
254 amrex::Real
const * AMREX_RESTRICT
const Yp,
256 amrex::Real * AMREX_RESTRICT
const amplitude)
const override final;
269 void internal_fill_amplitude_uniform(
270 const int idx_t_left,
272 amrex::Real
const * AMREX_RESTRICT
const Xp,
273 amrex::Real
const * AMREX_RESTRICT
const Yp,
275 amrex::Real * AMREX_RESTRICT
const amplitude)
const;
288 void internal_fill_amplitude_nonuniform(
289 const int idx_t_left,
291 amrex::Real
const * AMREX_RESTRICT
const Xp,
292 amrex::Real
const * AMREX_RESTRICT
const Yp,
294 amrex::Real * AMREX_RESTRICT
const amplitude)
const;
312 void parse_txye_file(std::string txye_file_name);
319 std::pair<int,int> find_left_right_time_indices(amrex::Real t)
const;
328 void read_data_t_chuck(
int t_begin,
int t_end);
338 bool is_grid_uniform =
false;
364 amrex::Gpu::DeviceVector<amrex::Real>
E_data;
377 std::function<std::unique_ptr<ILaserProfile>()>
382 [] () {
return std::make_unique<GaussianLaserProfile>();} },
384 [] () {
return std::make_unique<HarrisLaserProfile>();} },
385 {
"parse_field_function",
386 [] () {
return std::make_unique<FieldFunctionLaserProfile>();} },
388 [] () {
return std::make_unique<FromTXYEFileLaserProfile>();} }
393 #endif //WARPX_LaserProfiles_H_ amrex::Gpu::DeviceVector< amrex::Real > d_x_coords
Definition: LaserProfiles.H:351
WarpXParser m_parser
Definition: LaserProfiles.H:210
amrex::Vector< amrex::Real > nvec
Definition: LaserProfiles.H:36
Definition: LaserProfiles.H:31
Definition: LaserProfiles.H:183
int last_time_index
Definition: LaserProfiles.H:362
amrex::Gpu::DeviceVector< amrex::Real > d_y_coords
Definition: LaserProfiles.H:356
void update(amrex::Real) override final
Definition: LaserProfiles.H:195
amrex::Gpu::DeviceVector< amrex::Real > E_data
Definition: LaserProfiles.H:364
amrex::Vector< amrex::Real > h_x_coords
Definition: LaserProfiles.H:350
std::unique_ptr< ParserWrapper< 3 > > m_gpu_parser
Definition: LaserProfiles.H:211
int ny
Definition: LaserProfiles.H:342
CommonLaserParameters m_common_params
Definition: LaserProfiles.H:177
amrex::Vector< amrex::Real > h_y_coords
Definition: LaserProfiles.H:355
int first_time_index
Definition: LaserProfiles.H:360
Definition: LaserProfiles.H:25
int time_chunk_size
Definition: LaserProfiles.H:358
Definition: LaserProfiles.H:220
amrex::Vector< amrex::Real > t_coords
Definition: LaserProfiles.H:346
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:379
amrex::Real e_max
central wavelength
Definition: LaserProfiles.H:34
amrex::Vector< amrex::Real > p_X
maximum electric field at peak
Definition: LaserProfiles.H:35
Definition: WarpXParser.H:26
std::string field_function
Definition: LaserProfiles.H:207
amrex::Real wavelength
Definition: LaserProfiles.H:33
void update(amrex::Real) override final
Definition: LaserProfiles.H:118
Definition: LaserProfiles.H:50
CommonLaserParameters m_common_params
Definition: LaserProfiles.H:367
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:336
virtual ~ILaserProfile()
Definition: LaserProfiles.H:100
Definition: LaserProfiles.H:106
amrex::Real theta_stc
Direction of the spatio-temporal couplings.
Definition: LaserProfiles.H:139