Cloudy
Spectral Synthesis Code for Astrophysics
Loading...
Searching...
No Matches
prt.h
Go to the documentation of this file.
1/* This file is part of Cloudy and is copyright (C)1978-2025 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
11class TransitionProxy;
12
13//* Maximum number of columns in output print
14const long NCOLMAX=132;
15
17void PrtZone(void);
18
20void PrtComment(void);
21
23void PrtFinal(void);
24
25
27void SetPrintLineCol ();
28
33void prt_line_err( FILE *ioOUT, const LineID& lineid );
34
35/* prt_line_inlist print line suitable for output list, label not enclosed in quotation marks
36\param *ioOUT output file handle
37\param *label line label
38\param twav line wavelength
39 */
40void prt_line_inlist ( FILE *ioOUT, const char *label, t_wavl twav );
41
44void PrtHeader(void);
45
54 FILE * io,
55 bool lgPrintAll,
56 bool lgPrintIndex
57 );
58
60void prtmet(void);
61
68void PrtMeanIon( char chType ,
69 bool lgDensity,
70 FILE *);
71
75double PrtLineSum(void);
76
79void PrtLinePres(FILE *ioPRESSURE);
80
85void PrtColumns(
86 FILE *ioMEAN );
87
90
93
96void PrtAllTau(void);
97
98class t_prt_matrix : public module {
99public:
102 string species;
104 vector<long> speciesLevelList;
105 bool lgLevelsResolved = false;
106
107 void zero();
109
110 const char *chName() const
111 {
112 return "prt_matrix";
113 }
114
115 void setSpecies( const string &sspec );
116 void resolveLevels();
117 void prtRates( const long numLevels,
118 const multi_arr<double,2,C_TYPE> &matrix,
119 valarray<double> &b );
120};
121
123struct t_blend {
124 string chLabel;
128 vector<LineID> component;
129 vector<long> compID;
130 t_blend() : chLabel("Blnd"), lgQuiet(false), lgIgnore(false) {}
131};
132
133struct t_prt {
134
137
141
145
149
153
157
161
164
168
171
175
178
182
186
189
198
202
203 /* flag set with print continuum index command, to identify all lines
204 * that lie within a continuum cell */
206 /* these are lower and upper limits to the energy range in Rydbergs.
207 * they are the first and second number on the command line, lower and
208 * upper bounds of the code are used if not specified */
211
217
220
223
226
231
234
236 long int nstart;
237
240
243
245
252
256
262 long int nPrnLineCell;
263
267
271
275
281
282 /* Generate output in HTML format */
284
294 long int ipeak;
296
297 long int nzdump;
298
301
303 vector<t_blend> blend;
304
307
309 {
310 // make sure this has the correct value before main() starts
311 // this is needed by check_data() and possibly others
312 lgPrintTime = true;
313 // this needs to be set before the code starts reading the input script
314 lgIncludeBlends = true;
315 }
316};
317extern t_prt prt;
318
319
320
321struct t_line_col : public module
322{
323 const char* chName() const
324 {
325 return "prt_linecol";
326 }
327 void zero();
329
332
335
339
343
346
348 string col_gap;
349};
350extern struct t_line_col prt_linecol;
351
352#endif /* PRT_H_ */
const int LIMELM
Definition cddefines.h:331
float realnum
Definition cddefines.h:128
Definition lines.h:15
Definition transition.h:24
t_wavl twav() const
Definition transition.h:455
module()
Definition module.h:29
Definition container_classes.h:916
Definition prt.h:98
const char * chName() const
Definition prt.h:110
void zero()
Definition prt.cpp:120
void comment(t_warnings &)
Definition prt.h:108
void setSpecies(const string &sspec)
Definition prt.cpp:128
void resolveLevels()
Definition prt.cpp:150
bool lgLevelsResolved
Definition prt.h:105
string speciesLevels
Definition prt.h:103
vector< long > speciesLevelList
Definition prt.h:104
string species
Definition prt.h:102
void prtRates(const long numLevels, const multi_arr< double, 2, C_TYPE > &matrix, valarray< double > &b)
Definition prt.cpp:161
Definition warnings.h:11
Definition cddefines.h:1312
t_line_col prt_linecol
Definition prt.cpp:15
t_prt prt
Definition prt.cpp:14
void PrtFinal(void)
Definition prt_final.cpp:551
void PrtZone(void)
Definition prt_zone.cpp:35
void PrtColumns(FILE *ioMEAN)
Definition prt_columns.cpp:14
void SetPrintLineCol()
Definition prt.cpp:28
void PrtMeanIon(char chType, bool lgDensity, FILE *)
Definition prt_meanion.cpp:11
void PrtHeader(void)
Definition prt_header.cpp:17
void prtmet(void)
Definition prt_met.cpp:19
void CloudyPrintReference()
Definition service.cpp:1810
void prt_line_inlist(FILE *ioOUT, const char *label, t_wavl twav)
Definition prt.cpp:112
void DatabasePrintReference()
Definition service.cpp:1827
double PrtLineSum(void)
Definition prt_linesum.cpp:50
void PrtLinePres(FILE *ioPRESSURE)
Definition prt_linepres.cpp:16
void prt_line_err(FILE *ioOUT, const LineID &lineid)
Definition prt.cpp:103
void PrtAllTau(void)
Definition prt_alltau.cpp:15
void PrtComment(void)
Definition prt_comment.cpp:66
const long NCOLMAX
Definition prt.h:14
void prt_LineLabels(FILE *io, bool lgPrintAll, bool lgPrintIndex)
Definition prt.cpp:42
vector< LineID > component
Definition prt.h:128
t_blend()
Definition prt.h:130
bool lgQuiet
Definition prt.h:126
string chLabel
Definition prt.h:124
t_wavl wave
Definition prt.h:125
vector< long > compID
Definition prt.h:129
bool lgIgnore
Definition prt.h:127
Definition prt.h:322
int absint_len
Definition prt.h:331
string relint_outrange
Definition prt.h:345
int column_len
Definition prt.h:338
void comment(t_warnings &)
Definition prt.h:328
string col_gap
Definition prt.h:348
int relint_len
Definition prt.h:334
int col_gap_len
Definition prt.h:342
void zero()
Definition prt.cpp:17
const char * chName() const
Definition prt.h:323
Definition prt.h:133
bool lgPrtLineLog
Definition prt.h:270
bool lgPrintBlock
Definition prt.h:136
bool lgSourceTransmitted
Definition prt.h:214
bool lgPrnInwd
Definition prt.h:197
realnum PrtTauFnt
Definition prt.h:188
realnum fx1ryd
Definition prt.h:293
long int nzdump
Definition prt.h:297
realnum powion
Definition prt.h:287
bool lgPrtBN
Definition prt.h:219
bool lgDiffuseOutward
Definition prt.h:216
bool lgPrintBlockIntrinsic
Definition prt.h:140
bool lgSurfaceBrightness
Definition prt.h:185
bool lgPrnIsoCollapsed
Definition prt.h:201
bool lgPrintBlockEmergent
Definition prt.h:144
realnum pradio
Definition prt.h:292
t_prt()
Definition prt.h:308
bool lgFntSet
Definition prt.h:255
t_wavl wlSort2
Definition prt.h:156
bool lgPrtShort
Definition prt.h:225
bool lgPrintLineCumulative
Definition prt.h:274
bool lgPrtTau
Definition prt.h:177
bool lgPrintLineAirWavelengths
Definition prt.h:280
realnum xpow
Definition prt.h:288
bool lgSortLineIntensity
Definition prt.h:152
bool lgPrtArry[LIMELM]
Definition prt.h:242
bool lgPrtLastIt
Definition prt.h:222
bool lgPrnColl
Definition prt.h:196
t_wavl wlSort1
Definition prt.h:156
bool lgDiffuseInward
Definition prt.h:215
bool lgOnlyZone
Definition prt.h:228
bool lgPrnPump
Definition prt.h:194
realnum lgPrtContIndices_lo_E
Definition prt.h:209
bool lgPrintHTML
Definition prt.h:283
bool lgOnlyHead
Definition prt.h:230
realnum GammaLumin
Definition prt.h:295
realnum lgPrtContIndices_hi_E
Definition prt.h:210
t_prt_matrix matrix
Definition prt.h:244
bool lgPrintColumns
Definition prt.h:163
bool lgPrtStart
Definition prt.h:233
bool lgPrintFluxEarth
Definition prt.h:181
realnum qx
Definition prt.h:286
bool lgSortLineWavelength
Definition prt.h:152
realnum TooFaint
Definition prt.h:250
realnum pbal
Definition prt.h:289
bool lgPrnHeat
Definition prt.h:195
bool lgPrtCitations
Definition prt.h:300
bool lgPrintTime
Definition prt.h:167
bool lgPrintHeating
Definition prt.h:239
vector< t_blend > blend
Definition prt.h:303
bool lgIncludeBlends
Definition prt.h:306
bool lgSourceReflected
Definition prt.h:213
bool lgPrnAges
Definition prt.h:170
realnum qgam
Definition prt.h:291
realnum q
Definition prt.h:290
long int nPrnLineCell
Definition prt.h:262
bool lgPrtContIndices
Definition prt.h:205
long int nstart
Definition prt.h:236
bool lgPrtMaser
Definition prt.h:174
bool lgSortLines
Definition prt.h:148
bool lgPrnLineCell
Definition prt.h:259
bool lgSurfaceBrightness_SR
Definition prt.h:185
long int ipeak
Definition prt.h:294
bool lgPrtLineArray
Definition prt.h:266
bool lgFaintOn
Definition prt.h:251