Reaction type for advancing a KMCSingleState for Kinetic Monte Carlo.
More...
#include <CD_KMCSingleStateReaction.H>
template<typename State = KMCSingleState<long long>, typename T = long long>
class KMCSingleStateReaction< State, T >
Reaction type for advancing a KMCSingleState for Kinetic Monte Carlo.
- Note
- T is the integer type used for the state.
◆ KMCSingleStateReaction()
template<typename State , typename T >
Full constructor, sets reactants and products.
For a reaction X_0 -> X_0 + X_0 we have a_reactants = [0] and a_products [0,0]
- Parameters
-
[in] | a_reactants | Species on the left-hand side of the reaction. |
[in] | a_products | Species on the right-hand side of the reaction. |
◆ advanceState()
template<typename State , typename T >
Advance the incoming state with the number of reactions.
- Parameters
-
[in] | a_state | State vector |
[in] | a_numReactions | Number of reactions. |
◆ computeCriticalNumberOfReactions()
template<typename State , typename T >
Compute the number of times the reaction can fire before exhausting one of the reactants.
- Parameters
-
◆ getReactants()
template<typename State , typename T >
Get the reactants involved in the reaction.
- Returns
- m_reactants
◆ getStateChange()
template<typename State , typename T >
Get the state change due to a change in the input reactant species.
- Parameters
-
[in] | a_rectant | Reactant species. |
◆ population()
template<typename State , typename T >
Get the population of the reactant in the input state.
- Parameters
-
[in] | a_reactant | Reactant |
[in] | a_state | State |
◆ propensity()
template<typename State , typename T >
Compute the propensity function for this reaction type.
- Parameters
-
- Note
- User should set the rate before calling this routine.
◆ rate()
template<typename State , typename T >
Get modifiable reaction rate.
- Returns
- m_rate
◆ m_propensityFactor
template<typename State = KMCSingleState<long long>, typename T = long long>
Factor for the case where two or more particles of the same species react.
For reactions X + X -> null the propensity is k * X * (X-1)/2 because there are X * (X-1)/2 unique pairs of particles in the cell.
The documentation for this class was generated from the following files: