ARTEMIS
Functions
CurrentDeposition.H File Reference
#include "Particles/Deposition/SharedDepositionUtils.H"
#include "ablastr/parallelization/KernelTimer.H"
#include "Particles/Pusher/GetAndSetPosition.H"
#include "Particles/ShapeFactors.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_REAL.H>

Go to the source code of this file.

Functions

template<int depos_order>
void doDepositionShapeN (const GetParticlePosition &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 &jx_fab, amrex::FArrayBox &jy_fab, amrex::FArrayBox &jz_fab, const long np_to_depose, const amrex::Real relative_time, const std::array< amrex::Real, 3 > &dx, const std::array< amrex::Real, 3 > &xyzmin, const amrex::Dim3 lo, const amrex::Real q, const int n_rz_azimuthal_modes, amrex::Real *cost, const long load_balance_costs_update_algo)
 Current Deposition for thread thread_num. More...
 
template<int depos_order>
void doDepositionSharedShapeN (const GetParticlePosition &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 &jx_fab, amrex::FArrayBox &jy_fab, amrex::FArrayBox &jz_fab, const long np_to_depose, const amrex::Real relative_time, const std::array< amrex::Real, 3 > &dx, const std::array< amrex::Real, 3 > &xyzmin, const amrex::Dim3 lo, const amrex::Real q, const int n_rz_azimuthal_modes, amrex::Real *cost, const long load_balance_costs_update_algo, const amrex::DenseBins< WarpXParticleContainer::ParticleType > &a_bins, const amrex::Box &box, const amrex::Geometry &geom, const amrex::IntVect &a_tbox_max_size)
 Current Deposition for thread thread_num using shared memory. More...
 
template<int depos_order>
void doEsirkepovDepositionShapeN (const GetParticlePosition &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_depose, const amrex::Real dt, const amrex::Real relative_time, const std::array< amrex::Real, 3 > &dx, const std::array< amrex::Real, 3 > xyzmin, const amrex::Dim3 lo, const amrex::Real q, const int n_rz_azimuthal_modes, amrex::Real *const cost, const long load_balance_costs_update_algo)
 Esirkepov Current Deposition for thread thread_num. More...
 
template<int depos_order>
void doVayDepositionShapeN (const GetParticlePosition &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, const long np_to_depose, const amrex::Real dt, const amrex::Real relative_time, const std::array< amrex::Real, 3 > &dx, const std::array< amrex::Real, 3 > &xyzmin, const amrex::Dim3 lo, const amrex::Real q, const int n_rz_azimuthal_modes, amrex::Real *cost, const long load_balance_costs_update_algo)
 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. More...
 

Function Documentation

◆ doDepositionShapeN()

template<int depos_order>
void doDepositionShapeN ( const GetParticlePosition 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 jx_fab,
amrex::FArrayBox jy_fab,
amrex::FArrayBox jz_fab,
const long  np_to_depose,
const amrex::Real  relative_time,
const std::array< amrex::Real, 3 > &  dx,
const std::array< amrex::Real, 3 > &  xyzmin,
const amrex::Dim3  lo,
const amrex::Real  q,
const int  n_rz_azimuthal_modes,
amrex::Real *  cost,
const long  load_balance_costs_update_algo 
)

Current Deposition for thread thread_num.

Template Parameters
depos_orderdeposition order
Parameters
GetPositionA functor for returning the particle position.
wpPointer to array of particle weights.
uxp,uyp,uzpPointer to arrays of particle momentum.
ion_levPointer 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_fabFArrayBox of current density, either full array or tile.
np_to_deposeNumber of particles for which current is deposited.
relative_timeTime 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.
dx3D cell size
xyzminPhysical lower bounds of domain.
loIndex lower bounds of domain.
qspecies charge.
n_rz_azimuthal_modesNumber of azimuthal modes when using RZ geometry.
costPointer to (load balancing) cost corresponding to box where present particles deposit current.
load_balance_costs_update_algoSelected method for updating load balance costs.

◆ doDepositionSharedShapeN()

