cloudy trunk
Loading...
Searching...
No Matches
rfield.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#include "cddefines.h"
4#include "rfield.h"
5
6#include "opacity.h"
7
9
11{
12 // average opacity transmission coefficient fine to coarse
13 if( opac.lgScatON && trans_coef_total_stale)
14 {
15 /* sum over coarse continuum */
16 for( long i=0; i < nflux-1; i++ )
17 {
18 // find transmission coefficient if lower and upper bounds
19 // of coarse continuum is within boundaries of fine continuum
20 // unity is default
22 {
23 // first branch is normal case, where fine continuum is finer than
24 // coarse continuum. But, when end temp is very high, fine continuum is
25 // very coarse, so may be just one cell, and following will not pass
27 {
28 trans_coef_total[i] = 0.;
29 for( long j=ipnt_coarse_2_fine[i]; j<ipnt_coarse_2_fine[i+1]; ++j )
32 }
33 else
34 {
35 // in case where fine is coarser than coarse,
36 // just use first cell
38 }
39 }
40 }
42 }
43 return trans_coef_total;
44}
sys_float sexp(sys_float x)
Definition service.cpp:914
float realnum
Definition cddefines.h:103
t_opac opac
Definition opacity.cpp:5
t_rfield rfield
Definition rfield.cpp:8
realnum * fine_opt_depth
Definition rfield.h:410
const realnum * getCoarseTransCoef()
Definition rfield.cpp:10
long int nflux
Definition rfield.h:43
realnum * trans_coef_total
Definition rfield.h:390
bool trans_coef_total_stale
Definition rfield.h:393
long int * ipnt_coarse_2_fine
Definition rfield.h:397