cloudy  trunk
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
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
21  if( ipnt_coarse_2_fine[i] && ipnt_coarse_2_fine[i+1] )
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  }
41  trans_coef_total_stale = false;
42  }
43  return trans_coef_total;
44 }
t_rfield::fine_opt_depth
realnum * fine_opt_depth
Definition: rfield.h:410
t_rfield::trans_coef_total
realnum * trans_coef_total
Definition: rfield.h:390
rfield
t_rfield rfield
Definition: rfield.cpp:8
realnum
float realnum
Definition: cddefines.h:103
rfield.h
t_opac::lgScatON
bool lgScatON
Definition: opacity.h:183
t_rfield
Definition: rfield.h:33
opac
t_opac opac
Definition: opacity.cpp:5
sexp
sys_float sexp(sys_float x)
Definition: service.cpp:914
cddefines.h
t_rfield::nflux
long int nflux
Definition: rfield.h:43
t_rfield::trans_coef_total_stale
bool trans_coef_total_stale
Definition: rfield.h:393
t_rfield::getCoarseTransCoef
const realnum * getCoarseTransCoef()
Definition: rfield.cpp:10
t_rfield::ipnt_coarse_2_fine
long int * ipnt_coarse_2_fine
Definition: rfield.h:397
opacity.h