chombo-discharge
Loading...
Searching...
No Matches
CD_ItoKMCBackgroundSpecies.H
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021-2026 SINTEF Energy Research
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
13#ifndef CD_ITOKMCBACKGROUNDSPECIES_H
14#define CD_ITOKMCBACKGROUNDSPECIES_H
15
16// Std includes
17#include <string>
18
19// Chombo includes
20#include <RealVect.H>
21
22// Our includes
23#include <CD_NamespaceHeader.H>
24
25namespace Physics {
26namespace ItoKMC {
27
32{
33public:
37 using MolarFraction = std::function<Real(const RealVect a_pos)>;
38
42 ItoKMCBackgroundSpecies() noexcept;
43
49 ItoKMCBackgroundSpecies(const std::string& a_name, const MolarFraction& a_molarFraction) noexcept;
50
54 virtual ~ItoKMCBackgroundSpecies() noexcept;
55
61 void
62 define(const std::string& a_name, const MolarFraction& a_molarFraction) noexcept;
63
69 Real
70 molarFraction(const RealVect& a_pos) const noexcept;
71
76 std::string
77 getName() const noexcept;
78
79protected:
84
88 std::string m_name;
89
94};
95} // namespace ItoKMC
96} // namespace Physics
97
98#include <CD_NamespaceFooter.H>
99
100#endif
Encapsulation of a background species for usage with ItoKMCJSON.
Definition CD_ItoKMCBackgroundSpecies.H:32
Real molarFraction(const RealVect &a_pos) const noexcept
Get molar fraction at a physical position.
Definition CD_ItoKMCBackgroundSpecies.cpp:39
std::string getName() const noexcept
Get the species name.
Definition CD_ItoKMCBackgroundSpecies.cpp:47
void define(const std::string &a_name, const MolarFraction &a_molarFraction) noexcept
Define function. Puts object in usable state.
Definition CD_ItoKMCBackgroundSpecies.cpp:31
ItoKMCBackgroundSpecies() noexcept
Default constructor. Must subsequently call the define function.
Definition CD_ItoKMCBackgroundSpecies.cpp:19
MolarFraction m_molarFraction
Initial data function.
Definition CD_ItoKMCBackgroundSpecies.H:93
std::string m_name
Neutral species name.
Definition CD_ItoKMCBackgroundSpecies.H:88
std::function< Real(const RealVect a_pos)> MolarFraction
Alias for position-dependent molar fraction.
Definition CD_ItoKMCBackgroundSpecies.H:37
bool m_isDefined
Make sure model has initial data.
Definition CD_ItoKMCBackgroundSpecies.H:83
Namespace containing physics models for use with chombo-discharge.
Definition CD_AdvectionDiffusion.H:16