chombo-discharge
CD_CdrSpeciesJSON.H
Go to the documentation of this file.
1 /* chombo-discharge
2  * Copyright © 2022 SINTEF Energy Research.
3  * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
4  */
5 
12 #ifndef CD_CdrSpeciesJSON_H
13 #define CD_CdrSpeciesJSON_H
14 
15 // Std includes
16 #include <list>
17 
18 // Chombo includes
19 #include <RealVect.H>
20 
21 // Our includes
22 #include <CD_CdrSpecies.H>
23 #include <CD_NamespaceHeader.H>
24 
25 namespace Physics {
26  namespace CdrPlasma {
27 
31  class CdrSpeciesJSON : public CdrSpecies
32  {
33  public:
37  using InitFunction = std::function<Real(const RealVect a_pos, const Real a_time)>;
38 
42  CdrSpeciesJSON() = default;
43 
52  CdrSpeciesJSON(const std::string a_name,
53  const int a_Z,
54  const bool a_diffusive,
55  const bool a_mobile,
56  const InitFunction a_initialData);
57 
62  CdrSpeciesJSON(const CdrSpeciesJSON& a_other) = delete;
63 
68  CdrSpeciesJSON(const CdrSpeciesJSON&& a_other) = delete;
69 
75  operator=(const CdrSpeciesJSON& a_other) = delete;
76 
82  operator=(const CdrSpeciesJSON&& a_other) = delete;
83 
87  virtual ~CdrSpeciesJSON();
88 
97  void
98  define(const std::string a_name,
99  const int a_Z,
100  const bool a_diffusive,
101  const bool a_mobile,
102  const InitFunction a_initialData);
103 
109  Real
110  initialData(const RealVect a_pos, const Real a_time) const override final;
111 
112  protected:
117 
122  };
123  } // namespace CdrPlasma
124 } // namespace Physics
125 
126 #include <CD_NamespaceFooter.H>
127 
128 #endif
Declaration of a class that passes information into CdrSolver (e.g., initial conditions).
Abstract class that describes the scalar quantity that is advected in CdrSolver.
Definition: CD_CdrSpecies.H:30
Encapsulation of species settings and initial conditions for CDR species in CdrPlasma.
Definition: CD_CdrSpeciesJSON.H:32
bool m_isDefined
Make sure model has initial data.
Definition: CD_CdrSpeciesJSON.H:116
virtual ~CdrSpeciesJSON()
Destructor.
Definition: CD_CdrSpeciesJSON.cpp:30
std::function< Real(const RealVect a_pos, const Real a_time)> InitFunction
Alias for initial data function.
Definition: CD_CdrSpeciesJSON.H:37
Real initialData(const RealVect a_pos, const Real a_time) const override final
Initial data function.
Definition: CD_CdrSpeciesJSON.cpp:49
CdrSpeciesJSON(const CdrSpeciesJSON &a_other)=delete
Disallowed constructor.
CdrSpeciesJSON()=default
Default constructor. Must subsequently call define.
CdrSpeciesJSON & operator=(const CdrSpeciesJSON &&a_other)=delete
Disallowed move assignment.
void define(const std::string a_name, const int a_Z, const bool a_diffusive, const bool a_mobile, const InitFunction a_initialData)
Define function.
Definition: CD_CdrSpeciesJSON.cpp:34
CdrSpeciesJSON & operator=(const CdrSpeciesJSON &a_other)=delete
Disallowed copy assignment.
CdrSpeciesJSON(const CdrSpeciesJSON &&a_other)=delete
Disallowed move constructor.
InitFunction m_initFunction
Initial data function.
Definition: CD_CdrSpeciesJSON.H:121
Name containing various physics models for running chombo-discharge code.
Definition: CD_AdvectionDiffusion.H:15