cloudy  trunk
 All Data Structures 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-2022 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;
14  vector< realnum, allocator_avx<realnum> > gff;
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;
61  vector< realnum, allocator_avx<realnum> > p_vexp_arg;
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, double arr[]);
80  void brems_sum_ions(t_brems_den& sum) const;
81 };
82 
84 void dgaunt_check(double);
85 
86 #endif
double brems_cool(long ion, double Te)
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)
double den_Hepp
Definition: atmdat_gaunt.h:40
double p_lg_gam2_max
Definition: atmdat_gaunt.h:53
double den_Hep
Definition: atmdat_gaunt.h:39
void dgaunt_check(double Z)
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
void p_setup_brems(long ion, double Te)
double Te_used
Definition: atmdat_gaunt.h:29
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)
vector< realnum, allocator_avx< realnum > > gff
Definition: atmdat_gaunt.h:14
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)
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
vector< realnum, allocator_avx< realnum > > p_vexp_arg
Definition: atmdat_gaunt.h:61
double den_Hm
Definition: atmdat_gaunt.h:37
const int LIMELM
Definition: cddefines.h:308
void p_gauntff_vec_sub(long Z, double Te, const double anulog10[], long nmin, long nmax)
double p_lg_u_max
Definition: atmdat_gaunt.h:55
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
vector< double > p_lg_gam2
Definition: atmdat_gaunt.h:58
void brems_sum_ions(t_brems_den &sum) const
void brems_opac(long ion, double Te, double abun, double arr[])
void brems_rt(long ion, double Te, double abun, vector< double > &arr)
double den_Hp
Definition: atmdat_gaunt.h:38
t_brems_sum p_hminus
Definition: atmdat_gaunt.h:65