Cloudy
Spectral Synthesis Code for Astrophysics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
prt.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 PRT_H_
5 #define PRT_H_
6 
7 #include "module.h"
8 #include "container_classes.h"
9 #include "lines.h"
10 
11 class TransitionProxy;
12 
13 //* Maximum number of columns in output print
14 const long NCOLMAX=132;
15 
17 void PrtZone(void);
18 
20 void PrtComment(void);
21 
23 void PrtFinal(void);
24 
25 
27 void SetPrintLineCol ();
28 
33 void prt_wl(
34  FILE *io ,
36 
41 void sprt_wl(
42  string& chString,
43  realnum wl );
44 
51 void prt_line_err( FILE *ioOUT, const string& label, realnum wvlng );
52 void prt_line_err( FILE *ioOUT, const LineID& lineid );
53 
54 /* prt_line_inlist print line suitable for output list, label not enclosed in quotation marks
55 \param *ioOUT output file handle
56 \param *label line label
57 \param wvlng line wavelength
58  */
59 void prt_line_inlist ( FILE *ioOUT, const char *label, realnum wvlng );
60 
63 void PrtHeader(void);
64 
72 void prt_LineLabels(
73  FILE * io,
74  bool lgPrintAll,
75  bool lgPrintIndex
76  );
77 
79 void prtmet(void);
80 
87 void PrtMeanIon( char chType ,
88  bool lgDensity,
89  FILE *);
90 
94 double PrtLineSum(void);
95 
98 void PrtLinePres(FILE *ioPRESSURE);
99 
104 void PrtColumns(
105  FILE *ioMEAN );
106 
108 void CloudyPrintReference();
109 
112 
115 void PrtAllTau(void);
116 
117 class t_prt_matrix : public module {
118 public:
121  string species;
123  vector<long> speciesLevelList;
124  bool lgLevelsResolved = false;
125 
126  void zero();
127  void comment(t_warnings&) {}
128 
129  const char *chName() const
130  {
131  return "prt_matrix";
132  }
133 
134  void setSpecies( const string &sspec );
135  void resolveLevels();
136  void prtRates( const long numLevels,
137  const multi_arr<double,2,C_TYPE> &matrix,
138  valarray<double> &b );
139 };
140 
142 struct t_blend {
143  string chLabel;
145  bool lgQuiet;
146  bool lgIgnore;
147  vector<LineID> component;
148  t_blend() : chLabel("Blnd"), wave(0_r), lgQuiet(false), lgIgnore(false) {}
149 };
150 
151 struct t_prt {
152 
155 
159 
163 
167 
171 
175 
182 
186 
188  bool lgPrnAges;
189 
193 
195  bool lgPrtTau;
196 
200 
204 
207 
212  bool lgPrnPump,
213  lgPrnHeat,
214  lgPrnColl,
215  lgPrnInwd;
216 
220 
221  /* flag set with print continuum index command, to identify all lines
222  * that lie within a continuum cell */
224  /* these are lower and upper limits to the energy range in Rydbergs.
225  * they are the first and second number on the command line, lower and
226  * upper bounds of the code are used if not specified */
229 
235 
237  bool lgPrtBN;
238 
241 
244 
249 
252 
254  long int nstart;
255 
258 
261 
263 
269  bool lgFaintOn;
270 
273  bool lgFntSet;
274 
280  long int nPrnLineCell;
281 
285 
289 
293 
299 
300  /* Generate output in HTML format */
302 
305  powion,
306  xpow,
307  pbal,
308  q,
309  qgam,
310  pradio,
311  fx1ryd;
312  long int ipeak;
314 
315  long int nzdump;
316 
319 
321  vector<t_blend> blend;
322 
325 
327  {
328  // make sure this has the correct value before main() starts
329  // this is needed by check_data() and possibly others
330  lgPrintTime = true;
331  // this needs to be set before the code starts reading the input script
332  lgIncludeBlends = true;
333  }
334 };
335 extern t_prt prt;
336 
337 
338 
339 struct t_line_col : public module
340 {
341  const char* chName() const
342  {
343  return "prt_linecol";
344  }
345  void zero();
346  void comment(t_warnings&) {}
347 
350 
353 
357 
361 
364 
366  string col_gap;
367 };
368 extern struct t_line_col prt_linecol;
369 
370 #endif /* PRT_H_ */
bool lgQuiet
Definition: prt.h:145
Definition: warnings.h:11
realnum wlSort2
Definition: prt.h:174
void PrtFinal(void)
Definition: prt_final.cpp:552
realnum q
Definition: prt.h:304
bool lgPrtStart
Definition: prt.h:251
bool lgPrtTau
Definition: prt.h:195
realnum lgPrtContIndices_hi_E
Definition: prt.h:227
const long NCOLMAX
Definition: prt.h:14
void prt_LineLabels(FILE *io, bool lgPrintAll, bool lgPrintIndex)
Definition: prt.cpp:113
bool lgPrtMaser
Definition: prt.h:192
string speciesLevels
Definition: prt.h:122
bool lgPrnHeat
Definition: prt.h:212
bool lgPrintLineCumulative
Definition: prt.h:292
Definition: prt.h:339
long int nPrnLineCell
Definition: prt.h:280
bool lgIncludeBlends
Definition: prt.h:324
string relint_outrange
Definition: prt.h:363
int col_gap_len
Definition: prt.h:360
bool lgDiffuseInward
Definition: prt.h:233
bool lgPrintLineAirWavelengths
Definition: prt.h:298
string species
Definition: prt.h:121
Definition: lines.h:14
bool lgFntSet
Definition: prt.h:273
realnum pradio
Definition: prt.h:304
void PrtMeanIon(char chType, bool lgDensity, FILE *)
Definition: prt_meanion.cpp:11
bool lgPrtCitations
Definition: prt.h:318
realnum wlSort1
Definition: prt.h:174
void CloudyPrintReference()
Definition: service.cpp:1807
bool lgLevelsResolved
Definition: prt.h:124
void PrtLinePres(FILE *ioPRESSURE)
Definition: prt_linepres.cpp:16
void PrtAllTau(void)
Definition: prt_alltau.cpp:15
bool lgSortLineIntensity
Definition: prt.h:170
realnum fx1ryd
Definition: prt.h:304
t_blend()
Definition: prt.h:148
void comment(t_warnings &)
Definition: prt.h:127
bool lgSourceReflected
Definition: prt.h:231
bool lgPrintBlockIntrinsic
Definition: prt.h:158
const char * chName() const
Definition: prt.h:341
t_prt()
Definition: prt.h:326
vector< t_blend > blend
Definition: prt.h:321
void prtmet(void)
Definition: prt_met.cpp:19
bool lgPrtArry[LIMELM]
Definition: prt.h:260
void sprt_wl(string &chString, realnum wl)
Definition: prt.cpp:57
bool lgPrnIsoCollapsed
Definition: prt.h:219
void zero()
Definition: prt.cpp:196
bool lgPrintHeating
Definition: prt.h:257
realnum TooFaint
Definition: prt.h:268
bool lgPrnLineCell
Definition: prt.h:277
void prt_wl(FILE *io, realnum wavelength)
Definition: prt.cpp:45
realnum pbal
Definition: prt.h:304
void PrtComment(void)
Definition: prt_comment.cpp:66
bool lgDiffuseOutward
Definition: prt.h:234
bool lgPrtLastIt
Definition: prt.h:240
bool lgPrtContIndices
Definition: prt.h:223
bool lgSurfaceBrightness
Definition: prt.h:203
bool lgPrtBN
Definition: prt.h:237
bool lgOnlyZone
Definition: prt.h:246
bool lgPrintBlockEmergent
Definition: prt.h:162
float realnum
Definition: cddefines.h:127
long int nstart
Definition: prt.h:254
int relint_len
Definition: prt.h:352
realnum GammaLumin
Definition: prt.h:313
bool lgOnlyHead
Definition: prt.h:248
bool lgFaintOn
Definition: prt.h:269
bool lgSurfaceBrightness_SR
Definition: prt.h:203
void resolveLevels()
Definition: prt.cpp:226
void SetPrintLineCol()
Definition: prt.cpp:29
void PrtHeader(void)
Definition: prt_header.cpp:17
bool lgPrintTime
Definition: prt.h:185
vector< long > speciesLevelList
Definition: prt.h:123
void PrtColumns(FILE *ioMEAN)
Definition: prt_columns.cpp:14
bool lgPrtShort
Definition: prt.h:243
vector< LineID > component
Definition: prt.h:147
bool lgPrtLineLog
Definition: prt.h:288
void zero()
Definition: prt.cpp:18
string col_gap
Definition: prt.h:366
bool lgPrintBlock
Definition: prt.h:154
bool lgIgnore
Definition: prt.h:146
realnum PrtTauFnt
Definition: prt.h:206
Definition: prt.h:151
bool lgSortLines
Definition: prt.h:166
struct t_line_col prt_linecol
Definition: prt.cpp:16
realnum xpow
Definition: prt.h:304
void PrtZone(void)
Definition: prt_zone.cpp:34
void comment(t_warnings &)
Definition: prt.h:346
bool lgPrintHTML
Definition: prt.h:301
Definition: prt.h:117
void prt_line_err(FILE *ioOUT, const string &label, realnum wvlng)
Definition: prt.cpp:180
const int LIMELM
Definition: cddefines.h:318
t_prt_matrix matrix
Definition: prt.h:262
const char * chName() const
Definition: prt.h:129
realnum wave
Definition: prt.h:144
void setSpecies(const string &sspec)
Definition: prt.cpp:204
realnum qgam
Definition: prt.h:304
realnum powion
Definition: prt.h:304
static vector< realnum > wavelength
Definition: monitor_results.cpp:79
bool lgPrnAges
Definition: prt.h:188
bool lgPrnPump
Definition: prt.h:212
void DatabasePrintReference()
Definition: service.cpp:1824
long int nzdump
Definition: prt.h:315
bool lgPrintFluxEarth
Definition: prt.h:199
void prt_line_inlist(FILE *ioOUT, const char *label, realnum wvlng)
Definition: prt.cpp:187
bool lgPrintColumns
Definition: prt.h:181
realnum lgPrtContIndices_lo_E
Definition: prt.h:227
bool lgSourceTransmitted
Definition: prt.h:232
int absint_len
Definition: prt.h:349
Definition: transition.h:23
void prtRates(const long numLevels, const multi_arr< double, 2, C_TYPE > &matrix, valarray< double > &b)
Definition: prt.cpp:237
string chLabel
Definition: prt.h:143
double PrtLineSum(void)
Definition: prt_linesum.cpp:50
realnum qx
Definition: prt.h:304
bool lgPrnColl
Definition: prt.h:212
t_prt prt
Definition: prt.cpp:15
Definition: prt.h:142
Definition: module.h:26
bool lgPrnInwd
Definition: prt.h:212
bool lgSortLineWavelength
Definition: prt.h:170
int column_len
Definition: prt.h:356
bool lgPrtLineArray
Definition: prt.h:284
long int ipeak
Definition: prt.h:312