Hipace
Functions
ElasticCollisionPerez.H File Reference
#include "utils/Constants.H"
#include "UpdateMomentumPerez.H"
#include "ComputeTemperature.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 *psi1, T_R *u2x, T_R *u2y, T_R *psi2, T_R const *w1, T_R const *w2, int const *ion_lev1, int const *ion_lev2, T_R q1, T_R q2, T_R const m1, T_R const m2, T_R const T1, T_R const T2, const bool can_ionize1, const bool can_ionize2, T_R const dt, T_R const L, T_R const inv_dV, T_R const clight, T_R const inv_c, T_R const inv_c_SI, T_R const inv_c2, T_R const inv_c2_SI, const bool normalized_units, const amrex::Real background_density_SI, const bool is_same_species, bool is_beam_coll, 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 *  psi1,
T_R *  u2x,
T_R *  u2y,
T_R *  psi2,
T_R const *  w1,
T_R const *  w2,
int const *  ion_lev1,
int const *  ion_lev2,
T_R  q1,
T_R  q2,
T_R const  m1,
T_R const  m2,
T_R const  T1,
T_R const  T2,
const bool  can_ionize1,
const bool  can_ionize2,
T_R const  dt,
T_R const  L,
T_R const  inv_dV,
T_R const  clight,
T_R const  inv_c,
T_R const  inv_c_SI,
T_R const  inv_c2,
T_R const  inv_c2_SI,
const bool  normalized_units,
const amrex::Real  background_density_SI,
const bool  is_same_species,
bool  is_beam_coll,
amrex::RandomEngine const &  engine 
)

Prepare information for and call UpdateMomentumPerezElastic().

Parameters
[in]I1sstart index for I1 (inclusive).
[in]I2sstart index for I2 (inclusive).
[in]I1estart index for I1 (exclusive).
[in]I2estart index for I2 (exclusive).
[in]I1index array.
[in]I2index array.
[in,out]u1xx Proper velocity (u=v*gamma) array of species 1.
[in,out]u1yy Proper velocity (u=v*gamma) array of species 1.
[in,out]psi1pseudo-potential array of species 1.
[in,out]u2xx Proper velocity (u=v*gamma) array of species 2.
[in,out]u2yy Proper velocity (u=v*gamma) array of species 2.
[in,out]psi2pseudo-potential array of species 2.
[in]w1array of weights.
[in]w2array of weights.
[in]ion_lev1current ionization level of species 1
[in]ion_lev2current ionization level of species 2
[in]q1Physical charge of species 1.
[in]q2Physical charge of species 2.
[in]m1Physical mass of species 1.
[in]m2Physical mass of species 2.
[in]T1temperature of species 1 (Joule). If <0, measured per-cell.
[in]T2temperature of species 2 (Joule). If <0, measured per-cell.
[in]can_ionize1whether species 1 can be ionized
[in]can_ionize2whether species 2 can be ionized
[in]dtis the time step length between two collision calls.
[in]LCoulomb log. If <0, measured per cell.
[in]inv_dVinverse volume of the corresponding cell.
[in]clightspeed of light c
[in]inv_c1/c
[in]inv_c_SI1/c in SI units
[in]inv_c21/c^2
[in]inv_c2_SI1/c^2 in SI units
[in]normalized_unitswhether normalized units are used
[in]background_density_SIbackground plasma density (only needed for normalized units)
[in]is_same_specieswhether the collisions happen within the same species
[in]is_beam_collwhether species1 is a beam
[in]engineAMReX engine for the random number generator.