Reaction type for advancing a KMCDualState for Kinetic Monte Carlo.
More...
#include <CD_KMCDualStateReaction.H>
|
void | computeStateChanges () noexcept |
| Compute state change.
|
|
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. More...
|
|
template<typename State = KMCDualState<long long>, typename T = long long>
class KMCDualStateReaction< State, T >
Reaction type for advancing a KMCDualState for Kinetic Monte Carlo.
- Note
- T is the integer type used for the state.
◆ KMCDualStateReaction()
template<typename State , typename T >
Full constructor.
- Parameters
-
[in] | a_lhsReactives | Reactive species on the left-hand side of the reaction (i.e., the reactants) |
[in] | a_rhsReactives | Reactive species on the right-hand side of the reaction (i.e., the products) |
[in] | a_rhsNonReactives | Non-reactive species on the right-hand side of the reaction (i.e., piggybacked products) |
◆ advanceState()
template<typename State , typename T >
void KMCDualStateReaction< State, T >::advanceState |
( |
State & |
a_state, |
|
|
const T & |
a_numReactions |
|
) |
| const |
|
inlinenoexcept |
Advance the incoming state with the number of reactions.
- Parameters
-
[in,out] | 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
-
◆ getNonReactiveProducts()
template<typename State , typename T >
Get the non-reactive products from the reaction.
- Returns
- m_rhsNonReactives
◆ getReactants()
template<typename State , typename T >
Get the reactants in the reaction.
- Returns
- m_lhsReactives
◆ getReactiveProducts()
template<typename State , typename T >
Get the products from the reaction.
- Returns
- m_rhsReactives
◆ getStateChange()
template<typename State , typename T >
Get the state change due to a change in the input reactant.
- Parameters
-
[in] | a_reactant | Reactive species |
◆ population()
template<typename State , typename T >
T KMCDualStateReaction< State, T >::population |
( |
const size_t & |
a_reactant, |
|
|
const State & |
a_state |
|
) |
| const |
|
inlinenoexcept |
Get the population of the reactant in the input state.
- Parameters
-
[in] | a_reactant | Reactive species |
[in] | a_state | State vector |
◆ 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
◆ sanityCheck()
template<typename State , typename T >
Debugging function which ensures that the class data holders do not reach out of the incoming state.
This is necessary because PlasmaReaction does not have compile-time size restrictions on the incoming state. The internals of this method uses Chombo assertions so the compiler should be able to take this function out of the executable if compiling with the correct flags.
◆ m_propensityFactor
template<typename State = KMCDualState<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: