cloudy
trunk
Loading...
Searching...
No Matches
source
init_coreload_postparse.cpp
Go to the documentation of this file.
1
/* This file is part of Cloudy and is copyright (C)1978-2013 by Gary J. Ferland and
2
* others. For conditions of distribution and use see copyright notice in license.txt */
3
/*InitCoreloadPostparse initialization at start, called from cloudy
4
* after parser one time per core load */
5
#include "
cddefines.h
"
6
#include "
monitor_results.h
"
7
#include "
dense.h
"
8
#include "
init.h
"
9
#include "
iso.h
"
10
#include "
lines_service.h
"
11
#include "
taulines.h
"
12
13
/*InitCoreloadPostparse initialization at start, called from cloudy
14
* after parser, one time per core load */
15
void
InitCoreloadPostparse
(
void
)
16
{
17
18
static
int
nCalled = 0;
19
20
DEBUG_ENTRY
(
"InitCoreloadPostparse()"
);
21
22
/* only do this once per coreload */
23
if
( nCalled > 0 )
24
{
25
return
;
26
}
27
28
/* this is first call, increment the nCalled counter so we never do this again */
29
++nCalled;
30
31
for
(
long
ipISO=
ipH_LIKE
; ipISO<
NISO
; ++ipISO )
32
{
33
for
(
long
nelem=ipISO; nelem<
LIMELM
; ++nelem)
34
{
35
/* only grab core for elements that are turned on */
36
if
( nelem < 2 ||
dense
.lgElmtOn[nelem] )
37
{
38
iso_update_num_levels
( ipISO, nelem );
39
ASSERT
(
iso_sp
[ipISO][nelem].numLevels_max > 0 );
40
iso_ctrl
.nLyman_malloc[ipISO] =
iso_ctrl
.nLyman[ipISO];
41
// resolved and collapsed levels
42
long
numLevels =
iso_sp
[ipISO][nelem].numLevels_max;
43
// "extra" Lyman lines
44
numLevels +=
iso_ctrl
.nLyman_malloc[ipISO] - 2;
45
// satellite lines (one for doubly-excited continuum)
46
if
(
iso_ctrl
.lgDielRecom[ipISO] )
47
numLevels += 1;
48
iso_sp
[ipISO][nelem].st.resize( numLevels );
49
}
50
}
51
}
52
53
return
;
54
}
cddefines.h
ASSERT
#define ASSERT(exp)
Definition
cddefines.h:578
LIMELM
const int LIMELM
Definition
cddefines.h:258
NISO
const int NISO
Definition
cddefines.h:261
DEBUG_ENTRY
#define DEBUG_ENTRY(funcname)
Definition
cddefines.h:684
dense
t_dense dense
Definition
dense.cpp:24
dense.h
init.h
InitCoreloadPostparse
void InitCoreloadPostparse(void)
Definition
init_coreload_postparse.cpp:15
iso_sp
t_iso_sp iso_sp[NISO][LIMELM]
Definition
iso.cpp:8
iso_ctrl
t_isoCTRL iso_ctrl
Definition
iso.cpp:6
iso.h
iso_update_num_levels
void iso_update_num_levels(long ipISO, long nelem)
Definition
iso_create.cpp:1488
ipH_LIKE
const int ipH_LIKE
Definition
iso.h:62
lines_service.h
monitor_results.h
taulines.h
Generated by
1.14.0