31 char chNumbers[31][3] = {
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
32 "10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
33 "20",
"21",
"22",
"23",
"24",
"25",
"26",
"27",
"28",
"29",
"30"};
58 fprintf( ioPUN,
"%12.4e\t%10.2e\t%10.2e\t%10.2e\t%10.2e\t%4.4s\n",
67 fprintf( ioPUN,
"\n" );
75 fprintf( ioPUN,
"%.5e\t%.3e\n",
80 fprintf( ioPUN,
"\n" );
103 long int k, nu_hi , nskip;
127 for( i=j; i<nu_hi; i+=nskip )
130 for( k=0; k<nskip; ++k )
136 fprintf(ioPUN,
"%.5e\t%.3e\n",
148 ener3 = 1e24*
POW3(ener);
150 "%12.4e%12.4e%12.4e%12.4e%12.4e\n",
160 ener3 = 1e24*
POW3(ener);
162 "%12.4e%12.4e%12.4e%12.4e%12.4e\n",
178 char chOutput[100] , chString[100];
185 for( ion=0; ion<=nelem; ++ion )
188 nelec = nelem+1 - ion;
191 sprintf(chOutput,
"%s",
194 if( chOutput[1]==
' ' )
195 chOutput[1] = chOutput[2];
199 sprintf(chString,
"0 ");
203 sprintf(chString,
"+ ");
207 sprintf(chString,
"+%li ",ion);
209 strcat( chOutput , chString );
210 fprintf(ioPUN,
"%s",chOutput );
214 for( nshell=0; nshell <
Heavy.
nsShells[nelem][ion]; nshell++ )
220 fprintf(ioPUN,
"\t%.2f" ,
228 fprintf(ioPUN,
"\t%.2f",
254 strcat( chFileName , chNumbers[1] );
257 strcat( chFileName ,
".opc" );
265 fprintf( ioFILENAME ,
"\t");
268 fprintf( ioFILENAME ,
"\n");
271 fclose( ioFILENAME );
289 strcat( chFileName , chNumbers[1] );
292 strcat( chFileName ,
".opc" );
300 fprintf( ioFILENAME ,
"\t");
303 fprintf( ioFILENAME ,
"\n");
305 fclose( ioFILENAME );
316 strcat( chFileName , chNumbers[2] );
319 strcat( chFileName ,
".opc" );
327 fprintf( ioFILENAME ,
"\t");
330 fprintf( ioFILENAME ,
"\n");
334 fclose( ioFILENAME );
356 fprintf(
ioQQQ,
" Unidentified opacity key=%4.4s\n",
372 for( ion=0; ion <= nelem; ion++ )
374 for( j=0; j < (nelem + 2); j++ )
391 strcat( chFileName , chNumbers[ion+1] );
394 strcat( chFileName ,
".opc" );
405 fprintf( ioFILENAME ,
"\t");
409 fprintf( ioFILENAME ,
"\n");
412 fclose( ioFILENAME );
425 fprintf(
ioQQQ,
"\n\nThe opacity files have been successfully created.\n");
426 fprintf(
ioQQQ,
"The files have names that start with the first 4 characters of the element name.\n");
427 fprintf(
ioQQQ,
"There is one file per ion and the number after the element name indicates the ion.\n");
428 fprintf(
ioQQQ,
"The energies are in eV and the cross sections in megabarns.\n");
429 fprintf(
ioQQQ,
"All end in \".opc\"\n");
430 fprintf(
ioQQQ,
"The data only extend to the highest energy in this continuum source.\n");
const int FILENAME_PATH_LENGTH_2
void PrintE93(FILE *, double)
double AnuUnit(realnum energy)
#define DEBUG_ENTRY(funcname)
long nelec_eject(long n, long i, long ns) const
long ipFineCont(double energy_ryd)
FILE * open_data(const char *fname, const char *mode, access_scheme scheme)
t_elementnames elementnames
t_iso_sp iso_sp[NISO][LIMELM]
void OpacityAdd1SubshellInduc(long int ipOpac, long int low, long int ihi, double a, double b, char chStat)
void OpacityAdd1Element(long int ipZ)
UNUSED const double EVRYD
STATIC void prtPunOpacSummary(void)
void save_opacity(FILE *ioPUN, long int ipPun)
long int nsShells[LIMELM][LIMELM]
long int ipHeavy[LIMELM][LIMELM]
double xIonDense[LIMELM][LIMELM+1]
realnum gas_phase[LIMELM]
char chElementSym[LIMELM][CHARS_ELEMENT_SYM]
char chElementNameShort[LIMELM][CHARS_ELEMENT_NAME_SHORT]
long int ipElement[LIMELM][LIMELM][7][3]
realnum punarg[LIMPUN][3]