22 double frac_beam_time;
24 double frac_beam_const;
26 double frac_isotropic;
32 a =
ffun( anu , &frac_beam_time , &frac_beam_const , &frac_isotropic );
42 double *frac_beam_time,
44 double *frac_beam_const,
46 double *frac_isotropic )
49 static bool lgWarn =
false;
50 double flx_beam_time , flx_beam_const , flx_isotropic;
74 flx_beam_const += one;
85 *frac_beam_const = 1.;
91 *frac_beam_time = flx_beam_time / ffun_v;
93 *frac_beam_const = flx_beam_const / ffun_v;
95 *frac_isotropic = flx_isotropic / ffun_v;
97 ASSERT( *frac_beam_time >=0. && *frac_beam_time<=1.+3.*DBL_EPSILON );
98 ASSERT( *frac_beam_const >=0.&& *frac_beam_const<=1.+3.*DBL_EPSILON );
99 ASSERT( *frac_isotropic >=0. && *frac_isotropic<=1.+3.*DBL_EPSILON );
100 ASSERT( fabs( 1.-*frac_beam_time-*frac_beam_const-*frac_isotropic)<
106 fprintf(
ioQQQ,
" FFUN: The net continuum is very intense.\n" );
107 fprintf(
ioQQQ,
" I will try to press on, but may have problems.\n" );
120 static bool lgWarn =
false;
140 if( strcmp(chKey,
"AGN ") == 0 )
169 else if( strcmp(chKey,
"POWER") == 0 )
177 else if( strcmp(chKey,
"BLACK") == 0 )
179 const double db_log = log(DBL_MAX);
188 else if( fac > 1.e-5 )
190 ffun1_v = xnu*xnu/(exp(fac) - 1.);
194 ffun1_v = xnu*xnu/(fac*(1. + fac/2.));
198 else if( strcmp(chKey,
"INTER") == 0 )
222 ffun1_v = pow(10.,y);
229 ys1 = pow( 10. , ys1 );
230 ys2 = pow( 10. , ys2 );
231 ASSERT( ffun1_v >= ys1/(1.+100.*FLT_EPSILON) );
232 ASSERT( ffun1_v <= ys2*(1.+100.*FLT_EPSILON) );
235 return( ffun1_v/xnu );
249 else if( strcmp(chKey,
"BREMS") == 0 )
253 ffun1_v =
sexp(fac)/pow(xnu,1.2);
256 else if( strcmp(chKey,
"LASER") == 0 )
258 const double BIG = 1.e10;
259 const double SMALL = 1.e-25;
276 else if( strcmp(chKey,
"READ ") == 0 )
308 else if( strcmp(chKey,
"VOLK ") == 0 )
321 fprintf(
ioQQQ,
" ffun1: Too many points - increase ncell\n" );
322 fprintf(
ioQQQ,
" cell needed=%4ld ncell=%4ld\n",
340 fprintf(
ioQQQ,
" ffun1: I do not understand continuum label \"%s\" for continuum %li.\n",
345 if( ffun1_v > 1e35 && !lgWarn )
348 fprintf(
ioQQQ,
" FFUN1: Continuum %ld is very intense.\n",
350 fprintf(
ioQQQ,
" I will try to press on, but may have problems.\n" );
372 fprintf(
ioQQQ,
" error 1 reading input continuum file.\n" );
382 sscanf( chLine,
"%lf%lf ", &help[0], &help[1] );
393 fprintf(
ioQQQ,
" ReadTable, file for TABLE READ has too few points, =%5ld\n",
408 " DISASTER ReadTable: the first energy in table read file is not positive. Something is wrong.\n" );
437 fprintf(
ioQQQ,
" DISASTER ReadTable: the energy scale in the table read file makes no sense to me.\n" );
446 fprintf(
ioQQQ,
" DISASTER ReadTable: The energy mesh of the file read in by the TABLE READ command does not agree with this version of Cloudy.\n" );
447 fprintf(
ioQQQ,
" DISASTER ReadTable: Was the file generated by an older version of the code?\n" );
448 fprintf(
ioQQQ,
" DISASTER ReadTable: Did the first model do more than one iteration, but the LAST option was missing on PUNCH LAST TRANSMITTED CONTINUUM?\n");
449 fprintf(
ioQQQ,
" DISASTER ReadTable: Number of points read in=%5ld\n",
451 fprintf(
ioQQQ,
" ReadTable: input, internal energies=%12.4e%12.4e\n",