-
Notifications
You must be signed in to change notification settings - Fork 17
/
atmos.h
93 lines (64 loc) · 2.81 KB
/
atmos.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/* ------- file: -------------------------- atmos.h -----------------
Version: rh2.0
Author: Han Uitenbroek ([email protected])
Last modified: Fri Jul 8 15:36:04 2011 --
-------------------------- ----------RH-- */
#ifndef __ATMOS_H__
#define __ATMOS_H__
#include "atom.h"
/* --- Define structure to hold geometry-independent
atmospheric quantities. -- -------------- */
#define ATMOS_ID_WIDTH 80
/* --- Maximum values of number of angles per octant in azimuth and
inclination in case of Gauss-Legendre quadrature in inclination.
-- -------------- */
#define NMAXINCLINATION 9
#define NMAXAZIMUTH 5
#define MOLECULAR_CONCENTRATION_FILE "molecules.out"
/* --- Angle set identifications. Most are Carlsson type -- --------- */
enum angleset {SET_VERTICAL, SET_GL, SET_A2, SET_A4, SET_A6, SET_A8,
SET_B4, SET_B6, SET_B8, NO_SET};
typedef struct {
bool_t hasline;
bool_t ispolarized;
} flags;
typedef struct {
enum angleset set;
int Ninclination, Nazimuth;
} AngleSet;
typedef struct {
char ID[ATMOS_ID_WIDTH];
bool_t moving, H_LTE, Stokes, hydrostatic;
int Ndim, *N, Nrays, Nelem, Natom, Nmolecule, Nrlk, Npf,
NHydr, fd_background, NPRDactive,Nactiveatom, Nactivemol;
long Nspace, *backgrrecno;
double *T, *ne, *vturb, totalAbund, avgMolWght, wght_per_H, gravity,
vmicro_char, vmacro_tresh, lambda_ref, *wmu, *Tpf,
*nHtot, **nH, *nHmin, *B, *gamma_B, *chi_B, B_char,
**cos_gamma, **cos_2chi, **sin_2chi, **chi_b, **eta_b, **sca_b;
AngleSet angleSet;
Element *elements;
Atom *H, *atoms, **activeatoms;
Molecule *H2, *OH, *CH, *molecules, **activemols;
RLK_Line *rlk_lines;
FILE *fp_atmos;
flags *backgrflags;
} Atmosphere;
/* --- Associated function prototypes -- -------------- */
void freeAtmos(Atmosphere *atmos);
void readAbundance(Atmosphere *atmos);
void writeAtmos(Atmosphere *atmos);
void Solve_ne(double *ne, bool_t fromscratch);
void initAngleSet(AngleSet *angleSet);
/* --- Background opacities due to various lines -- -------------- */
flags passive_bb(double lambda, int nspect, int mu, bool_t to_obs,
double *chi, double *eta, double *chip);
flags rlk_opacity(double lambda, int nspect, int mu, bool_t to_obs,
double *chi, double *eta, double *scatt, double *chip);
flags MolecularOpacity(double lambda, int nspect, int mu, bool_t to_obs,
double *chi, double *eta, double *chip);
/* --- Moleculear concentrations -- -------------- */
void writeMolecules(char *fileName);
void readMolecules(char *fileName);
#endif /* !__ATMOS_H__ */
/* ---------------------------------------- atmos.h ----------------- */