chombo-discharge
CD_Photon.H
Go to the documentation of this file.
1 /* chombo-discharge
2  * Copyright © 2022 SINTEF Energy Research.
3  * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
4  */
5 
12 #ifndef CD_Photon_H
13 #define CD_Photon_H
14 
15 // Std includes
16 #include <string>
17 #include <typeinfo>
18 #include <cstdio>
19 #include <cmath>
20 
21 // Our includes
22 #include <CD_GenericParticle.H>
23 #include <CD_NamespaceHeader.H>
24 
28 class Photon : public GenericParticle<2, 1>
29 {
30 public:
34  inline Photon();
35 
43  inline Photon(const RealVect& a_position, const RealVect& a_velocity, const Real& a_kappa, const Real a_weight = 1.0);
44 
48  inline virtual ~Photon();
49 
57  inline void
58  define(const RealVect& a_position, const RealVect& a_velocity, const Real& a_kappa, const Real a_weight = 1.0);
59 
63  inline Real&
64  weight();
65 
69  inline const Real&
70  weight() const;
71 
75  inline Real&
76  kappa();
77 
81  inline const Real&
82  kappa() const;
83 
87  inline RealVect&
88  velocity();
89 
93  inline const RealVect&
94  velocity() const;
95 };
96 
97 #include <CD_NamespaceFooter.H>
98 
99 #include <CD_PhotonImplem.H>
100 
101 #endif
Declaration of a generic particle class.
Implementation of CD_Photon.H.
A generic particle class, holding the position and a specified number of real and vector values.
Definition: CD_GenericParticle.H:33
Particle class for usage with Monte Carlo radiative transfer.
Definition: CD_Photon.H:29
RealVect & velocity()
Get photon velocity.
Definition: CD_PhotonImplem.H:64
void define(const RealVect &a_position, const RealVect &a_velocity, const Real &a_kappa, const Real a_weight=1.0)
Define function. Sets all parameters.
Definition: CD_PhotonImplem.H:31
Photon()
Default constructor. Must subsequently set all parameters.
Definition: CD_PhotonImplem.H:19
Real & weight()
Get photon weight.
Definition: CD_PhotonImplem.H:40
virtual ~Photon()
Destructor (does nothing)
Definition: CD_PhotonImplem.H:22
Real & kappa()
Get photon absorption length.
Definition: CD_PhotonImplem.H:52