chombo-discharge
Loading...
Searching...
No Matches
CD_KMCSingleState.H
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021-2026 SINTEF Energy Research
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
13#ifndef CD_KMCSINGLESTATE_H
14#define CD_KMCSINGLESTATE_H
15
16// Std includes
17#include <vector>
18#include <cstddef>
19#include <ostream>
20
21// Our includes
22#include <CD_NamespaceHeader.H>
23
29template <typename T = long long>
31{
32public:
37
41 inline KMCSingleState() = delete;
42
47 inline KMCSingleState(const KMCSingleState& a_state) = default;
48
52 inline KMCSingleState(const KMCSingleState&&) = delete;
53
58 inline KMCSingleState(const size_t a_numSpecies) noexcept;
59
63 virtual ~KMCSingleState();
64
70 inline KMCSingleState&
71 operator=(const KMCSingleState& a_other) = default;
72
76 inline KMCSingleState&
77 operator=(const KMCSingleState&&) = delete;
78
84 inline T&
85 operator[](const size_t a_idx) noexcept;
86
92 inline const T&
93 operator[](const size_t a_idx) const noexcept;
94
99 inline bool
101
109
116 inline void
118
125
132
138};
139
140#include <CD_NamespaceFooter.H>
141
143
144#endif
Implementation of CD_KMCSingleState.H.
Declaration of a straightforward state for advancing with the Kinetic Monte Carlo module.
Definition CD_KMCSingleState.H:31
KMCSingleState(const KMCSingleState &&)=delete
Disallowed move constructor.
KMCSingleState(const KMCSingleState &a_state)=default
Copy constructor.
T & operator[](const size_t a_idx) noexcept
Get the population of the input index.
Definition CD_KMCSingleStateImplem.H:58
KMCSingleState & operator=(const KMCSingleState &&)=delete
Disallowed move assignment.
virtual ~KMCSingleState()
Destructor.
Definition CD_KMCSingleStateImplem.H:32
KMCSingleState()=delete
Disallowed weak construction.
State m_state
State vector.
Definition CD_KMCSingleState.H:137
void linearIn(const std::vector< T > &a_linearizedState) noexcept
Linearize the input buffer onto the current state.
Definition CD_KMCSingleStateImplem.H:83
State & getState() noexcept
Get modifiable state.
Definition CD_KMCSingleStateImplem.H:90
KMCSingleState & operator=(const KMCSingleState &a_other)=default
Copy assignment operator.
std::vector< T > linearOut() const noexcept
Linearize the state onto an output vector.
Definition CD_KMCSingleStateImplem.H:76
bool isValidState() const noexcept
Check if state is a valid state.
Definition CD_KMCSingleStateImplem.H:39
std::vector< T > State
Alias for the state type.
Definition CD_KMCSingleState.H:36
Base class for a tracer particle solver. This solver can advance particles in a pre-defined velocity ...
Definition CD_TracerParticleSolver.H:38
TracerParticleSolver()
Default constructor.
Definition CD_TracerParticleSolverImplem.H:26