13#ifndef CD_KMCDUALSTATEREACTION_H
14#define CD_KMCDUALSTATEREACTION_H
26#include <CD_NamespaceHeader.H>
32template <
typename State = KMCDualState<
long long>,
typename T =
long long>
185#include <CD_NamespaceFooter.H>
Implementation of CD_KMCDualStateReaction.H.
Declaration of a simple state vector for running Kinetic Monte Carlo for plasma problems.
Reaction type for advancing a KMCDualState for Kinetic Monte Carlo.
Definition CD_KMCDualStateReaction.H:34
T getStateChange(const size_t a_reactant) const noexcept
Get the state change due to a change in the input reactant.
Definition CD_KMCDualStateReactionImplem.H:216
void sanityCheck(const State &a_state) const noexcept
Debugging function which ensures that the class data holders do not reach out of the incoming state.
Definition CD_KMCDualStateReactionImplem.H:256
void computeStateChanges() noexcept
Compute state change vectors from the reactant/product lists.
Definition CD_KMCDualStateReactionImplem.H:50
std::list< size_t > getNonReactiveProducts() const noexcept
Get the non-reactive products from the reaction.
Definition CD_KMCDualStateReactionImplem.H:209
std::list< size_t > m_lhsReactives
Reactive species (left-hand side).
Definition CD_KMCDualStateReaction.H:146
std::map< size_t, T > m_reactiveStateChange
State change for reactants/products.
Definition CD_KMCDualStateReaction.H:161
KMCDualStateReaction()=default
Default constructor.
virtual ~KMCDualStateReaction()
Destructor.
Definition CD_KMCDualStateReactionImplem.H:43
std::list< size_t > getReactiveProducts() const noexcept
Get the products from the reaction.
Definition CD_KMCDualStateReactionImplem.H:202
Real propensity(const State &a_state) const noexcept
Compute the propensity function for this reaction type.
Definition CD_KMCDualStateReactionImplem.H:146
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_KMCDualStateReactionImplem.H:168
std::list< size_t > getReactants() const noexcept
Get the reactants in the reaction.
Definition CD_KMCDualStateReactionImplem.H:195
std::list< size_t > m_rhsReactives
Product species (right-hand side reactive).
Definition CD_KMCDualStateReaction.H:151
std::map< size_t, T > m_nonReactiveStateChange
State change for non-reactive products.
Definition CD_KMCDualStateReaction.H:166
Real & rate() const noexcept
Get modifiable reaction rate.
Definition CD_KMCDualStateReactionImplem.H:126
void advanceState(State &a_state, const T &a_numReactions) const noexcept
Advance the incoming state with the number of reactions.
Definition CD_KMCDualStateReactionImplem.H:231
Real m_propensityFactor
Factor for the case where two or more particles of the same species react.
Definition CD_KMCDualStateReaction.H:141
std::list< size_t > m_rhsNonReactives
Non-reactive product species.
Definition CD_KMCDualStateReaction.H:156
KMCDualStateReaction(const KMCDualStateReaction &)=default
Copy constructor.
Real m_rate
Reaction rate.
Definition CD_KMCDualStateReaction.H:135
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_KMCDualStateReactionImplem.H:133
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