|
WarpX
|
#include <LaserParticleContainer.H>
Public Member Functions | |
| LaserParticleContainer (amrex::AmrCore *amr_core, int ispecies, const std::string &name) | |
| virtual | ~LaserParticleContainer () |
| virtual void | InitData () final |
| virtual void | Evolve (int lev, const amrex::MultiFab &, const amrex::MultiFab &, const amrex::MultiFab &, const amrex::MultiFab &, const amrex::MultiFab &, const amrex::MultiFab &, const amrex::MultiFab &, const amrex::MultiFab &, const amrex::MultiFab &, const amrex::MultiFab &, const amrex::MultiFab &, const amrex::MultiFab &, amrex::MultiFab &jx, amrex::MultiFab &jy, amrex::MultiFab &jz, amrex::MultiFab *, amrex::MultiFab *, amrex::MultiFab *, amrex::MultiFab *rho, amrex::MultiFab *crho, const amrex::MultiFab *, const amrex::MultiFab *, const amrex::MultiFab *, const amrex::MultiFab *, const amrex::MultiFab *, const amrex::MultiFab *, amrex::Real t, amrex::Real dt, DtType a_dt_type=DtType::Full) final |
| virtual void | PushP (int lev, amrex::Real dt, const amrex::MultiFab &, const amrex::MultiFab &, const amrex::MultiFab &, const amrex::MultiFab &, const amrex::MultiFab &, const amrex::MultiFab &) final |
| virtual void | PostRestart () final |
| void | calculate_laser_plane_coordinates (const WarpXParIter &pti, const int np, amrex::Real *AMREX_RESTRICT const pplane_Xp, amrex::Real *AMREX_RESTRICT const pplane_Yp) |
| void | update_laser_particle (WarpXParIter &pti, const int np, amrex::ParticleReal *AMREX_RESTRICT const puxp, amrex::ParticleReal *AMREX_RESTRICT const puyp, amrex::ParticleReal *AMREX_RESTRICT const puzp, amrex::ParticleReal const *AMREX_RESTRICT const pwp, amrex::Real const *AMREX_RESTRICT const amplitude, const amrex::Real dt) |
Public Member Functions inherited from WarpXParticleContainer | |
| WarpXParticleContainer (amrex::AmrCore *amr_core, int ispecies) | |
| virtual | ~WarpXParticleContainer () |
| virtual void | GetParticleSlice (const int, const amrex::Real, const amrex::Real, const amrex::Real, const amrex::Real, const amrex::Real, DiagnosticParticles &) |
| void | AllocData () |
| void | PushX (amrex::Real dt) |
| void | PushX (int lev, amrex::Real dt) |
| void | DepositCharge (amrex::Vector< std::unique_ptr< amrex::MultiFab > > &rho, bool local=false, bool reset=false, bool do_rz_volume_scaling=false) |
| std::unique_ptr< amrex::MultiFab > | GetChargeDensity (int lev, bool local=false) |
| virtual void | DepositCharge (WarpXParIter &pti, RealVector &wp, const int *const ion_lev, amrex::MultiFab *rho, int icomp, const long offset, const long np_to_depose, int thread_num, int lev, int depos_lev) |
| virtual void | DepositCurrent (WarpXParIter &pti, RealVector &wp, RealVector &uxp, RealVector &uyp, RealVector &uzp, const int *const ion_lev, amrex::MultiFab *jx, amrex::MultiFab *jy, amrex::MultiFab *jz, const long offset, const long np_to_depose, int thread_num, int lev, int depos_lev, amrex::Real dt) |
| amrex::Real | sumParticleCharge (bool local=false) |
| std::array< amrex::Real, 3 > | meanParticleVelocity (bool local=false) |
| amrex::Real | maxParticleVelocity (bool local=false) |
| void | AddNParticles (int lev, int n, const amrex::ParticleReal *x, const amrex::ParticleReal *y, const amrex::ParticleReal *z, const amrex::ParticleReal *vx, const amrex::ParticleReal *vy, const amrex::ParticleReal *vz, int nattr, const amrex::ParticleReal *attr, int uniqueparticles, amrex::Long id=-1) |
| virtual void | ReadHeader (std::istream &is) |
| virtual void | WriteHeader (std::ostream &os) const |
| virtual void | ConvertUnits (ConvertDirection) |
| void | ApplyBoundaryConditions (ParticleBC boundary_conditions) |
| Apply particle BC. More... | |
| void | AddRealComp (const std::string &name, bool comm=true) |
| void | AddIntComp (const std::string &name, bool comm=true) |
| int | doBackTransformedDiagnostics () const |
| std::map< std::string, int > | getParticleComps () const noexcept |
| std::map< std::string, int > | getParticleiComps () const noexcept |
| std::map< std::string, int > | getParticleRuntimeComps () const noexcept |
| std::map< std::string, int > | getParticleRuntimeiComps () const noexcept |
| amrex::ParticleReal | getCharge () const |
| amrex::ParticleReal | getMass () const |
| int | DoFieldIonization () const |
| int | DoQED () const |
| virtual bool | has_quantum_sync () const |
| virtual bool | has_breit_wheeler () const |
| template<PhysicalSpecies PhysSpec> | |
| bool | AmIA () const noexcept |
| amrex::Array< amrex::Real, 3 > | get_v_galilean () |
| virtual void | resample (const int) |
| Virtual method to resample the species. Overriden by PhysicalParticleContainer only. Empty body is here because making the method purely virtual would mean that we need to override the method for every derived class. Note that in practice this function is never called because resample() is only called for PhysicalParticleContainers. More... | |
Protected Attributes | |
| std::string | m_laser_name |
Protected Attributes inherited from WarpXParticleContainer | |
| amrex::Array< amrex::Real, 3 > | m_v_galilean = {{0}} |
| std::map< std::string, int > | particle_comps |
| std::map< std::string, int > | particle_icomps |
| std::map< std::string, int > | particle_runtime_comps |
| std::map< std::string, int > | particle_runtime_icomps |
| int | species_id |
| amrex::Real | charge |
| amrex::Real | mass |
| PhysicalSpecies | physical_species |
| bool | m_deposit_on_main_grid = false |
| instead of depositing (current, charge) on the finest patch level, deposit to the coarsest grid More... | |
| bool | m_gather_from_main_grid = false |
| instead of gathering fields from the finest patch level, gather from the coarsest More... | |
| int | do_not_push = 0 |
| int | do_not_deposit = 0 |
| int | do_not_gather = 0 |
| int | do_continuous_injection = 0 |
| int | do_field_ionization = 0 |
| int | ionization_product |
| std::string | ionization_product_name |
| int | ion_atomic_number |
| int | ionization_initial_level = 0 |
| amrex::Gpu::DeviceVector< amrex::Real > | ionization_energies |
| amrex::Gpu::DeviceVector< amrex::Real > | adk_power |
| amrex::Gpu::DeviceVector< amrex::Real > | adk_prefactor |
| amrex::Gpu::DeviceVector< amrex::Real > | adk_exp_prefactor |
| std::string | physical_element |
| int | do_resampling = 0 |
| int | do_back_transformed_diagnostics = 1 |
| bool | m_do_qed = false |
| int | m_qed_breit_wheeler_ele_product |
| std::string | m_qed_breit_wheeler_ele_product_name |
| int | m_qed_breit_wheeler_pos_product |
| std::string | m_qed_breit_wheeler_pos_product_name |
| int | m_qed_quantum_sync_phot_product |
| std::string | m_qed_quantum_sync_phot_product_name |
| amrex::Vector< amrex::FArrayBox > | local_rho |
| amrex::Vector< amrex::FArrayBox > | local_jx |
| amrex::Vector< amrex::FArrayBox > | local_jy |
| amrex::Vector< amrex::FArrayBox > | local_jz |
| TmpParticles | tmp_particle_data |
Private Member Functions | |
| void | ComputeSpacing (int lev, amrex::Real &Sx, amrex::Real &Sy) const |
| void | ComputeWeightMobility (amrex::Real Sx, amrex::Real Sy) |
| void | InitData (int lev) |
| void | ContinuousInjection (const amrex::RealBox &injection_box) override |
| void | UpdateContinuousInjectionPosition (amrex::Real dt) override |
Private Attributes | |
| amrex::Vector< amrex::Real > | m_position |
| amrex::Vector< amrex::Real > | m_nvec |
| Coordinates of one of the point of the antenna. More... | |
| amrex::Vector< amrex::Real > | m_p_X |
| Normal of the plane of the antenna. More... | |
| long | m_pusher_algo = -1 |
| amrex::Real | m_e_max = std::numeric_limits<amrex::Real>::quiet_NaN() |
| amrex::Real | m_wavelength = std::numeric_limits<amrex::Real>::quiet_NaN() |
| amrex::Real | m_Z0_lab = 0 |
| long | m_min_particles_per_mode = 4 |
| amrex::Vector< amrex::Real > | m_p_Y |
| amrex::Vector< amrex::Real > | m_u_X |
| amrex::Vector< amrex::Real > | m_u_Y |
| amrex::Real | m_weight = std::numeric_limits<amrex::Real>::quiet_NaN() |
| amrex::Real | m_mobility = std::numeric_limits<amrex::Real>::quiet_NaN() |
| amrex::RealBox | m_laser_injection_box |
| amrex::Vector< amrex::Real > | m_updated_position |
| std::unique_ptr< WarpXLaserProfiles::ILaserProfile > | m_up_laser_profile |
Additional Inherited Members | |
Public Types inherited from WarpXParticleContainer | |
| using | DiagnosticParticleData = amrex::StructOfArrays< DiagIdx::nattribs, 0 > |
| using | DiagnosticParticles = amrex::Vector< std::map< std::pair< int, int >, DiagnosticParticleData > > |
| using | PairIndex = std::pair< int, int > |
| using | TmpParticleTile = std::array< amrex::Gpu::DeviceVector< amrex::ParticleReal >, TmpIdx::nattribs > |
| using | TmpParticles = amrex::Vector< std::map< PairIndex, TmpParticleTile > > |
Static Public Member Functions inherited from WarpXParticleContainer | |
| static void | ReadParameters () |
| static void | BackwardCompatibility () |
Public Attributes inherited from WarpXParticleContainer | |
| friend | MultiParticleContainer |
| bool | do_splitting = false |
| bool | initialize_self_fields = false |
| amrex::Real | self_fields_required_precision = 1.e-11 |
| int | split_type = 0 |
| bool | m_do_random_filter = false |
| bool | m_do_uniform_filter = false |
| bool | m_do_parser_filter = false |
| amrex::Real | m_random_fraction = 1.0 |
| int | m_uniform_stride = 1 |
| std::unique_ptr< ParserWrapper< 7 > > | m_particle_filter_parser |
Protected Member Functions inherited from WarpXParticleContainer | |
| virtual void | set_breit_wheeler_engine_ptr (std::shared_ptr< BreitWheelerEngine >) |
| virtual void | set_quantum_sync_engine_ptr (std::shared_ptr< QuantumSynchrotronEngine >) |
| void | defineAllParticleTiles () noexcept |
The main method to inject a laser pulse in WarpX is to use an artificial antenna: particles evenly distributed in a given plane (one particle per cell) move at each iteration and deposit a current J onto the grid, which in turns creates an electromagnetic field on the grid. The particles' displacements are prescribed to create the field requested by the user.
These artificial particles are contained in the LaserParticleContainer. LaserParticleContainer derives directly from WarpXParticleContainer. It requires a DepositCurrent function, but no FieldGather function.
| LaserParticleContainer::LaserParticleContainer | ( | amrex::AmrCore * | amr_core, |
| int | ispecies, | ||
| const std::string & | name | ||
| ) |
|
inlinevirtual |
| void LaserParticleContainer::calculate_laser_plane_coordinates | ( | const WarpXParIter & | pti, |
| const int | np, | ||
| amrex::Real *AMREX_RESTRICT const | pplane_Xp, | ||
| amrex::Real *AMREX_RESTRICT const | pplane_Yp | ||
| ) |
|
private |
|
private |
|
overrideprivatevirtual |
Reimplemented from WarpXParticleContainer.
|
finalvirtual |
Evolve is the central WarpXParticleContainer function that advances particles for a time dt (typically one timestep). It is a pure virtual function for flexibility.
Implements WarpXParticleContainer.
|
finalvirtual |
Implements WarpXParticleContainer.
|
private |
|
finalvirtual |
Implements WarpXParticleContainer.
|
finalvirtual |
This pushes the particle momenta by dt.
Implements WarpXParticleContainer.
| void LaserParticleContainer::update_laser_particle | ( | WarpXParIter & | pti, |
| const int | np, | ||
| amrex::ParticleReal *AMREX_RESTRICT const | puxp, | ||
| amrex::ParticleReal *AMREX_RESTRICT const | puyp, | ||
| amrex::ParticleReal *AMREX_RESTRICT const | puzp, | ||
| amrex::ParticleReal const *AMREX_RESTRICT const | pwp, | ||
| amrex::Real const *AMREX_RESTRICT const | amplitude, | ||
| const amrex::Real | dt | ||
| ) |
|
overrideprivatevirtual |
Reimplemented from WarpXParticleContainer.
|
private |
|
private |
|
protected |
|
private |
|
private |
|
private |
Coordinates of one of the point of the antenna.
|
private |
Normal of the plane of the antenna.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
1.8.13