/*eva2nu two photon emission function for hydrogen */ #include "cddefines.h" #include "spline.h" #include "splint.h" #include "eva2nu.h" #define NCRS 21 double eva2nu(double freq) { double eva2nu_v, y; static double y2[NCRS]; static double ener[NCRS]={0.,0.03738,0.07506,0.1124,0.1498,0.1875, 0.225,0.263,0.300,0.3373,0.375,0.4127,0.4500,0.487,0.525,0.5625, 0.6002,0.6376,0.6749,0.7126,0.75}; static double crs[NCRS]={0.,5.03,8.09,10.16,11.52,12.52,13.25,13.70, 14.02,14.25,14.27,14.25,14.02,13.70,13.25,12.52,11.52,10.16, 8.09,5.03,0.}; static int lgFirst = TRUE; # ifdef DEBUG_FUN fputs( "<+>eva2nu()\n", debug_fp ); # endif if( lgFirst ) { /* set up coefficients for spline */ spline(ener,crs,NCRS,2e31,2e31,y2); lgFirst = FALSE; } if( freq < 0. || freq >= 0.75 ) { eva2nu_v = 0.; } else { splint(ener,crs,y2,NCRS,freq,&y); eva2nu_v = y; } # ifdef DEBUG_FUN fputs( " <->eva2nu()\n", debug_fp ); # endif return( eva2nu_v ); }