chombo-discharge
CD_PointParticleImplem.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_PointParticleImplem_H
13 #define CD_PointParticleImplem_H
14 
15 // Our includes
16 #include <CD_PointParticle.H>
17 #include <CD_NamespaceHeader.H>
18 
20 {}
21 
22 inline PointParticle::PointParticle(const RealVect a_position, const Real a_weight)
23 {
24  this->define(a_position, a_weight);
25 }
26 
28 {}
29 
30 inline void
31 PointParticle::define(const RealVect a_position, const Real a_weight)
32 {
33  this->position() = a_position;
34  this->weight() = a_weight;
35 }
36 
37 inline Real&
39 {
40  return this->real<0>();
41 }
42 
43 inline const Real&
45 {
46  return this->real<0>();
47 }
48 
49 #include <CD_NamespaceFooter.H>
50 
51 #endif
Declaration of a computational point particle.
RealVect & position()
Get the particle position.
Definition: CD_GenericParticleImplem.H:47
PointParticle()
Default constructor. Sets weight and position to zero.
Definition: CD_PointParticleImplem.H:19
virtual ~PointParticle()
Dtor - does nothing.
Definition: CD_PointParticleImplem.H:27
void define(const RealVect a_position, const Real a_weight)
Full define function.
Definition: CD_PointParticleImplem.H:31
Real & weight()
Get weight.
Definition: CD_PointParticleImplem.H:38