chombo-discharge
CD_NeutralSpeciesJSON.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_NeutralSpeciesJSON_H
13 #define CD_NeutralSpeciesJSON_H
14 
15 // Std includes
16 #include <list>
17 
18 // Chombo includes
19 #include <RealVect.H>
20 
21 // Our includes
22 #include <CD_NamespaceHeader.H>
23 
24 namespace Physics {
25  namespace CdrPlasma {
26 
31  {
32  public:
36  using NumberDensityFunction = std::function<Real(const RealVect a_pos)>;
37 
42 
49  NeutralSpeciesJSON(const std::string a_name, const Real a_molarFraction, const NumberDensityFunction a_function);
50 
54  virtual ~NeutralSpeciesJSON();
55 
62  void
63  define(const std::string a_name, const Real a_molarFraction, const NumberDensityFunction a_function);
64 
69  Real
70  operator()(const RealVect a_pos) const;
71 
76  Real
77  getMolarFraction() const;
78 
83  std::string
84  getName() const;
85 
86  protected:
91 
95  std::string m_name;
96 
101 
106  };
107  } // namespace CdrPlasma
108 } // namespace Physics
109 
110 #include <CD_NamespaceFooter.H>
111 
112 #endif
Encapsulation of species settings and initial conditiosn for use with CdrPlasma. This is for tracked ...
Definition: CD_NeutralSpeciesJSON.H:31
void define(const std::string a_name, const Real a_molarFraction, const NumberDensityFunction a_function)
Full constructor. Calls the define function.
Definition: CD_NeutralSpeciesJSON.cpp:34
std::string getName() const
Get the species name.
Definition: CD_NeutralSpeciesJSON.cpp:44
NeutralSpeciesJSON()
Default constructor. Must subsequently call define.
Definition: CD_NeutralSpeciesJSON.cpp:18
NumberDensityFunction m_function
Initial data function. Set by CdrPlasmaGenericModel.
Definition: CD_NeutralSpeciesJSON.H:105
std::function< Real(const RealVect a_pos)> NumberDensityFunction
Alias for initial data function.
Definition: CD_NeutralSpeciesJSON.H:36
virtual ~NeutralSpeciesJSON()
Destructor.
Definition: CD_NeutralSpeciesJSON.cpp:30
Real m_molarFraction
Molar fraction.
Definition: CD_NeutralSpeciesJSON.H:100
bool m_isDefined
Make sure model has initial data.
Definition: CD_NeutralSpeciesJSON.H:90
std::string m_name
Neutral species name.
Definition: CD_NeutralSpeciesJSON.H:95
Real getMolarFraction() const
Get the molar fraction.
Definition: CD_NeutralSpeciesJSON.cpp:50
Real operator()(const RealVect a_pos) const
Get (number) density at the physical coordinates.
Definition: CD_NeutralSpeciesJSON.cpp:56
Name containing various physics models for running chombo-discharge code.
Definition: CD_AdvectionDiffusion.H:15