chombo-discharge
CD_ItoKMCPhotoReactionImplem.H
Go to the documentation of this file.
1 /* chombo-discharge
2  * Copyright © 2021 SINTEF Energy Research.
3  * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
4  */
5 
12 // Our includes
13 #ifndef CD_ItoKMCPhotoReactionImplem_H
14 #define CD_ItoKMCPhotoReactionImplem_H
15 
16 #include <CD_ItoKMCPhotoReaction.H>
17 #include <CD_NamespaceHeader.H>
18 
19 using namespace Physics::ItoKMC;
20 
21 inline ItoKMCPhotoReaction::ItoKMCPhotoReaction(const size_t a_source,
22  const std::list<size_t> a_targets,
23  const Real a_efficiency) noexcept
24 {
25  this->define(a_source, a_targets, a_efficiency);
26 }
27 
29 {}
30 
31 inline void
32 ItoKMCPhotoReaction::define(const size_t a_source, const std::list<size_t> a_targets, const Real a_efficiency) noexcept
33 {
34  m_source = a_source;
35  m_targets = a_targets;
36  m_efficiency = a_efficiency;
37 
38  const std::string baseError = "CD_ItoKMCPhotoReactionImplem.H in function ";
39  if (m_efficiency < 0.0) {
40  const std::string derivError = "'ItoKMCPhotoReaction::define' - efficiency must be >= 0.0";
41 
42  MayDay::Error((baseError + derivError).c_str());
43  }
44 }
45 
46 inline const size_t&
48 {
49  return m_source;
50 }
51 
52 inline const std::list<size_t>&
54 {
55  return m_targets;
56 }
57 
58 inline const Real&
60 {
61  return m_efficiency;
62 }
63 
64 #include <CD_NamespaceFooter.H>
65 
66 #endif
Declaration of a class for holding photoionization reaction types in ito_plasma physics.
const Real & getEfficiency() const noexcept
Get reaction efficiency.
Definition: CD_ItoKMCPhotoReactionImplem.H:59
void define(const size_t a_source, const std::list< size_t > a_targets, const Real a_efficiency=1.0) noexcept
Define function.
Definition: CD_ItoKMCPhotoReactionImplem.H:32
const size_t & getSourcePhoton() const noexcept
Get the photon source.
Definition: CD_ItoKMCPhotoReactionImplem.H:47
virtual ~ItoKMCPhotoReaction() noexcept
Destructor.
Definition: CD_ItoKMCPhotoReactionImplem.H:28
size_t m_source
Source photon index.
Definition: CD_ItoKMCPhotoReaction.H:86
std::list< size_t > m_targets
Plasma product indices.
Definition: CD_ItoKMCPhotoReaction.H:91
Real m_efficiency
Reaction efficiency.
Definition: CD_ItoKMCPhotoReaction.H:96
const std::list< size_t > & getTargetSpecies() const noexcept
Get the photon target products.
Definition: CD_ItoKMCPhotoReactionImplem.H:53
ItoKMCPhotoReaction()=default
Allowed, but you need to call the define function afterwards.