|
chombo-discharge
|
Reaction type for advancing a KMCDualState for Kinetic Monte Carlo. More...
#include <CD_KMCDualStateReaction.H>
Public Member Functions | |
| KMCDualStateReaction ()=default | |
| Disallowed constructor. Use the full constructor. | |
| KMCDualStateReaction (const KMCDualStateReaction &)=default | |
| Copy constructor (uses default). | |
| KMCDualStateReaction (const std::list< size_t > &a_lhsReactives, const std::list< size_t > &a_rhsReactives, const std::list< size_t > &a_rhsNonReactives) noexcept | |
| Full constructor. | |
| virtual | ~KMCDualStateReaction () |
| Destructor. | |
| Real & | rate () const noexcept |
| Get modifiable reaction rate. | |
| Real | propensity (const State &a_state) const noexcept |
| Compute the propensity function for this reaction type. | |
| T | computeCriticalNumberOfReactions (const State &a_state) const noexcept |
| Compute the number of times the reaction can fire before exhausting one of the reactants. | |
| std::list< size_t > | getReactants () const noexcept |
| Get the reactants in the reaction. | |
| std::list< size_t > | getReactiveProducts () const noexcept |
| Get the products from the reaction. | |
| std::list< size_t > | getNonReactiveProducts () const noexcept |
| Get the non-reactive products from the reaction. | |
| T | getStateChange (const size_t a_reactant) const noexcept |
| Get the state change due to a change in the input reactant. | |
| void | advanceState (State &a_state, const T &a_numReactions) const noexcept |
| Advance the incoming state with the number of reactions. | |
Static Public Member Functions | |
| static T | population (const size_t &a_reactant, const State &a_state) noexcept |
| Get the population of the reactant in the input state. | |
Protected Member Functions | |
| 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. | |
Protected Attributes | |
| Real | m_rate |
| Reaction rate. | |
| Real | m_propensityFactor |
| Factor for the case where two or more particles of the same species react. | |
| std::list< size_t > | m_lhsReactives |
| Reactive species. | |
| std::list< size_t > | m_rhsReactives |
| Product species. | |
| std::list< size_t > | m_rhsNonReactives |
| Non-reactive product species. | |
| std::map< size_t, T > | m_reactiveStateChange |
| State change for reactants/products. | |
| std::map< size_t, T > | m_nonReactiveStateChange |
| State change for non-reactive products. | |
Reaction type for advancing a KMCDualState for Kinetic Monte Carlo.
|
inlinenoexcept |
Full constructor.
| [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) |
|
inlinenoexcept |
Advance the incoming state with the number of reactions.
| [in,out] | a_state | State vector |
| [in] | a_numReactions | Number of reactions. |
|
inlinenoexcept |
Compute the number of times the reaction can fire before exhausting one of the reactants.
| [in] | a_state | State vector |
|
inlinenoexcept |
Get the non-reactive products from the reaction.
|
inlinenoexcept |
Get the reactants in the reaction.
|
inlinenoexcept |
Get the products from the reaction.
|
inlinenoexcept |
Get the state change due to a change in the input reactant.
| [in] | a_reactant | Reactive species |
|
inlinestaticnoexcept |
Get the population of the reactant in the input state.
| [in] | a_reactant | Reactive species |
| [in] | a_state | State vector |
|
inlinenoexcept |
Compute the propensity function for this reaction type.
| [in] | a_state | State vector |
|
inlinenoexcept |
Get modifiable reaction rate.
|
inlineprotectednoexcept |
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.
|
protected |
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.