Cloudy Data Archive
cloudy
trunk
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
source
parse_caseb.cpp
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
/*ParseCaseB - parse the Case A, B, or C command */
4
#include "
cddefines.h
"
5
#include "
opacity.h
"
6
#include "
parser.h
"
7
8
/*ParseCaseB - parse the Case A, B, or C command */
9
void
ParseCaseB
(
Parser
&p )
10
{
11
DEBUG_ENTRY
(
"ParseCaseB()"
);
12
13
/* which case do we do? */
14
if
( p.
nMatch
(
" A "
) )
15
{
16
opac
.
lgCaseB
=
false
;
17
// rfield.lgInducProcess = false;
18
}
19
else
if
( p.
nMatch
(
" B "
) )
20
{
21
opac
.
lgCaseB
=
true
;
22
// rfield.lgInducProcess = false;
23
}
24
else
if
( p.
nMatch
(
" C "
) )
25
opac
.
lgCaseB
=
false
;
26
27
/* difference between Case A and Case C is in induced processes -
28
* do not include them in Case A or Case B */
29
/* optional optical depth in Ly a */
30
opac
.
tlamin
= (
realnum
)p.
FFmtRead
();
31
if
( p.
lgEOL
() )
32
{
33
/* optical depths not specified - use defaults for cases A and B */
34
if
(
opac
.
lgCaseB
)
35
/* set default to 1e5 to get more realistic conditions in H+ region.
36
* Very large tau caused extreme Lya trapping, photoionization rates,
37
* & radiation pressure*/
38
opac
.
tlamin
= 1e5f;
39
else
40
/* Case A or Case C - Lyman lines optically thin */
41
opac
.
tlamin
= 1e-5f;
42
}
43
else
44
opac
.
tlamin
=
exp10
(
opac
.
tlamin
);
45
46
/* Hummer and Storey case B; no collisions from n=1, 2 (usually in) */
47
if
( p.
nMatch
(
"HUMM"
) )
48
opac
.
lgCaseB_HummerStorey
=
true
;
49
50
/* the NO PHOTOIONIZATION option, turns off excited state photoionization */
51
if
( p.
nMatch
(
"NO PH"
) )
52
opac
.
lgCaseB_no_photo
=
true
;
53
54
/* the NO PDEST option, turns off line destruction by background opacities */
55
if
( p.
nMatch
(
"NO PDE"
) )
56
opac
.
lgCaseB_no_pdest
=
true
;
57
58
return
;
59
}
Parser::nMatch
bool nMatch(const char *chKey) const
Definition:
parser.h:150
t_opac::lgCaseB_no_photo
bool lgCaseB_no_photo
Definition:
opacity.h:182
Parser::FFmtRead
double FFmtRead(void)
Definition:
parser.cpp:472
exp10
double exp10(double x)
Definition:
cddefines.h:1368
opac
t_opac opac
Definition:
opacity.cpp:5
opacity.h
Parser
Definition:
parser.h:43
parser.h
t_opac::lgCaseB_no_pdest
bool lgCaseB_no_pdest
Definition:
opacity.h:185
ParseCaseB
void ParseCaseB(Parser &p)
Definition:
parse_caseb.cpp:9
t_opac::lgCaseB
bool lgCaseB
Definition:
opacity.h:174
realnum
float realnum
Definition:
cddefines.h:124
t_opac::tlamin
realnum tlamin
Definition:
opacity.h:171
cddefines.h
DEBUG_ENTRY
#define DEBUG_ENTRY(funcname)
Definition:
cddefines.h:723
Parser::lgEOL
bool lgEOL(void) const
Definition:
parser.h:113
t_opac::lgCaseB_HummerStorey
bool lgCaseB_HummerStorey
Definition:
opacity.h:178
Generated by
1.8.5