13#ifndef CD_KMCDUALSTATE_H
14#define CD_KMCDUALSTATE_H
22#include <CD_NamespaceHeader.H>
30template <
typename T =
long long>
59 inline KMCDualState(
const size_t a_numReactiveSpecies,
const size_t a_numNonReactiveSpecies)
noexcept;
86 define(
const size_t a_numReactiveSpecies,
const size_t a_numNonReactiveSpecies)
noexcept;
128 inline std::vector<T>
138 linearIn(const std::vector<T>& a_linearizedState) noexcept;
170operator<<(std::ostream& ostr, const
KMCDualState<T>& a_state);
172#include <CD_NamespaceFooter.H>
Implementation of CD_KMCDualState.H.
Declaration of a "dual state" for advancing with the Kinetic Monte Carlo module.
Definition CD_KMCDualState.H:32
std::vector< T > State
Alias for the state type.
Definition CD_KMCDualState.H:37
State & getNonReactiveState() noexcept
Get modifiable non-reactive state.
Definition CD_KMCDualStateImplem.H:114
KMCDualState(const KMCDualState &&)=delete
Disallowed move constructor.
KMCDualState & operator=(const KMCDualState &a_other)=default
Copy assignment operator.
KMCDualState()=default
Default constructor.
KMCDualState(const KMCDualState &)=default
Copy constructor.
int m_numNonReactiveSpecies
Number of non-reactive species.
Definition CD_KMCDualState.H:149
State m_nonReactiveState
Non-reactive state.
Definition CD_KMCDualState.H:159
bool isValidState() const noexcept
Check if state is a valid state. An invalid state will have a negative number of reactants/non-reacta...
Definition CD_KMCDualStateImplem.H:48
void define(const size_t a_numReactiveSpecies, const size_t a_numNonReactiveSpecies) noexcept
Define function.
Definition CD_KMCDualStateImplem.H:37
void linearIn(const std::vector< T > &a_linearizedState) noexcept
Linearize the input buffer onto the current state.
Definition CD_KMCDualStateImplem.H:85
virtual ~KMCDualState()
Destructor.
Definition CD_KMCDualStateImplem.H:32
std::vector< T > linearOut() const noexcept
Linearize the state onto an output vector.
Definition CD_KMCDualStateImplem.H:73
State m_reactiveState
Reactive state.
Definition CD_KMCDualState.H:154
State & getReactiveState() noexcept
Get modifiable reactive state.
Definition CD_KMCDualStateImplem.H:100
KMCDualState & operator=(const KMCDualState &&)=delete
Disallowed move assignment.
int m_numReactiveSpecies
Number of reactive species.
Definition CD_KMCDualState.H:144