|
WarpX
|
#include "Particles/Deposition/SharedDepositionUtils.H"#include "Particles/Pusher/GetAndSetPosition.H"#include "Particles/Pusher/UpdatePosition.H"#include "Particles/ShapeFactors.H"#include "Utils/TextMsg.H"#include "Utils/WarpXAlgorithmSelection.H"#include "Utils/WarpXConst.H"#include "Utils/WarpX_Complex.H"#include <AMReX.H>#include <AMReX_Arena.H>#include <AMReX_Array4.H>#include <AMReX_Dim3.H>#include <AMReX_REAL.H>Go to the source code of this file.
Functions | |
| template<int depos_order> | |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void | doDepositionShapeNKernel (const amrex::ParticleReal xp, const amrex::ParticleReal yp, const amrex::ParticleReal zp, const amrex::ParticleReal wq, const amrex::ParticleReal vx, const amrex::ParticleReal vy, const amrex::ParticleReal vz, amrex::Array4< amrex::Real > const &jx_arr, amrex::Array4< amrex::Real > const &jy_arr, amrex::Array4< amrex::Real > const &jz_arr, amrex::IntVect const &jx_type, amrex::IntVect const &jy_type, amrex::IntVect const &jz_type, const amrex::Real relative_time, const amrex::XDim3 &dinv, const amrex::XDim3 &xyzmin, const amrex::Real invvol, const amrex::Dim3 lo, const int n_rz_azimuthal_modes) |
| Kernel for the direct current deposition for thread thread_num. | |
| template<int depos_order> | |
| void | doDepositionShapeN (const GetParticlePosition< PIdx > &GetPosition, const amrex::ParticleReal *const wp, const amrex::ParticleReal *const uxp, const amrex::ParticleReal *const uyp, const amrex::ParticleReal *const uzp, const int *ion_lev, amrex::FArrayBox &jx_fab, amrex::FArrayBox &jy_fab, amrex::FArrayBox &jz_fab, long np_to_deposit, amrex::Real relative_time, const amrex::XDim3 &dinv, const amrex::XDim3 &xyzmin, amrex::Dim3 lo, amrex::Real q, int n_rz_azimuthal_modes) |
| Current Deposition for thread thread_num. | |
| template<int depos_order> | |
| void | doDepositionShapeNImplicit (const GetParticlePosition< PIdx > &GetPosition, const amrex::ParticleReal *const wp, const amrex::ParticleReal *const uxp_n, const amrex::ParticleReal *const uyp_n, const amrex::ParticleReal *const uzp_n, const amrex::ParticleReal *const uxp_nph, const amrex::ParticleReal *const uyp_nph, const amrex::ParticleReal *const uzp_nph, const int *const ion_lev, amrex::FArrayBox &jx_fab, amrex::FArrayBox &jy_fab, amrex::FArrayBox &jz_fab, const long np_to_deposit, const amrex::XDim3 &dinv, const amrex::XDim3 &xyzmin, const amrex::Dim3 lo, const amrex::Real q, const int n_rz_azimuthal_modes) |
| Direct current deposition for thread thread_num for the implicit scheme The only difference from doDepositionShapeN is in how the particle gamma is calculated. | |
| template<int depos_order> | |
| void | doDepositionSharedShapeN (const GetParticlePosition< PIdx > &GetPosition, const amrex::ParticleReal *const wp, const amrex::ParticleReal *const uxp, const amrex::ParticleReal *const uyp, const amrex::ParticleReal *const uzp, const int *ion_lev, amrex::FArrayBox &jx_fab, amrex::FArrayBox &jy_fab, amrex::FArrayBox &jz_fab, long np_to_deposit, const amrex::Real relative_time, const amrex::XDim3 &dinv, const amrex::XDim3 &xyzmin, amrex::Dim3 lo, amrex::Real q, int n_rz_azimuthal_modes, const amrex::DenseBins< WarpXParticleContainer::ParticleTileType::ParticleTileDataType > &a_bins, const amrex::Box &box, const amrex::Geometry &geom, const amrex::IntVect &a_tbox_max_size, const int threads_per_block, const amrex::IntVect bin_size) |
| Current Deposition for thread thread_num using shared memory. | |
| template<int depos_order> | |
| void | doEsirkepovDepositionShapeN (const GetParticlePosition< PIdx > &GetPosition, const amrex::ParticleReal *const wp, const amrex::ParticleReal *const uxp, const amrex::ParticleReal *const uyp, const amrex::ParticleReal *const uzp, const int *ion_lev, const amrex::Array4< amrex::Real > &Jx_arr, const amrex::Array4< amrex::Real > &Jy_arr, const amrex::Array4< amrex::Real > &Jz_arr, long np_to_deposit, amrex::Real dt, amrex::Real relative_time, const amrex::XDim3 &dinv, const amrex::XDim3 &xyzmin, amrex::Dim3 lo, amrex::Real q, int n_rz_azimuthal_modes, const amrex::Array4< const int > &reduced_particle_shape_mask, bool enable_reduced_shape) |
| Esirkepov Current Deposition for thread thread_num. | |
| template<int depos_order> | |
| void | doChargeConservingDepositionShapeNImplicit (const amrex::ParticleReal *const xp_n, const amrex::ParticleReal *const yp_n, const amrex::ParticleReal *const zp_n, const GetParticlePosition< PIdx > &GetPosition, const amrex::ParticleReal *const wp, const amrex::ParticleReal *const uxp_n, const amrex::ParticleReal *const uyp_n, const amrex::ParticleReal *const uzp_n, const amrex::ParticleReal *const uxp_nph, const amrex::ParticleReal *const uyp_nph, const amrex::ParticleReal *const uzp_nph, const int *const ion_lev, const amrex::Array4< amrex::Real > &Jx_arr, const amrex::Array4< amrex::Real > &Jy_arr, const amrex::Array4< amrex::Real > &Jz_arr, const long np_to_deposit, const amrex::Real dt, const amrex::XDim3 &dinv, const amrex::XDim3 &xyzmin, const amrex::Dim3 lo, const amrex::Real q, const int n_rz_azimuthal_modes) |
| Esirkepov Current Deposition for thread thread_num for implicit scheme The difference from doEsirkepovDepositionShapeN is in how the old and new particles positions are determined and in how the particle gamma is calculated. | |
| template<int depos_order> | |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void | VillasenorDepositionShapeNKernel (amrex::ParticleReal const xp_old, amrex::ParticleReal const yp_old, amrex::ParticleReal const zp_old, amrex::ParticleReal const xp_new, amrex::ParticleReal const yp_new, amrex::ParticleReal const zp_new, amrex::ParticleReal const wq, amrex::ParticleReal const uxp_mid, amrex::ParticleReal const uyp_mid, amrex::ParticleReal const uzp_mid, amrex::ParticleReal const gaminv, amrex::Array4< amrex::Real >const &Jx_arr, amrex::Array4< amrex::Real >const &Jy_arr, amrex::Array4< amrex::Real >const &Jz_arr, amrex::Real const dt, amrex::XDim3 const &dinv, amrex::XDim3 const &xyzmin, amrex::Dim3 const lo, amrex::Real const invvol, int const n_rz_azimuthal_modes) |
| Villasenor and Buneman Current Deposition for thread thread_num kernal. This is a charge-conserving deposition. The difference from Esirkepov is that the deposit is done segment by segment, where the segments are determined by cell crossings. In general, this results in a tighter stencil. The implementation is valid for an arbitrary number of cell crossings. | |
| template<int depos_order> | |
| void | doVillasenorDepositionShapeNExplicit (const GetParticlePosition< PIdx > &GetPosition, const amrex::ParticleReal *const wp, const amrex::ParticleReal *const uxp, const amrex::ParticleReal *const uyp, const amrex::ParticleReal *const uzp, const int *const ion_lev, const amrex::Array4< amrex::Real > &Jx_arr, const amrex::Array4< amrex::Real > &Jy_arr, const amrex::Array4< amrex::Real > &Jz_arr, const long np_to_deposit, const amrex::Real dt, const amrex::Real relative_time, const amrex::XDim3 &dinv, const amrex::XDim3 &xyzmin, const amrex::Dim3 lo, const amrex::Real q, const int n_rz_azimuthal_modes) |
| Villasenor and Buneman Current Deposition for thread thread_num for explicit scheme. The specifics for the explicit scheme are in how the old and new positions and gamma are determined. This is a charge-conserving deposition. The difference from Esirkepov is that the deposit is done segment by segment, where the segments are determined by cell crossings. In general, this results in a tighter stencil. The implementation is valid for an arbitrary number of cell crossings. | |
| template<int depos_order> | |
| void | doVillasenorDepositionShapeNImplicit (const amrex::ParticleReal *const xp_n_data, const amrex::ParticleReal *const yp_n_data, const amrex::ParticleReal *const zp_n_data, const GetParticlePosition< PIdx > &GetPosition, const amrex::ParticleReal *const wp, const amrex::ParticleReal *const uxp_n, const amrex::ParticleReal *const uyp_n, const amrex::ParticleReal *const uzp_n, const amrex::ParticleReal *const uxp_nph, const amrex::ParticleReal *const uyp_nph, const amrex::ParticleReal *const uzp_nph, const int *const ion_lev, const amrex::Array4< amrex::Real > &Jx_arr, const amrex::Array4< amrex::Real > &Jy_arr, const amrex::Array4< amrex::Real > &Jz_arr, const long np_to_deposit, const amrex::Real dt, const amrex::XDim3 &dinv, const amrex::XDim3 &xyzmin, const amrex::Dim3 lo, const amrex::Real q, const int n_rz_azimuthal_modes) |
| Villasenor and Buneman Current Deposition for thread thread_num for implicit scheme. The specifics for the implicit scheme are in how gamma is determined. This is a charge- conserving deposition. The difference from Esirkepov is that the deposit is done segment by segment, where the segments are determined by cell crossings. In general, this results in a tighter stencil. The implementation is valid for an arbitrary number of cell crossings. | |
| template<int depos_order> | |
| void | doVayDepositionShapeN (const GetParticlePosition< PIdx > &GetPosition, const amrex::ParticleReal *const wp, const amrex::ParticleReal *const uxp, const amrex::ParticleReal *const uyp, const amrex::ParticleReal *const uzp, const int *const ion_lev, amrex::FArrayBox &Dx_fab, amrex::FArrayBox &Dy_fab, amrex::FArrayBox &Dz_fab, long np_to_deposit, amrex::Real dt, amrex::Real relative_time, const amrex::XDim3 &dinv, const amrex::XDim3 &xyzmin, amrex::Dim3 lo, amrex::Real q, int n_rz_azimuthal_modes) |
Vay current deposition (Vay et al, 2013) for thread thread_num: deposit D in real space and store the result in Dx_fab, Dy_fab, Dz_fab. | |
| void doChargeConservingDepositionShapeNImplicit | ( | const amrex::ParticleReal *const | xp_n, |
| const amrex::ParticleReal *const | yp_n, | ||
| const amrex::ParticleReal *const | zp_n, | ||
| const GetParticlePosition< PIdx > & | GetPosition, | ||
| const amrex::ParticleReal *const | wp, | ||
| const amrex::ParticleReal *const | uxp_n, | ||
| const amrex::ParticleReal *const | uyp_n, | ||
| const amrex::ParticleReal *const | uzp_n, | ||
| const amrex::ParticleReal *const | uxp_nph, | ||
| const amrex::ParticleReal *const | uyp_nph, | ||
| const amrex::ParticleReal *const | uzp_nph, | ||
| const int *const | ion_lev, | ||
| const amrex::Array4< amrex::Real > & | Jx_arr, | ||
| const amrex::Array4< amrex::Real > & | Jy_arr, | ||
| const amrex::Array4< amrex::Real > & | Jz_arr, | ||
| const long | np_to_deposit, | ||
| const amrex::Real | dt, | ||
| const amrex::XDim3 & | dinv, | ||
| const amrex::XDim3 & | xyzmin, | ||
| const amrex::Dim3 | lo, | ||
| const amrex::Real | q, | ||
| const int | n_rz_azimuthal_modes ) |
Esirkepov Current Deposition for thread thread_num for implicit scheme The difference from doEsirkepovDepositionShapeN is in how the old and new particles positions are determined and in how the particle gamma is calculated.
| depos_order | deposition order |
| xp_n,yp_n,zp_n | Pointer to arrays of particle position at time level n. |
| GetPosition | A functor for returning the particle position. |
| wp | Pointer to array of particle weights. |
| uxp_n,uyp_n,uzp_n | Pointer to arrays of particle momentum at time level n. |
| uxp_nph,uyp_nph,uzp_nph | Pointer to arrays of particle momentum at time level n + 1/2. |
| ion_lev | Pointer to array of particle ionization level. This is required to have the charge of each macroparticle since q is a scalar. For non-ionizable species, ion_lev is a null pointer. |
| Jx_arr,Jy_arr,Jz_arr | Array4 of current density, either full array or tile. |
| np_to_deposit | Number of particles for which current is deposited. |
| dt | Time step for particle level |
| dinv | 3D cell size inverse |
| xyzmin | Physical lower bounds of domain. |
| lo | Index lower bounds of domain. |
| q | species charge. |
| n_rz_azimuthal_modes | Number of azimuthal modes when using RZ geometry. |
| void doDepositionShapeN | ( | const GetParticlePosition< PIdx > & | GetPosition, |
| const amrex::ParticleReal *const | wp, | ||
| const amrex::ParticleReal *const | uxp, | ||
| const amrex::ParticleReal *const | uyp, | ||
| const amrex::ParticleReal *const | uzp, | ||
| const int * | ion_lev, | ||
| amrex::FArrayBox & | jx_fab, | ||
| amrex::FArrayBox & | jy_fab, | ||
| amrex::FArrayBox & | jz_fab, | ||
| long | np_to_deposit, | ||
| amrex::Real | relative_time, | ||
| const amrex::XDim3 & | dinv, | ||
| const amrex::XDim3 & | xyzmin, | ||
| amrex::Dim3 | lo, | ||
| amrex::Real | q, | ||
| int | n_rz_azimuthal_modes ) |
Current Deposition for thread thread_num.
| depos_order | deposition order |
| GetPosition | A functor for returning the particle position. |
| wp | Pointer to array of particle weights. |
| uxp,uyp,uzp | Pointer to arrays of particle momentum. |
| ion_lev | Pointer to array of particle ionization level. This is required to have the charge of each macroparticle since q is a scalar. For non-ionizable species, ion_lev is a null pointer. |
| jx_fab,jy_fab,jz_fab | FArrayBox of current density, either full array or tile. |
| np_to_deposit | Number of particles for which current is deposited. |
| relative_time | Time at which to deposit J, relative to the time of the current positions of the particles. When different than 0, the particle position will be temporarily modified to match the time of the deposition. |
| dinv | 3D cell size inverse |
| xyzmin | Physical lower bounds of domain. |
| lo | Index lower bounds of domain. |
| q | species charge. |
| n_rz_azimuthal_modes | Number of azimuthal modes when using RZ geometry. |
| void doDepositionShapeNImplicit | ( | const GetParticlePosition< PIdx > & | GetPosition, |
| const amrex::ParticleReal *const | wp, | ||
| const amrex::ParticleReal *const | uxp_n, | ||
| const amrex::ParticleReal *const | uyp_n, | ||
| const amrex::ParticleReal *const | uzp_n, | ||
| const amrex::ParticleReal *const | uxp_nph, | ||
| const amrex::ParticleReal *const | uyp_nph, | ||
| const amrex::ParticleReal *const | uzp_nph, | ||
| const int *const | ion_lev, | ||
| amrex::FArrayBox & | jx_fab, | ||
| amrex::FArrayBox & | jy_fab, | ||
| amrex::FArrayBox & | jz_fab, | ||
| const long | np_to_deposit, | ||
| const amrex::XDim3 & | dinv, | ||
| const amrex::XDim3 & | xyzmin, | ||
| const amrex::Dim3 | lo, | ||
| const amrex::Real | q, | ||
| const int | n_rz_azimuthal_modes ) |
Direct current deposition for thread thread_num for the implicit scheme The only difference from doDepositionShapeN is in how the particle gamma is calculated.
| depos_order | deposition order |
| GetPosition | A functor for returning the particle position. |
| wp | Pointer to array of particle weights. |
| uxp_n,uyp_n,uzp_n | Pointer to arrays of particle momentum at time n. |
| uxp_nph,uyp_nph,uzp_nph | Pointer to arrays of particle momentum at time n+1/2. |
| ion_lev | Pointer to array of particle ionization level. This is required to have the charge of each macroparticle since q is a scalar. For non-ionizable species, ion_lev is a null pointer. |
| jx_fab,jy_fab,jz_fab | FArrayBox of current density, either full array or tile. |
| np_to_deposit | Number of particles for which current is deposited. |
| dinv | 3D cell size inverse |
| xyzmin | Physical lower bounds of domain. |
| lo | Index lower bounds of domain. |
| q | species charge. |
| n_rz_azimuthal_modes | Number of azimuthal modes when using RZ geometry. |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void doDepositionShapeNKernel | ( | const amrex::ParticleReal | xp, |
| const amrex::ParticleReal | yp, | ||
| const amrex::ParticleReal | zp, | ||
| const amrex::ParticleReal | wq, | ||
| const amrex::ParticleReal | vx, | ||
| const amrex::ParticleReal | vy, | ||
| const amrex::ParticleReal | vz, | ||
| amrex::Array4< amrex::Real > const & | jx_arr, | ||
| amrex::Array4< amrex::Real > const & | jy_arr, | ||
| amrex::Array4< amrex::Real > const & | jz_arr, | ||
| amrex::IntVect const & | jx_type, | ||
| amrex::IntVect const & | jy_type, | ||
| amrex::IntVect const & | jz_type, | ||
| const amrex::Real | relative_time, | ||
| const amrex::XDim3 & | dinv, | ||
| const amrex::XDim3 & | xyzmin, | ||
| const amrex::Real | invvol, | ||
| const amrex::Dim3 | lo, | ||
| const int | n_rz_azimuthal_modes ) |
Kernel for the direct current deposition for thread thread_num.
| depos_order | deposition order |
| xp,yp,zp | The particle positions. |
| wq | The charge of the macroparticle |
| vx,vy,vz | The particle velocities |
| jx_arr,jy_arr,jz_arr | Array4 of current density, either full array or tile. |
| jx_type,jy_type,jz_type | The grid types along each direction, either NODE or CELL |
| relative_time | Time at which to deposit J, relative to the time of the current positions of the particles. When different than 0, the particle position will be temporarily modified to match the time of the deposition. |
| dinv | 3D cell size inverse |
| xyzmin | The lower bounds of the domain |
| invvol | The inverse volume of a grid cell |
| lo | Index lower bounds of domain. |
| n_rz_azimuthal_modes | Number of azimuthal modes when using RZ geometry. |
defined(WARPX_DIM_1D_Z)
| void doDepositionSharedShapeN | ( | const GetParticlePosition< PIdx > & | GetPosition, |
| const amrex::ParticleReal *const | wp, | ||
| const amrex::ParticleReal *const | uxp, | ||
| const amrex::ParticleReal *const | uyp, | ||
| const amrex::ParticleReal *const | uzp, | ||
| const int * | ion_lev, | ||
| amrex::FArrayBox & | jx_fab, | ||
| amrex::FArrayBox & | jy_fab, | ||
| amrex::FArrayBox & | jz_fab, | ||
| long | np_to_deposit, | ||
| const amrex::Real | relative_time, | ||
| const amrex::XDim3 & | dinv, | ||
| const amrex::XDim3 & | xyzmin, | ||
| amrex::Dim3 | lo, | ||
| amrex::Real | q, | ||
| int | n_rz_azimuthal_modes, | ||
| const amrex::DenseBins< WarpXParticleContainer::ParticleTileType::ParticleTileDataType > & | a_bins, | ||
| const amrex::Box & | box, | ||
| const amrex::Geometry & | geom, | ||
| const amrex::IntVect & | a_tbox_max_size, | ||
| const int | threads_per_block, | ||
| const amrex::IntVect | bin_size ) |
Current Deposition for thread thread_num using shared memory.
| depos_order | deposition order |
| GetPosition | A functor for returning the particle position. |
| wp | Pointer to array of particle weights. |
| uxp,uyp,uzp | Pointer to arrays of particle momentum. |
| ion_lev | Pointer to array of particle ionization level. This is required to have the charge of each macroparticle since q is a scalar. For non-ionizable species, ion_lev is a null pointer. |
| jx_fab,jy_fab,jz_fab | FArrayBox of current density, either full array or tile. |
| np_to_deposit | Number of particles for which current is deposited. |
| relative_time | Time at which to deposit J, relative to the time of the current positions of the particles. When different than 0, the particle position will be temporarily modified to match the time of the deposition. |
| dinv | 3D cell size inverse |
| xyzmin | Physical lower bounds of domain. |
| lo | Index lower bounds of domain. |
| q | species charge. |
| n_rz_azimuthal_modes | Number of azimuthal modes when using RZ geometry. |
| a_bins | bins used for particle sorting |
| box | the current box |
| geom | the geometry of the current level |
| a_tbox_max_size | the maximum size of a tilebox |
| threads_per_block | number of threads to use per block in shared deposition |
| bin_size | tileSize to use for shared current deposition operations |
| void doEsirkepovDepositionShapeN | ( | const GetParticlePosition< PIdx > & | GetPosition, |
| const amrex::ParticleReal *const | wp, | ||
| const amrex::ParticleReal *const | uxp, | ||
| const amrex::ParticleReal *const | uyp, | ||
| const amrex::ParticleReal *const | uzp, | ||
| const int * | ion_lev, | ||
| const amrex::Array4< amrex::Real > & | Jx_arr, | ||
| const amrex::Array4< amrex::Real > & | Jy_arr, | ||
| const amrex::Array4< amrex::Real > & | Jz_arr, | ||
| long | np_to_deposit, | ||
| amrex::Real | dt, | ||
| amrex::Real | relative_time, | ||
| const amrex::XDim3 & | dinv, | ||
| const amrex::XDim3 & | xyzmin, | ||
| amrex::Dim3 | lo, | ||
| amrex::Real | q, | ||
| int | n_rz_azimuthal_modes, | ||
| const amrex::Array4< const int > & | reduced_particle_shape_mask, | ||
| bool | enable_reduced_shape ) |
Esirkepov Current Deposition for thread thread_num.
| depos_order | deposition order |
| GetPosition | A functor for returning the particle position. | |
| wp | Pointer to array of particle weights. | |
| uxp,uyp,uzp | Pointer to arrays of particle momentum. | |
| ion_lev | Pointer to array of particle ionization level. This is required to have the charge of each macroparticle since q is a scalar. For non-ionizable species, ion_lev is a null pointer. | |
| Jx_arr,Jy_arr,Jz_arr | Array4 of current density, either full array or tile. | |
| np_to_deposit | Number of particles for which current is deposited. | |
| dt | Time step for particle level | |
| [in] | relative_time | Time at which to deposit J, relative to the time of the current positions of the particles. When different than 0, the particle position will be temporarily modified to match the time of the deposition. |
| dinv | 3D cell size inverse | |
| xyzmin | Physical lower bounds of domain. | |
| lo | Index lower bounds of domain. | |
| q | species charge. | |
| n_rz_azimuthal_modes | Number of azimuthal modes when using RZ geometry. | |
| reduced_particle_shape_mask | Array4 of int, Mask that indicates whether a particle should use its regular shape factor or a reduced, order-1 shape factor instead in a given cell. | |
| enable_reduced_shape | Flag to indicate whether to use the reduced shape factor |
| void doVayDepositionShapeN | ( | const GetParticlePosition< PIdx > & | GetPosition, |
| const amrex::ParticleReal *const | wp, | ||
| const amrex::ParticleReal *const | uxp, | ||
| const amrex::ParticleReal *const | uyp, | ||
| const amrex::ParticleReal *const | uzp, | ||
| const int *const | ion_lev, | ||
| amrex::FArrayBox & | Dx_fab, | ||
| amrex::FArrayBox & | Dy_fab, | ||
| amrex::FArrayBox & | Dz_fab, | ||
| long | np_to_deposit, | ||
| amrex::Real | dt, | ||
| amrex::Real | relative_time, | ||
| const amrex::XDim3 & | dinv, | ||
| const amrex::XDim3 & | xyzmin, | ||
| amrex::Dim3 | lo, | ||
| amrex::Real | q, | ||
| int | n_rz_azimuthal_modes ) |
Vay current deposition (Vay et al, 2013) for thread thread_num: deposit D in real space and store the result in Dx_fab, Dy_fab, Dz_fab.
| depos_order | deposition order |
| [in] | GetPosition | Functor that returns the particle position |
| [in] | wp | Pointer to array of particle weights |
| [in] | uxp,uyp,uzp | Pointer to arrays of particle momentum along x |
| [in] | ion_lev | Pointer to array of particle ionization level. This is required to have the charge of each macroparticle since q is a scalar. For non-ionizable species, ion_lev is null |
| [in,out] | Dx_fab,Dy_fab,Dz_fab | FArrayBox of Vay current density, either full array or tile |
| [in] | np_to_deposit | Number of particles for which current is deposited |
| [in] | dt | Time step for particle level |
| [in] | relative_time | Time at which to deposit D, relative to the time of the current positions of the particles. When different than 0, the particle position will be temporarily modified to match the time of the deposition. |
| [in] | dinv | 3D cell size inverse |
| [in] | xyzmin | 3D lower bounds of physical domain |
| [in] | lo | Dimension-agnostic lower bounds of index domain |
| [in] | q | Species charge |
| [in] | n_rz_azimuthal_modes | Number of azimuthal modes in RZ geometry |
| void doVillasenorDepositionShapeNExplicit | ( | const GetParticlePosition< PIdx > & | GetPosition, |
| const amrex::ParticleReal *const | wp, | ||
| const amrex::ParticleReal *const | uxp, | ||
| const amrex::ParticleReal *const | uyp, | ||
| const amrex::ParticleReal *const | uzp, | ||
| const int *const | ion_lev, | ||
| const amrex::Array4< amrex::Real > & | Jx_arr, | ||
| const amrex::Array4< amrex::Real > & | Jy_arr, | ||
| const amrex::Array4< amrex::Real > & | Jz_arr, | ||
| const long | np_to_deposit, | ||
| const amrex::Real | dt, | ||
| const amrex::Real | relative_time, | ||
| const amrex::XDim3 & | dinv, | ||
| const amrex::XDim3 & | xyzmin, | ||
| const amrex::Dim3 | lo, | ||
| const amrex::Real | q, | ||
| const int | n_rz_azimuthal_modes ) |
Villasenor and Buneman Current Deposition for thread thread_num for explicit scheme. The specifics for the explicit scheme are in how the old and new positions and gamma are determined. This is a charge-conserving deposition. The difference from Esirkepov is that the deposit is done segment by segment, where the segments are determined by cell crossings. In general, this results in a tighter stencil. The implementation is valid for an arbitrary number of cell crossings.
| depos_order | deposition order |
| GetPosition | A functor for returning the particle position. |
| wp | Pointer to array of particle weights. |
| uxp,uyp,uzp | Pointer to arrays of particle momentum. |
| ion_lev | Pointer to array of particle ionization level. This is required to have the charge of each macroparticle since q is a scalar. For non-ionizable species, ion_lev is a null pointer. |
| Jx_arr,Jy_arr,Jz_arr | Array4 of current density, either full array or tile. |
| np_to_deposit | Number of particles for which current is deposited. |
| dt | Time step for particle level |
| relative_time | Time at which to deposit, relative to the time of the current positions of the particles. |
| dinv | 3D cell size inverse |
| xyzmin | Physical lower bounds of domain. |
| lo | Index lower bounds of domain. |
| q | species charge. |
| n_rz_azimuthal_modes | Number of azimuthal modes when using RZ geometry. |
| void doVillasenorDepositionShapeNImplicit | ( | const amrex::ParticleReal *const | xp_n_data, |
| const amrex::ParticleReal *const | yp_n_data, | ||
| const amrex::ParticleReal *const | zp_n_data, | ||
| const GetParticlePosition< PIdx > & | GetPosition, | ||
| const amrex::ParticleReal *const | wp, | ||
| const amrex::ParticleReal *const | uxp_n, | ||
| const amrex::ParticleReal *const | uyp_n, | ||
| const amrex::ParticleReal *const | uzp_n, | ||
| const amrex::ParticleReal *const | uxp_nph, | ||
| const amrex::ParticleReal *const | uyp_nph, | ||
| const amrex::ParticleReal *const | uzp_nph, | ||
| const int *const | ion_lev, | ||
| const amrex::Array4< amrex::Real > & | Jx_arr, | ||
| const amrex::Array4< amrex::Real > & | Jy_arr, | ||
| const amrex::Array4< amrex::Real > & | Jz_arr, | ||
| const long | np_to_deposit, | ||
| const amrex::Real | dt, | ||
| const amrex::XDim3 & | dinv, | ||
| const amrex::XDim3 & | xyzmin, | ||
| const amrex::Dim3 | lo, | ||
| const amrex::Real | q, | ||
| const int | n_rz_azimuthal_modes ) |
Villasenor and Buneman Current Deposition for thread thread_num for implicit scheme. The specifics for the implicit scheme are in how gamma is determined. This is a charge- conserving deposition. The difference from Esirkepov is that the deposit is done segment by segment, where the segments are determined by cell crossings. In general, this results in a tighter stencil. The implementation is valid for an arbitrary number of cell crossings.
| depos_order | deposition order |
| xp_n_data,yp_n_data,zp_n_data | Pointer to arrays of particle position at time level n. |
| GetPosition | A functor for returning the particle position. |
| wp | Pointer to array of particle weights. |
| uxp_n,uyp_n,uzp_n | Pointer to arrays of particle momentum at time level n. |
| uxp_nph,uyp_nph,uzp_nph | Pointer to arrays of particle momentum at time level n + 1/2. |
| ion_lev | Pointer to array of particle ionization level. This is required to have the charge of each macroparticle since q is a scalar. For non-ionizable species, ion_lev is a null pointer. |
| Jx_arr,Jy_arr,Jz_arr | Array4 of current density, either full array or tile. |
| np_to_deposit | Number of particles for which current is deposited. |
| dt | Time step for particle level |
| dinv | 3D cell size inverse |
| xyzmin | Physical lower bounds of domain. |
| lo | Index lower bounds of domain. |
| q | species charge. |
| n_rz_azimuthal_modes | Number of azimuthal modes when using RZ geometry. |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void VillasenorDepositionShapeNKernel | ( | amrex::ParticleReal const | xp_old, |
| amrex::ParticleReal const | yp_old, | ||
| amrex::ParticleReal const | zp_old, | ||
| amrex::ParticleReal const | xp_new, | ||
| amrex::ParticleReal const | yp_new, | ||
| amrex::ParticleReal const | zp_new, | ||
| amrex::ParticleReal const | wq, | ||
| amrex::ParticleReal const | uxp_mid, | ||
| amrex::ParticleReal const | uyp_mid, | ||
| amrex::ParticleReal const | uzp_mid, | ||
| amrex::ParticleReal const | gaminv, | ||
| amrex::Array4< amrex::Real >const & | Jx_arr, | ||
| amrex::Array4< amrex::Real >const & | Jy_arr, | ||
| amrex::Array4< amrex::Real >const & | Jz_arr, | ||
| amrex::Real const | dt, | ||
| amrex::XDim3 const & | dinv, | ||
| amrex::XDim3 const & | xyzmin, | ||
| amrex::Dim3 const | lo, | ||
| amrex::Real const | invvol, | ||
| int const | n_rz_azimuthal_modes ) |
Villasenor and Buneman Current Deposition for thread thread_num kernal. This is a charge-conserving deposition. The difference from Esirkepov is that the deposit is done segment by segment, where the segments are determined by cell crossings. In general, this results in a tighter stencil. The implementation is valid for an arbitrary number of cell crossings.
| depos_order | deposition order |
| xp_old,yp_old,zp_old | Old particle positions (nominally at start of step) |
| xp_new,yp_new,zp_new | New particle positions (nominally at end of step) |
| wq | Pointer to array of particle weights. |
| uxp_mid,uyp_mid,uzp_mid | Particle momentum at middle of step |
| gaminv | One over gamma for particle at middle of step |
| Jx_arr,Jy_arr,Jz_arr | Array4 of current density, either full array or tile |
| dt | Time step for particle level |
| dinv | 3D cell size inverse |
| xyzmin | Physical lower bounds of domain |
| lo | Index lower bounds of domain |
| invvol | One over cell volume |
| n_rz_azimuthal_modes | Number of azimuthal modes when using RZ geometry |