chombo-discharge
CD_CdrSpecies.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_CdrSpecies_H
13 #define CD_CdrSpecies_H
14 
15 // Chombo includes
16 #include <List.H>
17 #include <RealVect.H>
18 
19 // Our includes
20 #include <CD_PointParticle.H>
21 #include <CD_NamespaceHeader.H>
22 
30 {
31 public:
35  CdrSpecies();
36 
44  CdrSpecies(const std::string a_name, const int a_chargeNumber, const bool a_isMobile, const bool a_isDiffusive);
45 
49  virtual ~CdrSpecies();
50 
56  virtual Real
57  initialData(const RealVect a_pos, const Real a_time) const = 0;
58 
62  virtual std::string
63  getName() const;
64 
68  virtual int
69  getChargeNumber() const;
70 
74  virtual bool
75  isDiffusive() const;
76 
80  virtual bool
81  isMobile() const;
82 
86  virtual const List<PointParticle>&
87  getInitialParticles() const;
88 
92  List<PointParticle>&
94 
95 protected:
99  std::string m_name;
100 
105 
110 
115 
119  List<PointParticle> m_initialParticles;
120 };
121 
122 #include <CD_NamespaceFooter.H>
123 
124 #endif
Declaration of a computational point particle.
Abstract class that describes the scalar quantity that is advected in CdrSolver.
Definition: CD_CdrSpecies.H:30
virtual ~CdrSpecies()
Destructor (does nothing)
Definition: CD_CdrSpecies.cpp:47
virtual bool isMobile() const
Mobile species or not.
Definition: CD_CdrSpecies.cpp:83
bool m_isMobile
Mobile CdrSpecies or not.
Definition: CD_CdrSpecies.H:114
virtual Real initialData(const RealVect a_pos, const Real a_time) const =0
Initial data.
Definition: CD_CdrSpecies.cpp:51
virtual std::string getName() const
Return name.
Definition: CD_CdrSpecies.cpp:59
virtual int getChargeNumber() const
Return charge.
Definition: CD_CdrSpecies.cpp:67
CdrSpecies()
Weak constructor.
Definition: CD_CdrSpecies.cpp:19
List< PointParticle > m_initialParticles
Initial particles.
Definition: CD_CdrSpecies.H:119
bool m_isDiffusive
Diffusive CdrSpecies or not.
Definition: CD_CdrSpecies.H:109
int m_chargeNumber
Charge.
Definition: CD_CdrSpecies.H:104
std::string m_name
Cdr_Species name.
Definition: CD_CdrSpecies.H:99
virtual bool isDiffusive() const
Diffusive species or not.
Definition: CD_CdrSpecies.cpp:75
virtual const List< PointParticle > & getInitialParticles() const
Get initial particles.
Definition: CD_CdrSpecies.cpp:91