13#ifndef CD_KMCSINGLESTATEIMPLEM_H
14#define CD_KMCSINGLESTATEIMPLEM_H
21#include <CD_NamespaceHeader.H>
26 m_state.resize(a_numSpecies);
39 for (
const auto& p : m_state) {
54 CH_assert(a_idx < m_state.size());
56 return m_state[a_idx];
63 CH_assert(a_idx < m_state.size());
65 return m_state[a_idx];
79 m_state = a_linearizedState;
96#include <CD_NamespaceFooter.H>
Declaration of a simple state vector for running Kinetic Monte Carlo for plasma problems.
T & operator[](const size_t a_idx) noexcept
Get the population of the input index.
Definition CD_KMCSingleStateImplem.H:52
virtual ~KMCSingleState()
Destructor.
Definition CD_KMCSingleStateImplem.H:30
KMCSingleState()=delete
Disallowed weak construction.
void linearIn(const std::vector< T > &a_linearizedState) noexcept
Linearize the input buffer onto the current state.
Definition CD_KMCSingleStateImplem.H:77
State & getState() noexcept
Get modifiable state.
Definition CD_KMCSingleStateImplem.H:84
std::vector< T > linearOut() const noexcept
Linearize the state onto an output vector.
Definition CD_KMCSingleStateImplem.H:70
bool isValidState() const noexcept
Check if state is a valid state.
Definition CD_KMCSingleStateImplem.H:35
std::vector< T > State
Alias for the state type.
Definition CD_KMCSingleState.H:36