30 char chNumbers[31][3] = {
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
31 "10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
32 "20",
"21",
"22",
"23",
"24",
"25",
"26",
"27",
"28",
"29",
"30"};
57 fprintf( ioPUN,
"%12.4e\t%10.2e\t%10.2e\t%10.2e\t%10.2e\t%4.4s\n",
66 fprintf( ioPUN,
"\n" );
74 fprintf( ioPUN,
"%.5e\t%.3e\n",
79 fprintf( ioPUN,
"\n" );
102 long int k, nu_hi , nskip;
126 for( i=j; i<nu_hi; i+=nskip )
129 for( k=0; k<nskip; ++k )
135 fprintf(ioPUN,
"%.5e\t%.3e\n",
147 ener3 = 1e24*
POW3(ener);
149 "%12.4e%12.4e%12.4e%12.4e%12.4e\n",
159 ener3 = 1e24*
POW3(ener);
161 "%12.4e%12.4e%12.4e%12.4e%12.4e\n",
177 char chOutput[100] , chString[100];
184 for( ion=0; ion<=nelem; ++ion )
187 nelec = nelem+1 - ion;
190 sprintf(chOutput,
"%s",
193 if( chOutput[1]==
' ' )
194 chOutput[1] = chOutput[2];
198 sprintf(chString,
"0 ");
202 sprintf(chString,
"+ ");
206 sprintf(chString,
"+%li ",ion);
208 strcat( chOutput , chString );
209 fprintf(ioPUN,
"%s",chOutput );
213 for( nshell=0; nshell <
Heavy.
nsShells[nelem][ion]; nshell++ )
219 fprintf(ioPUN,
"\t%.2f" ,
227 fprintf(ioPUN,
"\t%.2f",
253 strcat( chFileName , chNumbers[1] );
256 strcat( chFileName ,
".opc" );
264 fprintf( ioFILENAME ,
"\t");
267 fprintf( ioFILENAME ,
"\n");
270 fclose( ioFILENAME );
288 strcat( chFileName , chNumbers[1] );
291 strcat( chFileName ,
".opc" );
299 fprintf( ioFILENAME ,
"\t");
302 fprintf( ioFILENAME ,
"\n");
304 fclose( ioFILENAME );
315 strcat( chFileName , chNumbers[2] );
318 strcat( chFileName ,
".opc" );
326 fprintf( ioFILENAME ,
"\t");
329 fprintf( ioFILENAME ,
"\n");
333 fclose( ioFILENAME );
355 fprintf(
ioQQQ,
" Unidentified opacity key=%4.4s\n",
371 for( ion=0; ion <= nelem; ion++ )
373 for( j=0; j < (nelem + 2); j++ )
390 strcat( chFileName , chNumbers[ion+1] );
393 strcat( chFileName ,
".opc" );
404 fprintf( ioFILENAME ,
"\t");
408 fprintf( ioFILENAME ,
"\n");
411 fclose( ioFILENAME );
424 fprintf(
ioQQQ,
"\n\nThe opacity files have been successfully created.\n");
425 fprintf(
ioQQQ,
"The files have names that start with the first 4 characters of the element name.\n");
426 fprintf(
ioQQQ,
"There is one file per ion and the number after the element name indicates the ion.\n");
427 fprintf(
ioQQQ,
"The energies are in eV and the cross sections in megabarns.\n");
428 fprintf(
ioQQQ,
"All end in \".opc\"\n");
429 fprintf(
ioQQQ,
"The data only extend to the highest energy in this continuum source.\n");