chombo-discharge
CD_PointParticle.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_PointParticle_H
13 #define CD_PointParticle_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 PointParticle : public GenericParticle<1, 0>
29 {
30 public:
34  inline PointParticle();
35 
41  inline PointParticle(const RealVect a_position, const Real a_weight);
42 
46  inline virtual ~PointParticle();
47 
53  inline void
54  define(const RealVect a_position, const Real a_weight);
55 
59  inline Real&
60  weight();
61 
65  inline const Real&
66  weight() const;
67 };
68 
69 #include <CD_NamespaceFooter.H>
70 
71 #include <CD_PointParticleImplem.H>
72 
73 #endif
Declaration of a generic particle class.
Implementation of CD_PointParticle.H.
A generic particle class, holding the position and a specified number of real and vector values.
Definition: CD_GenericParticle.H:33
A particle class that only has a position and a weight.
Definition: CD_PointParticle.H:29
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