WarpX
Namespaces | Enumerations | Functions | Variables
DefaultInitialization.H File Reference
#include <WarpX.H>
#include "Particles/ElementaryProcess/QEDInternals/BreitWheelerEngineWrapper.H"
#include "Particles/ElementaryProcess/QEDInternals/QuantumSyncEngineWrapper.H"
#include <AMReX_GpuContainers.H>
#include <AMReX_REAL.H>
#include <cmath>
#include <map>
#include <string>

Go to the source code of this file.

Namespaces

 ParticleCreation
 

Enumerations

enum class  InitializationPolicy { Zero =0 , One , RandomExp }
 This set of initialization policies describes what happens when we need to create a new particle due to an elementary process. For example, when an ionization event creates an electron, these policies control the initial values of the electron's components. These can always be over-written later. More...
 

Functions

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal initializeRealValue (const InitializationPolicy policy, amrex::RandomEngine const &engine) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int initializeIntValue (const InitializationPolicy policy) noexcept
 
template<typename PTile >
void ParticleCreation::DefaultInitializeRuntimeAttributes (PTile &ptile, const int n_external_attr_real, const int n_external_attr_int, const std::vector< std::string > &user_real_attribs, const std::vector< std::string > &user_int_attribs, const std::map< std::string, int > &particle_comps, const std::map< std::string, int > &particle_icomps, const std::vector< amrex::Parser * > &user_real_attrib_parser, const std::vector< amrex::Parser * > &user_int_attrib_parser, const bool do_qed_comps, BreitWheelerEngine *p_bw_engine, QuantumSynchrotronEngine *p_qs_engine, const int ionization_initial_level, int start, int stop)
 Default initialize runtime attributes in a tile. This routine does not initialize the first n_external_attr_real real attributes and the first n_external_attr_int integer attributes, which have been in principle externally set elsewhere. More...
 

Variables

static std::map< std::string, InitializationPolicyinitialization_policies
 This map sets the initialization policy for each particle component used in WarpX. More...
 

Enumeration Type Documentation

◆ InitializationPolicy

enum InitializationPolicy
strong

This set of initialization policies describes what happens when we need to create a new particle due to an elementary process. For example, when an ionization event creates an electron, these policies control the initial values of the electron's components. These can always be over-written later.

The specific meanings are as follows: Zero - set the component to zero One - set the component to one RandomExp - a special flag for the optical depth component used by certain QED processes, which gets a random initial value extracted from an exponential distribution

Enumerator
Zero 
One 
RandomExp 

Function Documentation

◆ initializeIntValue()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int initializeIntValue ( const InitializationPolicy  policy)
noexcept

◆ initializeRealValue()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal initializeRealValue ( const InitializationPolicy  policy,
amrex::RandomEngine const &  engine 
)
noexcept

Variable Documentation

◆ initialization_policies

std::map<std::string, InitializationPolicy> initialization_policies
static
Initial value:

This map sets the initialization policy for each particle component used in WarpX.