Gyselalib++
 
Loading...
Searching...
No Matches
maxwellianequilibrium.hpp
1// SPDX-License-Identifier: MIT
2
3#pragma once
4
5#include <paraconf.h>
6
7#include "geometry.hpp"
8#include "iequilibrium.hpp"
9#include "paraconfpp.hpp"
10#include "species_info.hpp"
11
14{
15 // mass of all kinetic species
16 host_t<DFieldMemSp> m_mass;
17
18 // equilibrium density of all kinetic species
19 host_t<DFieldMemSp> m_density_eq;
20
21 // equilibrium temperature of all kinetic species
22 host_t<DFieldMemSp> m_temperature_eq;
23
24 // equilibrium mean velocity of all kinetic species
25 host_t<DFieldMemSp> m_mean_velocity_eq;
26
27private:
28 // magnetic field
29 double m_magnetic_field;
30
31public:
41 host_t<DFieldMemSp> mass,
42 host_t<DFieldMemSp> density_eq,
43 host_t<DFieldMemSp> temperature_eq,
44 host_t<DFieldMemSp> mean_velocity_eq,
45 double magnetic_field);
46
47 ~MaxwellianEquilibrium() override = default;
48
56 IdxRangeSp idx_range_kinsp,
57 PC_tree_t const& yaml_input_file);
58
64 DFieldSpVparMu operator()(DFieldSpVparMu allfequilibrium) const override;
65
66
81 static void compute_maxwellian(
82 DFieldVparMu const fMaxwellian,
83 double const mass,
84 double const density,
85 double const temperature,
86 double const mean_velocity,
87 double const magnetic_field);
88
93 host_t<DConstFieldSp> mass() const
94 {
95 return get_const_field(m_mass);
96 }
97
102 host_t<DConstFieldSp> density_eq() const
103 {
104 return get_const_field(m_density_eq);
105 }
106
111 host_t<DConstFieldSp> temperature_eq() const
112 {
113 return get_const_field(m_temperature_eq);
114 }
115
120 host_t<DConstFieldSp> mean_velocity_eq() const
121 {
122 return get_const_field(m_mean_velocity_eq);
123 }
124};
An abstract class for initializing a distribution function in (species,vpar,mu).
Definition iequilibrium.hpp:11
Equilibrium operator as Maxwellian. This initializes all species.
Definition maxwellianequilibrium.hpp:14
DFieldSpVparMu operator()(DFieldSpVparMu allfequilibrium) const override
Initializes allfequilibrium as a Maxwellian.
static void compute_maxwellian(DFieldVparMu const fMaxwellian, double const mass, double const density, double const temperature, double const mean_velocity, double const magnetic_field)
Compute a Maxwellian distribution function.
host_t< DConstFieldSp > mean_velocity_eq() const
A method for accessing the m_mean_velocity_eq member variable of the class.
Definition maxwellianequilibrium.hpp:120
MaxwellianEquilibrium(host_t< DFieldMemSp > mass, host_t< DFieldMemSp > density_eq, host_t< DFieldMemSp > temperature_eq, host_t< DFieldMemSp > mean_velocity_eq, double magnetic_field)
The constructor for the MaxwellianEquilibrium class.
host_t< DConstFieldSp > density_eq() const
A method for accessing the m_density_eq member variable of the class.
Definition maxwellianequilibrium.hpp:102
host_t< DConstFieldSp > temperature_eq() const
A method for accessing the m_temperature_eq member variable of the class.
Definition maxwellianequilibrium.hpp:111
host_t< DConstFieldSp > mass() const
A method for accessing the m_mass member variable of the class.
Definition maxwellianequilibrium.hpp:93
static MaxwellianEquilibrium init_from_input(IdxRangeSp idx_range_kinsp, PC_tree_t const &yaml_input_file)
Read the density, temperature and mean velocity required to initialize the Maxwellian in a YAML input...