template<int depos_order>
void doDepositionSharedShapeN ( const GetParticlePosition 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 jx_fab,
amrex::FArrayBox jy_fab,
amrex::FArrayBox jz_fab,
const long  np_to_depose,
const amrex::Real  relative_time,
const std::array< amrex::Real, 3 > &  dx,
const std::array< amrex::Real, 3 > &  xyzmin,
const amrex::Dim3  lo,
const amrex::Real  q,
const int  n_rz_azimuthal_modes,
amrex::Real *  cost,
const long  load_balance_costs_update_algo,
const amrex::DenseBins< WarpXParticleContainer::ParticleType > &  a_bins,
const amrex::Box box,
const amrex::Geometry geom,
const amrex::IntVect a_tbox_max_size 
)

Current Deposition for thread thread_num using shared memory.

Template Parameters
depos_orderdeposition order
Parameters
GetPositionA functor for returning the particle position.
wpPointer to array of particle weights.
uxp,uyp,uzpPointer to arrays of particle momentum.
ion_levPointer 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_fabFArrayBox of current density, either full array or tile.
np_to_deposeNumber of particles for which current is deposited.
dtTime step for particle level
relative_timeTime 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.
dx3D cell size
xyzminPhysical lower bounds of domain.
loIndex lower bounds of domain.
qspecies charge.
n_rz_azimuthal_modesNumber of azimuthal modes when using RZ geometry.
costPointer to (load balancing) cost corresponding to box where present particles deposit current.
load_balance_costs_update_algoSelected method for updating load balance costs.

◆ doEsirkepovDepositionShapeN()

template<int depos_order>
void doEsirkepovDepositionShapeN ( const GetParticlePosition 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_depose,
const amrex::Real  dt,
const amrex::Real  relative_time,
const std::array< amrex::Real, 3 > &  dx,
const std::array< amrex::Real, 3 >  xyzmin,
const amrex::Dim3  lo,
const amrex::Real  q,
const int  n_rz_azimuthal_modes,
amrex::Real *const  cost,
const long  load_balance_costs_update_algo 
)

Esirkepov Current Deposition for thread thread_num.

Template Parameters
depos_orderdeposition order
Parameters
GetPositionA functor for returning the particle position.
wpPointer to array of particle weights.
uxp,uyp,uzpPointer to arrays of particle momentum.
ion_levPointer 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_arrArray4 of current density, either full array or tile.
np_to_deposeNumber of particles for which current is deposited.
dtTime step for particle level
[in]relative_timeTime 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.
dx3D cell size
xyzminPhysical lower bounds of domain.
loIndex lower bounds of domain.
qspecies charge.
n_rz_azimuthal_modesNumber of azimuthal modes when using RZ geometry.
costPointer to (load balancing) cost corresponding to box where present particles deposit current.
load_balance_costs_update_algoSelected method for updating load balance costs.

◆ doVayDepositionShapeN()

template<int depos_order>
void doVayDepositionShapeN ( const GetParticlePosition 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,
const long  np_to_depose,
const amrex::Real  dt,
const amrex::Real  relative_time,
const std::array< amrex::Real, 3 > &  dx,
const std::array< amrex::Real, 3 > &  xyzmin,
const amrex::Dim3  lo,
const amrex::Real  q,
const int  n_rz_azimuthal_modes,
amrex::Real *  cost,
const long  load_balance_costs_update_algo 
)

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.

Template Parameters
depos_orderdeposition order
Parameters
[in]GetPositionFunctor that returns the particle position
[in]wpPointer to array of particle weights
[in]uxp,uyp,uzpPointer to arrays of particle momentum along x
[in]ion_levPointer 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_fabFArrayBox of Vay current density, either full array or tile
[in]np_to_deposeNumber of particles for which current is deposited
[in]dtTime step for particle level
[in]relative_timeTime 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]dx3D cell size
[in]xyzmin3D lower bounds of physical domain
[in]loDimension-agnostic lower bounds of index domain
[in]qSpecies charge
[in]n_rz_azimuthal_modesNumber of azimuthal modes in RZ geometry
[in,out]costPointer to (load balancing) cost corresponding to box where present particles deposit current
[in]load_balance_costs_update_algoSelected method for updating load balance costs