/*ffun evaluate total flux for sum of all continuum sources */ #include "cddefines.h" #include "incidspec.h" #include "bit32.h" #include "ffun.h" #include "ffun1.h" double ffun(double anu) { double ffun_v; static int lgWarn = FALSE; # ifdef DEBUG_FUN fputs( "<+>ffun()\n", debug_fp ); # endif /* FFUN returns the sum of photons per unit time, area, energy, * for all continuua in the calculation * we loop over all nspec continuum sources - ipspec points to each * */ ffun_v = 0.; for( IncidSpec.ipspec=0; IncidSpec.ipspec < IncidSpec.nspec; IncidSpec.ipspec++ ) { ffun_v += ffun1(anu)*IncidSpec.spfac[IncidSpec.ipspec]; } if( (ffun_v > 1e35 && (!lgWarn)) && bit32.lgBit32 ) { lgWarn = TRUE; fprintf( ioQQQ, " FFUN: The net continuum is very intense for a 32 bit cpu.\n" ); fprintf( ioQQQ, " I will try to press on, but may have problems.\n" ); } # ifdef DEBUG_FUN fputs( " <->ffun()\n", debug_fp ); # endif return( ffun_v ); }