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
opacity_zero.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
/*OpacityZero zero out opacity save arrays, save old opacity in OldOpacSave array */
4
#include "
cddefines.h
"
5
#include "
rfield.h
"
6
#include "
opacity.h
"
7
8
void
OpacityZero
(
void
)
9
{
10
long
int
i;
11
12
DEBUG_ENTRY
(
"OpacityZero()"
);
13
14
15
for
( i=0; i <
rfield
.
nflux_with_check
; i++ )
16
{
17
opac
.
opacity_sct
[i] = 0.;
18
/* save the current opacities */
19
opac
.
OldOpacSave
[i] =
opac
.
opacity_abs
[i];
20
opac
.
opacity_abs
[i] = 0.;
21
}
22
23
/* only zero out the static array if we are going to
24
* totally redo the static part */
25
if
(
opac
.
lgRedoStatic
)
26
{
27
/*fprintf(ioQQQ," OpacityZero is zeroing out the static opacities\n");*/
28
for
( i=0; i <
rfield
.
nflux_with_check
; i++ )
29
{
30
opac
.
OpacStatic
[i] = 0.;
31
}
32
}
33
return
;
34
}
35
36
/* set old opac array to current versin during search phase */
37
void
OpacityZeroOld
(
void
)
38
{
39
long
int
i;
40
41
DEBUG_ENTRY
(
"OpacityZeroOld()"
);
42
43
44
for
( i=0; i <
rfield
.
nflux_with_check
; i++ )
45
{
46
/* save the current opacities */
47
opac
.
OldOpacSave
[i] =
opac
.
opacity_abs
[i];
48
}
49
return
;
50
}
t_opac::opacity_abs
double * opacity_abs
Definition:
opacity.h:104
opac
t_opac opac
Definition:
opacity.cpp:5
t_opac::OpacStatic
double * OpacStatic
Definition:
opacity.h:123
t_opac::opacity_sct
double * opacity_sct
Definition:
opacity.h:107
opacity.h
t_rfield::nflux_with_check
long int nflux_with_check
Definition:
rfield.h:49
t_opac::OldOpacSave
double * OldOpacSave
Definition:
opacity.h:110
OpacityZeroOld
void OpacityZeroOld(void)
Definition:
opacity_zero.cpp:37
rfield
t_rfield rfield
Definition:
rfield.cpp:9
cddefines.h
DEBUG_ENTRY
#define DEBUG_ENTRY(funcname)
Definition:
cddefines.h:723
t_opac::lgRedoStatic
bool lgRedoStatic
Definition:
opacity.h:160
rfield.h
OpacityZero
void OpacityZero(void)
Definition:
opacity_zero.cpp:8
Generated by
1.8.5