/*add local destruction of continuum to ots field */ #include "cddefines.h" #include "opac.h" #include "rfield.h" #include "addotscon.h" void AddOTSCon( /* the ots rate itself */ float ots, /* pointer to continuum cell for ots, on f scale */ long int ip) { # ifdef DEBUG_FUN fputs( "<+>AddOTSCon()\n", debug_fp ); # endif /* * routine called to add ots due to continuum destruction to * radiation field */ /* check if outside bounds of this continuum source */ if( ip > rfield.nflux ) { # ifdef DEBUG_FUN fputs( " <->AddOTSCon()\n", debug_fp ); # endif return; } assert( ip> 0 ); assert( ots >= 0. ); assert( ip <= NCELL ); /* add locally destroyed flux of photons to continuum OTS array */ if( opac.opac[ip-1] > 0. ) { rfield.otsconNew[ip-1] += (float)(ots/opac.opac[ip-1]); } # ifdef DEBUG_FUN fputs( " <->AddOTSCon()\n", debug_fp ); # endif return; }