Cloudy
Spectral Synthesis Code for Astrophysics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
atmdat_gaunt.h
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2023 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 
4 #ifndef ATMDAT_GAUNT_H
5 #define ATMDAT_GAUNT_H
6 
7 #include "container_classes.h"
8 #include "vectorize.h"
9 
10 struct t_gff
11 {
12  double Te_used;
13  long nflux_used;
15  t_gff() : Te_used(-1.), nflux_used(0) {}
16 };
17 
19 {
20  double Te_used;
21  long nlo;
22  long nhi;
23  double brems_sum;
24  t_brems_sum() : Te_used(-1.), nlo(0), nhi(0), brems_sum(0.) {}
25 };
26 
28 {
29  double Te_used;
30  long nhi;
31  vector<double> brems_vec;
32  t_brems_vec() : Te_used(-1.), nhi(0) {}
33 };
34 
36 {
37  double den_Hm;
38  double den_Hp;
39  double den_Hep;
40  double den_Hepp;
41  // this will exclude hydrogen and helium
42  double den_ion[LIMELM+1];
43 };
44 
45 class t_gaunt : public Singleton<t_gaunt>
46 {
47  friend class Singleton<t_gaunt>;
48 
49  size_t p_np_gam2;
50  size_t p_np_u;
51 
52  double p_lg_gam2_min;
53  double p_lg_gam2_max;
54  double p_lg_u_min;
55  double p_lg_u_max;
56  double p_step;
57 
58  vector<double> p_lg_gam2;
59  vector<double> p_lg_u;
62 
68 
69  void p_read_table(const char* fnam, long nelem);
70  void p_gauntff_vec_sub(long Z, double Te, const double anulog10[], long nmin, long nmax);
71  void p_gauntff_vec(long Z, double Te, const double anulog10[], long nflux);
72  void p_setup_brems(long ion, double Te);
73 protected:
74  t_gaunt() {}
75 public:
76  double gauntff(long Z, double Te, double anu);
77  double brems_cool(long ion, double Te);
78  void brems_rt(long ion, double Te, double abun, vector<double>& arr);
79  void brems_opac(long ion, double Te, double abun, vector<double>& arr);
80  void brems_sum_ions(t_brems_den& sum) const;
81 };
82 
83 #endif
vector_avx< realnum > p_vexp_arg
Definition: atmdat_gaunt.h:61
double brems_cool(long ion, double Te)
Definition: atmdat_gaunt.cpp:312
Definition: cddefines.h:213
size_t p_np_gam2
Definition: atmdat_gaunt.h:49
t_brems_vec p_cache_vec[LIMELM+1]
Definition: atmdat_gaunt.h:66
void p_gauntff_vec(long Z, double Te, const double anulog10[], long nflux)
Definition: atmdat_gaunt.cpp:166
void brems_opac(long ion, double Te, double abun, vector< double > &arr)
Definition: atmdat_gaunt.cpp:394
double den_Hepp
Definition: atmdat_gaunt.h:40
t_brems_sum()
Definition: atmdat_gaunt.h:24
double p_lg_gam2_max
Definition: atmdat_gaunt.h:53
double den_Hep
Definition: atmdat_gaunt.h:39
long nflux_used
Definition: atmdat_gaunt.h:13
size_t p_np_u
Definition: atmdat_gaunt.h:50
double brems_sum
Definition: atmdat_gaunt.h:23
t_brems_vec p_hminus_vec
Definition: atmdat_gaunt.h:67
typename std::vector< T, allocator_avx< T >> vector_avx
Definition: vectorize.h:331
void p_setup_brems(long ion, double Te)
Definition: atmdat_gaunt.cpp:261
double Te_used
Definition: atmdat_gaunt.h:29
long nlo
Definition: atmdat_gaunt.h:21
double p_step
Definition: atmdat_gaunt.h:56
double Te_used
Definition: atmdat_gaunt.h:20
void p_read_table(const char *fnam, long nelem)
Definition: atmdat_gaunt.cpp:21
t_brems_vec()
Definition: atmdat_gaunt.h:32
double den_ion[LIMELM+1]
Definition: atmdat_gaunt.h:42
vector< double > brems_vec
Definition: atmdat_gaunt.h:31
double p_lg_u_min
Definition: atmdat_gaunt.h:54
double gauntff(long Z, double Te, double anu)
Definition: atmdat_gaunt.cpp:135
Definition: atmdat_gaunt.h:45
double p_lg_gam2_min
Definition: atmdat_gaunt.h:52
t_brems_sum p_cache[LIMELM+1]
Definition: atmdat_gaunt.h:64
vector< double > p_lg_u
Definition: atmdat_gaunt.h:59
long nhi
Definition: atmdat_gaunt.h:22
double den_Hm
Definition: atmdat_gaunt.h:37
const int LIMELM
Definition: cddefines.h:318
void p_gauntff_vec_sub(long Z, double Te, const double anulog10[], long nmin, long nmax)
Definition: atmdat_gaunt.cpp:194
double p_lg_u_max
Definition: atmdat_gaunt.h:55
Definition: atmdat_gaunt.h:18
double Te_used
Definition: atmdat_gaunt.h:12
t_gff p_gff_ion[LIMELM+1]
Definition: atmdat_gaunt.h:63
multi_arr< double, 4 > p_gff
Definition: atmdat_gaunt.h:60
long nhi
Definition: atmdat_gaunt.h:30
vector< double > p_lg_gam2
Definition: atmdat_gaunt.h:58
t_gaunt()
Definition: atmdat_gaunt.h:74
vector_avx< realnum > gff
Definition: atmdat_gaunt.h:14
void brems_sum_ions(t_brems_den &sum) const
Definition: atmdat_gaunt.cpp:418
Definition: atmdat_gaunt.h:10
Definition: atmdat_gaunt.h:27
void brems_rt(long ion, double Te, double abun, vector< double > &arr)
Definition: atmdat_gaunt.cpp:366
t_gff()
Definition: atmdat_gaunt.h:15
Definition: atmdat_gaunt.h:35
double den_Hp
Definition: atmdat_gaunt.h:38
t_brems_sum p_hminus
Definition: atmdat_gaunt.h:65