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 // equilibrium density of all kinetic species
16 host_t<DFieldMemSp> m_density_eq;
17
18 // equilibrium temperature of all kinetic species
19 host_t<DFieldMemSp> m_temperature_eq;
20
21 // equilibrium mean velocity of all kinetic species
22 host_t<DFieldMemSp> m_mean_velocity_eq;
23
24public:
32 host_t<DFieldMemSp> density_eq,
33 host_t<DFieldMemSp> temperature_eq,
34 host_t<DFieldMemSp> mean_velocity_eq);
35
36 ~MaxwellianEquilibrium() override = default;
37
45 IdxRangeSp idx_range_kinsp,
46 PC_tree_t const& yaml_input_file);
47
53 DFieldSpVxVy operator()(DFieldSpVxVy allfequilibrium) const override;
54
55
67 static void compute_maxwellian(
68 DFieldVxVy const fMaxwellian,
69 double const density,
70 double const temperature,
71 double const mean_velocity);
72
77 host_t<ConstFieldSp<double>> density_eq() const
78 {
79 return get_const_field(m_density_eq);
80 }
81
86 host_t<ConstFieldSp<double>> temperature_eq() const
87 {
88 return get_const_field(m_temperature_eq);
89 }
90
95 host_t<ConstFieldSp<double>> mean_velocity_eq() const
96 {
97 return get_const_field(m_mean_velocity_eq);
98 }
99};
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
MaxwellianEquilibrium(host_t< DFieldMemSp > density_eq, host_t< DFieldMemSp > temperature_eq, host_t< DFieldMemSp > mean_velocity_eq)
The constructor for the MaxwellianEquilibrium class.
host_t< ConstFieldSp< double > > density_eq() const
A method for accessing the m_density_eq member variable of the class.
Definition maxwellianequilibrium.hpp:77
host_t< ConstFieldSp< double > > mean_velocity_eq() const
A method for accessing the m_mean_velocity_eq member variable of the class.
Definition maxwellianequilibrium.hpp:95
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
host_t< DConstFieldSp > density_eq() const
A method for accessing the m_density_eq member variable of the class.
Definition maxwellianequilibrium.hpp:102
DFieldSpVxVy operator()(DFieldSpVxVy allfequilibrium) const override
Initializes allfequilibrium as a Maxwellian.
static void compute_maxwellian(DFieldVxVy const fMaxwellian, double const density, double const temperature, double const mean_velocity)
Compute a Maxwellian distribution function.
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< ConstFieldSp< double > > temperature_eq() const
A method for accessing the m_temperature_eq member variable of the class.
Definition maxwellianequilibrium.hpp:86
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...