chombo-discharge
CD_SimpleItoParticleImplem.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 #ifndef CD_SimpleItoParticleParticleImplem_H
13 #define CD_SimpleItoParticleParticleImplem_H
14 
15 // Our includes
16 #include <CD_SimpleItoParticle.H>
17 #include <CD_NamespaceHeader.H>
18 
20 {}
21 
22 inline SimpleItoParticle::SimpleItoParticle(const Real a_weight, const RealVect a_position, const Real a_energy)
23 {
24  this->define(a_weight, a_position, a_energy);
25 }
26 
28 {}
29 
30 inline void
31 SimpleItoParticle::define(const Real a_weight, const RealVect a_position, const Real a_energy)
32 {
33  this->weight() = a_weight;
34  this->position() = a_position;
35  this->energy() = a_energy;
36 }
37 
38 inline Real&
40 {
41  return this->real<0>();
42 }
43 
44 inline const Real&
46 {
47  return this->real<0>();
48 }
49 
50 inline Real&
52 {
53  return this->real<1>();
54 }
55 
56 inline const Real&
58 {
59  return this->real<1>();
60 }
61 
62 #include <CD_NamespaceFooter.H>
63 
64 #endif
RealVect & position()
Get the particle position.
Definition: CD_GenericParticleImplem.H:47
Real & energy()
Get energy.
Definition: CD_SimpleItoParticleImplem.H:51
Real & weight()
Get weight.
Definition: CD_SimpleItoParticleImplem.H:39
SimpleItoParticle()
Default constructor. Should subsequently set weight/position/energy.
Definition: CD_SimpleItoParticleImplem.H:19
void define(const Real a_weight, const RealVect a_position, const Real a_energy)
Define function. Sets weight, position, and energy.
Definition: CD_SimpleItoParticleImplem.H:31
virtual ~SimpleItoParticle()
Destructor (does nothing)
Definition: CD_SimpleItoParticleImplem.H:27