13#ifndef CD_KMCDUALSTATEIMPLEM_H
14#define CD_KMCDUALSTATEIMPLEM_H
21#include <CD_NamespaceHeader.H>
26 this->
define(a_numReactiveSpecies, a_numNonReactiveSpecies);
75 std::vector<T> out(0);
130 ostr <<
"KMCDualState : \n";
136 ostr <<
"\t Reactive = (";
137 for (
size_t i = 0; i < reactiveState.size(); i++) {
138 ostr << reactiveState[i];
139 if (i < reactiveState.size() - 1) {
145 ostr <<
"\t Non-reactive = (";
146 for (
size_t i = 0; i < nonReactiveState.size(); i++) {
147 ostr << nonReactiveState[i];
148 if (i < nonReactiveState.size() - 1) {
157#include <CD_NamespaceFooter.H>
std::ostream & operator<<(std::ostream &ostr, const KMCDualState< T > &a_state)
State printing function.
Definition CD_KMCDualStateImplem.H:128
Declaration of a simple state vector for running Kinetic Monte Carlo for plasma problems.
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()=default
Default 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
int m_numReactiveSpecies
Number of reactive species.
Definition CD_KMCDualState.H:144