Gyselalib++
 
Loading...
Searching...
No Matches
collisioninfo.hpp
1// SPDX-License-Identifier: MIT
2
3#pragma once
4
5#include <paraconf.h>
6
7#include "paraconfpp.hpp"
8#include "species_info.hpp"
9
12{
13 // value of nustar0 = to nustar0_rpeak read in the YAML input file
14 double const m_nustar0;
15
16 // boolean that is equal to true if inter-species collisions are taken into account
17 // read in the YAML input file
18 std::int8_t m_collisions_interspecies;
19
20 // AD coefficient almost equivalent to the collision frequency
21 double m_coeff_AD;
22
23public:
25 using radial_chunk_type = double;
26
31 explicit CollisionInfo(PC_tree_t const& yaml_input_file)
32 : m_nustar0 {PCpp_double(yaml_input_file, ".CollisionsInfo.nustar0_rpeak")}
33 , m_collisions_interspecies {
34 PCpp_bool(yaml_input_file, ".CollisionsInfo.collisions_interspecies")}
35 {
36 // nustar fixed to 1. => normalisation of time is equal to 1./nustar
37 if (m_nustar0 != 1.0) {
38 throw std::invalid_argument("nustar0 must be equal to 1");
39 }
40
49 m_coeff_AD = Kokkos::sqrt(2.);
50 };
51
52 ~CollisionInfo() = default;
53
58 std::int8_t collisions_interspecies() const
59 {
60 return m_collisions_interspecies;
61 }
62
67 double coeff_AD() const
68 {
69 return m_coeff_AD;
70 }
71};
Class to collect information to initialize the collision operator.
Definition collisioninfo.hpp:12
std::int8_t collisions_interspecies() const
A method for accessing the collisions_interspecies member variable of the class.
Definition collisioninfo.hpp:58
double coeff_AD() const
A method for accessing the coeff_AD variable of the class.
Definition collisioninfo.hpp:67
double radial_chunk_type
radial_chunk_type used to treat the 0D case for radial profile
Definition collisioninfo.hpp:25
CollisionInfo(PC_tree_t const &yaml_input_file)
The constructor for the CollisionFrequency class.
Definition collisioninfo.hpp:31