chombo-discharge
CD_ItoPlasmaGodunovParticle.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_ItoPlasmaGodunovParticle_H
13 #define CD_ItoPlasmaGodunovParticle_H
14 
15 // Std includes
16 #include <string>
17 #include <typeinfo>
18 #include <cstdio>
19 #include <cmath>
20 
21 // Chombo includes
22 #include <BinItem.H>
23 
24 // Our includes
25 #include <CD_NamespaceHeader.H>
26 
27 namespace Physics {
28  namespace ItoPlasma {
29 
33  class ItoPlasmaGodunovParticle : public BinItem
34  {
35  public:
40 
44  ItoPlasmaGodunovParticle(const RealVect a_position, const Real a_mass);
45 
49  virtual ~ItoPlasmaGodunovParticle();
50 
54  void
55  define(const RealVect a_position, const Real a_mass);
56 
60  void
61  setMass(const Real a_mass);
62 
66  Real&
67  mass();
68 
72  const Real&
73  mass() const;
74 
78  virtual int
79  size() const;
80 
86  virtual void
87  linearOut(void* buf) const;
88 
93  virtual void
94  linearIn(void* buf);
95 
96  protected:
97  Real m_mass;
98  };
99  } // namespace ItoPlasma
100 } // namespace Physics
101 
102 #include <CD_NamespaceFooter.H>
103 
104 #endif
Physics
Name containing various physics models for running chombo-discharge code.
Definition: CD_AdvectionDiffusion.H:15
Physics::ItoPlasma::ItoPlasmaGodunovParticle::linearIn
virtual void linearIn(void *buf)
Read a linear binary representation of the internal data. Assumes that the buffer has the correct dat...
Definition: CD_ItoPlasmaGodunovParticle.cpp:71
Physics::ItoPlasma::ItoPlasmaGodunovParticle::size
virtual int size() const
Returns the size, in number of bytes, of a flat representation of the data in this object.
Definition: CD_ItoPlasmaGodunovParticle.cpp:54
Physics::ItoPlasma::ItoPlasmaGodunovParticle::mass
Real & mass()
Get mass.
Definition: CD_ItoPlasmaGodunovParticle.cpp:42
Physics::ItoPlasma::ItoPlasmaGodunovParticle::ItoPlasmaGodunovParticle
ItoPlasmaGodunovParticle()
Default constructor.
Definition: CD_ItoPlasmaGodunovParticle.cpp:18
Physics::ItoPlasma::ItoPlasmaGodunovParticle::setMass
void setMass(const Real a_mass)
Set particle mass.
Definition: CD_ItoPlasmaGodunovParticle.cpp:36
Physics::ItoPlasma::ItoPlasmaGodunovParticle::define
void define(const RealVect a_position, const Real a_mass)
For non-default ctor.
Definition: CD_ItoPlasmaGodunovParticle.cpp:29
Physics::ItoPlasma::ItoPlasmaGodunovParticle::linearOut
virtual void linearOut(void *buf) const
Write a linear binary representation of the internal data. Assumes that sufficient memory for the buf...
Definition: CD_ItoPlasmaGodunovParticle.cpp:60
Physics::ItoPlasma::ItoPlasmaGodunovParticle
A particle class for use with Ito diffusion, i.e. drift-diffusion brownian walkers.
Definition: CD_ItoPlasmaGodunovParticle.H:33
Physics::ItoPlasma::ItoPlasmaGodunovParticle::~ItoPlasmaGodunovParticle
virtual ~ItoPlasmaGodunovParticle()
Default dtor.
Definition: CD_ItoPlasmaGodunovParticle.cpp:26