13#ifndef CD_KMCSINGLESTATEREACTION_H
14#define CD_KMCSINGLESTATEREACTION_H
26#include <CD_NamespaceHeader.H>
32template <
typename State = KMCSingleState<
long long>,
typename T =
long long>
149#include <CD_NamespaceFooter.H>
Implementation of CD_KMCSingleStateReaction.H.
Declaration of a simple state vector for running Kinetic Monte Carlo for plasma problems.
Reaction type for advancing a KMCSingleState for Kinetic Monte Carlo.
Definition CD_KMCSingleStateReaction.H:34
std::list< size_t > getReactants() const noexcept
Get the reactants involved in the reaction.
Definition CD_KMCSingleStateReactionImplem.H:151
virtual ~KMCSingleStateReaction()
Destructor.
Definition CD_KMCSingleStateReactionImplem.H:34
std::map< size_t, T > m_stateChange
State change for reactants/products.
Definition CD_KMCSingleStateReaction.H:140
std::list< size_t > m_products
Products.
Definition CD_KMCSingleStateReaction.H:135
Real propensity(const State &a_state) const noexcept
Compute the propensity function for this reaction type.
Definition CD_KMCSingleStateReactionImplem.H:111
std::list< size_t > m_reactants
Reactants.
Definition CD_KMCSingleStateReaction.H:130
Real m_propensityFactor
Factor for the case where two or more particles of the same species react.
Definition CD_KMCSingleStateReaction.H:125
T getStateChange(const size_t a_particleReactant) const noexcept
Get the state change due to a change in the input reactant species.
Definition CD_KMCSingleStateReactionImplem.H:158
Real m_rate
Reaction rate.
Definition CD_KMCSingleStateReaction.H:119
void computeStateChanges() noexcept
Compute state change vectors from the reactant/product lists.
Definition CD_KMCSingleStateReactionImplem.H:41
static T population(const size_t &a_reactant, const State &a_state) noexcept
Get the population of the reactant in the input state.
Definition CD_KMCSingleStateReactionImplem.H:104
T computeCriticalNumberOfReactions(const State &a_state) const noexcept
Compute the number of times the reaction can fire before exhausting one of the reactants.
Definition CD_KMCSingleStateReactionImplem.H:130
void advanceState(State &a_state, const T &a_numReactions) const noexcept
Advance the incoming state with the number of reactions.
Definition CD_KMCSingleStateReactionImplem.H:173
KMCSingleStateReaction()=default
Default constructor.
KMCSingleStateReaction(const KMCSingleStateReaction &)=default
Copy constructor.
Real & rate() const noexcept
Get modifiable reaction rate.
Definition CD_KMCSingleStateReactionImplem.H:97
Base class for a tracer particle solver. This solver can advance particles in a pre-defined velocity ...
Definition CD_TracerParticleSolver.H:38
TracerParticleSolver()
Default constructor.
Definition CD_TracerParticleSolverImplem.H:26