|
| KMCSolver () noexcept |
| Default constructor – must subsequently define the object.
|
|
| KMCSolver (const KMCSolver &)=default |
| Disallowed copy constructor.
|
|
| KMCSolver (const KMCSolver &&)=delete |
| Disallowed move constructor.
|
|
| KMCSolver (const ReactionList &a_reactions) noexcept |
| Full constructor. More...
|
|
virtual | ~KMCSolver () noexcept |
| Destructor.
|
|
KMCSolver & | operator= (const KMCSolver &)=default |
| Copy assignment operator.
|
|
KMCSolver & | operator= (const KMCSolver &&)=delete |
| Disallowed move assignment operator.
|
|
void | define (const ReactionList &a_reactions) noexcept |
| Define function. Sets the reactions. More...
|
|
void | setSolverParameters (const T a_numCrit, const T a_numSSA, const Real a_eps, const Real a_SSAlim) noexcept |
| Set solver parameters. More...
|
|
std::vector< Real > | propensities (const State &a_state) const noexcept |
| Compute propensities for ALL reactions. More...
|
|
std::vector< Real > | propensities (const State &a_state, const ReactionList &a_reactions) const noexcept |
| Compute propensities for a subset of reactions. More...
|
|
Real | totalPropensity (const State &a_state) const noexcept |
| Compute the total propensity for ALL reactions. More...
|
|
Real | totalPropensity (const State &a_state, const ReactionList &a_reactions) const noexcept |
| Compute the total propensity for a subset of reactions. More...
|
|
std::pair< ReactionList, ReactionList > | partitionReactions (const State &a_state) const noexcept |
| Partition reactions into critical and non-critical reactions. More...
|
|
std::pair< ReactionList, ReactionList > | partitionReactions (const State &a_state, const ReactionList &a_reactions) const noexcept |
| Partition reactions into critical and non-critical reactions. More...
|
|
Real | getCriticalTimeStep (const State &a_state) const noexcept |
| Get the time to the next critical reaction. More...
|
|
Real | getCriticalTimeStep (const State &a_state, const ReactionList &a_criticalReactions) const noexcept |
| Get the time to the next critical reaction. More...
|
|
Real | getCriticalTimeStep (const std::vector< Real > &a_propensities) const noexcept |
| Get the time to the next critical reaction. More...
|
|
Real | getCriticalTimeStep (const Real &a_totalPropensity) const noexcept |
| Get the time to the next critical reaction. More...
|
|
Real | getNonCriticalTimeStep (const State &a_state) const noexcept |
| Get the non-critical time step. More...
|
|
Real | getNonCriticalTimeStep (const State &a_state, const ReactionList &a_reactions) const noexcept |
| Get the non-critical time step. More...
|
|
Real | getNonCriticalTimeStep (const State &a_state, const ReactionList &a_nonCriticalReactions, const std::vector< Real > &a_nonCriticalPropensities) const noexcept |
| Get the non-critical time step. More...
|
|
void | stepTauPlain (State &a_state, const Real a_dt) const noexcept |
| Perform one plain tau-leaping step using ALL reactions. More...
|
|
void | stepTauPlain (State &a_state, const ReactionList &a_reactions, const Real a_dt) const noexcept |
| Perform one plain tau-leaping step over the input reactions using a time step a_dt. More...
|
|
void | stepTauPlain (State &a_state, const ReactionList &a_reactions, const std::vector< Real > &a_propensities, const Real a_dt) const noexcept |
| Perform one plain tau-leaping step over the input reactions using a time step a_dt. More...
|
|
void | advanceTauPlain (State &a_state, const Real a_dt) const noexcept |
| Advance with plain tau-leaping step over the input time. This can end up using substepping. More...
|
|
void | advanceTauPlain (State &a_state, const ReactionList &a_reactions, const Real a_dt) const noexcept |
| Advance with plain tau-leaping step over the input time. This can end up using substepping. More...
|
|
void | stepTauMidpoint (State &a_state, const Real a_dt) const noexcept |
| Perform one leaping step using the midpoint method for ALL reactions over a time step a_dt. More...
|
|
void | stepTauMidpoint (State &a_state, const ReactionList &a_reactions, const Real a_dt) const noexcept |
| Perform one leaping step using the midpoint method for the input reactions over a time step a_dt. More...
|
|
void | advanceTauMidpoint (State &a_state, const Real a_dt) const noexcept |
| Perform one leaping step using the midpoint method all reactions over a time step a_dt. More...
|
|
void | advanceTauMidpoint (State &a_state, const ReactionList &a_reactions, const Real a_dt) const noexcept |
| Perform one leaping step using the midpoint method for the input reactions over a time step a_dt. More...
|
|
void | stepSSA (State &a_state) const noexcept |
| Perform a single SSA step. More...
|
|
void | stepSSA (State &a_state, const ReactionList &a_reactions) const noexcept |
| Perform a single SSA step. More...
|
|
void | stepSSA (State &a_state, const ReactionList &a_reactions, const std::vector< Real > &a_propensities) const noexcept |
| Perform a single SSA step. This version has pre-computed propensities (for optimization reasons) More...
|
|
void | advanceSSA (State &a_state, const Real a_dt) const noexcept |
| Advance with the SSA over the input time. This can end up using substepping. More...
|
|
void | advanceSSA (State &a_state, const ReactionList &a_reactions, const Real a_dt) const noexcept |
| Advance with the SSA over the input time. This can end up using substepping. More...
|
|
void | advanceHybrid (State &a_state, const Real a_dt, const KMCLeapPropagator &a_leapPropagator=KMCLeapPropagator::TauPlain) const noexcept |
| Advance using Cao et. al. hybrid algorithm over the input time. This can end up using substepping. More...
|
|
void | advanceHybrid (State &a_state, const ReactionList &a_reactions, const Real a_dt, const KMCLeapPropagator &a_leapPropagator=KMCLeapPropagator::TauPlain) const noexcept |
| Advance using Cao et. al. hybrid algorithm over the input time. This can end up using substepping. More...
|
|
void | advanceHybrid (State &a_state, const ReactionList &a_reactions, const Real a_dt, const std::function< void(State &, const ReactionList &a_reactions, const Real a_dt)> &a_propagator) const noexcept |
| Advance using Cao et. al. hybrid algorithm over the input time. This can end up using substepping. More...
|
|
template<typename R, typename State, typename T = long long>
class KMCSolver< R, State, T >
Class for running Kinetic Monte-Carlo simulations.
The template parameter State is the underlying state type that KMC operators on. There are no required member functions on the State parameter, but the reaction type (template parameter R) MUST be able to operate on the state through the following functions:
- Real R::propensity(State) const -> Computes the reaction propensity for the input state.
- T R::computeCriticalNumberOfReactions(State) const -> Computes the minimum number of reactions that exhausts one of the reactants.
- void R::advanceState(State&, const T numReactions) const -> Advance state by numReactions
- std::<some_container> getReactants() const -> Get reactants involved in the reactions.
- T R::population(const <some_type> reactant, const State& a_state) -> Get the population of the input reactant in the input state.
The template parameter T should agree across both both R, State, and KMCSolver.