WarpX
Functions
ElasticCollisionPerez.H File Reference
#include "UpdateMomentumPerezElastic.H"
#include "ComputeTemperature.H"
#include "Utils/WarpXConst.H"
#include <AMReX_Random.H>

Go to the source code of this file.

Functions

template<typename T_index , typename T_R >
AMREX_GPU_HOST_DEVICE AMREX_INLINE void ElasticCollisionPerez (T_index const I1s, T_index const I1e, T_index const I2s, T_index const I2e, T_index *I1, T_index *I2, T_R *u1x, T_R *u1y, T_R *u1z, T_R *u2x, T_R *u2y, T_R *u2z, T_R const *w1, T_R const *w2, T_R const q1, T_R const q2, T_R const m1, T_R const m2, T_R const T1, T_R const T2, T_R const dt, T_R const L, T_R const dV, amrex::RandomEngine const &engine)
 Prepare information for and call UpdateMomentumPerezElastic(). More...
 

Function Documentation

◆ ElasticCollisionPerez()

template<typename T_index , typename T_R >
AMREX_GPU_HOST_DEVICE AMREX_INLINE void ElasticCollisionPerez ( T_index const  I1s,
T_index const  I1e,
T_index const  I2s,
T_index const  I2e,
T_index *  I1,
T_index *  I2,
T_R *  u1x,
T_R *  u1y,
T_R *  u1z,
T_R *  u2x,
T_R *  u2y,
T_R *  u2z,
T_R const *  w1,
T_R const *  w2,
T_R const  q1,
T_R const  q2,
T_R const  m1,
T_R const  m2,
T_R const  T1,
T_R const  T2,
T_R const  dt,
T_R const  L,
T_R const  dV,
amrex::RandomEngine const &  engine 
)

Prepare information for and call UpdateMomentumPerezElastic().

Parameters
[in]I1s,I2sis the start index for I1,I2 (inclusive).
[in]I1e,I2eis the start index for I1,I2 (exclusive).
[in]I1and I2 are the index arrays.
[in,out]u1and u2 are the velocity arrays (u=v*gamma), they could be either different or the same, their lengths are not needed,
[in]I1and I2 determine all elements that will be used.
[in]w1and w2 are arrays of weights.
[in]q1and q2 are charges. m1 and m2 are masses.
[in]T1and T2 are temperatures (Joule) and will be used if greater than zero, otherwise will be computed.
[in]dtis the time step length between two collision calls.
[in]Lis the Coulomb log and will be used if greater than zero, otherwise will be computed.
[in]dVis the volume of the corresponding cell.