Changeset 1750
- Timestamp:
- 01/20/08 08:09:51 (6 months ago)
- Files:
-
- branches/c07.02_branch/source/atom_feii.cpp (modified) (1 diff)
- branches/c07.02_branch/source/cddrive.cpp (modified) (1 diff)
- branches/c07.02_branch/source/cdgetlinelist.cpp (modified) (2 diffs)
- branches/c07.02_branch/source/cdinit.cpp (modified) (2 diffs)
- branches/c07.02_branch/source/cloudy.cpp (modified) (1 diff)
- branches/c07.02_branch/source/cont_createmesh.cpp (modified) (1 diff)
- branches/c07.02_branch/source/cont_ffun.cpp (modified) (3 diffs)
- branches/c07.02_branch/source/hydrobranch.cpp (modified) (1 diff)
- branches/c07.02_branch/source/ion_recomb_Badnell.cpp (modified) (1 diff)
- branches/c07.02_branch/source/maincl.cpp (modified) (1 diff)
- branches/c07.02_branch/source/optimize_phymir.cpp (modified) (2 diffs)
- branches/c07.02_branch/source/parse.h (modified) (1 diff)
- branches/c07.02_branch/source/parse_punch.cpp (modified) (4 diffs)
- branches/c07.02_branch/source/parse_table.cpp (modified) (3 diffs)
- branches/c07.02_branch/source/rfield.h (modified) (1 diff)
- branches/c07.02_branch/source/zero.cpp (modified) (1 diff)
- branches/c07.02_branch/tsuite/auto/blr_kk81.in (modified) (1 diff)
- branches/c07.02_branch/tsuite/auto/blr_rnfa.in (modified) (1 diff)
- branches/c07.02_branch/tsuite/auto/blr_rnfb.in (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/c07.02_branch/source/atom_feii.cpp
r1467 r1750 699 699 } 700 700 701 fclose( ioDATA ); 702 701 703 /*generate needed opacity data for the large FeII atom */ 702 704 branches/c07.02_branch/source/cddrive.cpp
r843 r1750 2226 2226 DEBUG_ENTRY( "cdClosePunchFiles()" ); 2227 2227 2228 ClosePunchFiles( );2228 ClosePunchFiles( true ); 2229 2229 2230 2230 DEBUG_EXIT( "cdClosePunchFiles()" ); branches/c07.02_branch/source/cdgetlinelist.cpp
r759 r1750 152 152 } 153 153 154 fclose( ioData ); 155 154 156 DEBUG_EXIT( "cdGetLineList()" ); 155 157 … … 157 159 return nLines; 158 160 } 159 branches/c07.02_branch/source/cdinit.cpp
r1126 r1750 323 323 324 324 /* close any open units */ 325 /* flush ioQQQ */ 326 fflush( ioQQQ ); 327 328 ClosePunchFiles(); 325 ClosePunchFiles( true ); 329 326 330 327 /* this routine must be called upon exit or machine will appear to "hang", … … 333 330 if( lgMPI ) 334 331 { 335 fprintf(ioQQQ," MPI_Finalize called.\n");336 332 # ifdef MPI 337 333 MPI_Finalize(); branches/c07.02_branch/source/cloudy.cpp
r759 r1750 294 294 } 295 295 296 ClosePunchFiles( );296 ClosePunchFiles( false ); 297 297 298 298 /* this checks that various parts of the code worked properly */ branches/c07.02_branch/source/cont_createmesh.cpp
r1226 r1750 778 778 } 779 779 780 fclose( ioDATA ); 781 780 782 /* now verify continuum grid is ok - first are all values but the last positive? */ 781 783 for( i=1; i<continuum.nStoredBands-1; ++i ) branches/c07.02_branch/source/cont_ffun.cpp
r1212 r1750 13 13 14 14 /*ReadTable called by TABLE READ to read in continuum from PUNCH TRANSMITTED CONTINUUM */ 15 static void ReadTable( FILE * io);15 static void ReadTable(const string& fnam); 16 16 17 17 double ffun(double anu) … … 306 306 307 307 /*ReadTable called by TABLE READ to read in continuum from PUNCH TRANSMITTED CONTINUUM */ 308 static void ReadTable( FILE * io)308 static void ReadTable(const string& fnam) 309 309 { 310 310 char chLine[INPUT_LINE_LENGTH]; … … 313 313 double Differ, 314 314 EnerLast; 315 FILE *io; 315 316 316 317 DEBUG_ENTRY( "ReadTable()" ); 317 318 318 319 /* make sure the file handle points somewhere */ 319 ASSERT( io != NULL ); 320 if( NULL == ( io = fopen(fnam.c_str(),"r") ) ) 321 { 322 fprintf( ioQQQ, " I could not open file %s.\n", fnam.c_str() ); 323 puts( "[Stop in ReadTable]" ); 324 cdEXIT(EXIT_FAILURE); 325 } 320 326 321 327 /* read in first line of header */ branches/c07.02_branch/source/hydrobranch.cpp
r792 r1750 61 61 62 62 ASSERT( !lgErr ); 63 64 fclose( io ); 63 65 64 66 DEBUG_EXIT( "t_hydrobranch()" ); branches/c07.02_branch/source/ion_recomb_Badnell.cpp
r1153 r1750 545 545 } 546 546 547 fclose( ioDATA ); 548 547 549 /*output coefficients for defined values for testing */ 548 550 # ifdef PRINT_DR branches/c07.02_branch/source/maincl.cpp
r843 r1750 329 329 /* cdDrive returned 1 if something bad happened, and 0 if everything is ok. We will 330 330 * return 0 if everything is ok, and 1 if something bad happened.*/ 331 return(lgBadExit);331 cdEXIT(lgBadExit); 332 332 } branches/c07.02_branch/source/optimize_phymir.cpp
r779 r1750 171 171 yp[0] = (float)optimize_func(xc); 172 172 wr_block(&yp[0],(size_t)sizeof(float),fnam1); 173 fclose( ioQQQ ); 173 174 cdEXIT(EXIT_SUCCESS); 174 175 } … … 293 294 yp[jj] = (float)optimize_func(xhlp); 294 295 wr_block(&yp[jj],(size_t)sizeof(float),fnam1); 296 fclose( ioQQQ ); 295 297 cdEXIT(EXIT_SUCCESS); 296 298 } branches/c07.02_branch/source/parse.h
r732 r1750 34 34 void PunchFilesInit(void); 35 35 36 /**close all open punch files */ 37 void ClosePunchFiles(void); 36 /**close all open punch files 37 \param lgFinal - close ALL files, regardless of "no clobber" status 38 */ 39 void ClosePunchFiles( bool lgFinal ); 38 40 39 41 /**ParseAge - parse the age command */ branches/c07.02_branch/source/parse_punch.cpp
r1289 r1750 2457 2457 /*ClosePunchFiles close all punch files. 2458 2458 * NB - KEEP THIS ROUTINE SYNCHED UP WITH THE PREVIOUS ONE, PunchFilesInit */ 2459 void ClosePunchFiles( void)2459 void ClosePunchFiles( bool lgFinal ) 2460 2460 { 2461 2461 long int i; … … 2468 2468 for( i=0; i < punch.npunch; i++ ) 2469 2469 { 2470 if( punch.ipPnunit[i] != NULL && !lgNoClobber[i] ) 2470 /* if lgFinal is true, we close everything, no matter what. 2471 * this means ignoring "no clobber" options */ 2472 if( punch.ipPnunit[i] != NULL && ( !lgNoClobber[i] || lgFinal ) ) 2471 2473 { 2472 2474 fclose( punch.ipPnunit[i] ); … … 2481 2483 punch.lgPunConv = false; 2482 2484 } 2483 if( punch.ipDRout != NULL && !lgDROn_noclobber )2485 if( punch.ipDRout != NULL && !lgDROn_noclobber ) 2484 2486 { 2485 2487 fclose( punch.ipDRout ); … … 2487 2489 punch.lgDROn = false; 2488 2490 } 2489 if( punch.ipPoint != NULL && !lgPunPoint_noclobber )2491 if( punch.ipPoint != NULL && !lgPunPoint_noclobber ) 2490 2492 { 2491 2493 fclose( punch.ipPoint ); branches/c07.02_branch/source/parse_table.cpp
r1098 r1750 236 236 /*fprintf(ioQQQ,"\n");*/ 237 237 238 fclose( ioFILE ); 239 238 240 { 239 241 /* change following to true to print their original table */ … … 1052 1054 } 1053 1055 1054 /* now open this file */ 1055 if( NULL==(rfield.ioTableRead[rfield.nspec]=fopen( chFile,"r"))) 1056 { 1057 fprintf( ioQQQ, " I could not open file %s.\n",chFile ); 1058 puts( "[Stop in ParseTable]" ); 1059 cdEXIT(EXIT_FAILURE); 1060 } 1056 /* store file name for later reading */ 1057 rfield.ioTableRead[rfield.nspec] = string( chFile ); 1061 1058 1062 1059 /* set flag saying really just read in continuum exactly as punched */ … … 1075 1072 DEBUG_EXIT( "ParseTable()" ); 1076 1073 return; 1077 1078 1074 } 1079 1075 branches/c07.02_branch/source/rfield.h
r1226 r1750 294 294 295 295 /** pointer to file for table read command */ 296 FILE *ioTableRead[LIMSPC];296 string ioTableRead[LIMSPC]; 297 297 298 298 /** these are total numbers of photons over various energy ranges */ branches/c07.02_branch/source/zero.cpp
r1286 r1750 1388 1388 rfield.range[i][0] = HIONPOT; 1389 1389 rfield.range[i][1] = rfield.egamry; 1390 rfield.ioTableRead[i] = NULL;1390 rfield.ioTableRead[i].clear(); 1391 1391 } 1392 1392 rfield.comtot = 0.; branches/c07.02_branch/tsuite/auto/blr_kk81.in
r805 r1750 73 73 // >>chng 05 mar 12, from 54.6 to 56.9 RP merge He-like code 74 74 // >>chng 06 jul 18, from 56.9 to 51.9, RP major upgrade VS coll strengths 75 assert line "Ba C" 0 51.9 75 // >>chng 08 jan 20, from 51.9 to 49.3, bugfix stark broadening incorrect (r1471) 76 assert line "Ba C" 0 49.3 76 77 // 77 78 // >>chng 01 aug 17, from 37.6 to 35.7, slow drift in results branches/c07.02_branch/tsuite/auto/blr_rnfa.in
r1088 r1750 64 64 // >>chng 04 dec 08, from 1.62 to 1.46 co-ion feedback, check converg 65 65 // >>chng 05 oct 01, from 1.46 to 1.52, drift down 66 assert line "H 1" 1.875m 1.52 66 // >>chng 08 jan 20, from 1.52 to 1.59, bugfix stark broadening incorrect 67 assert line "H 1" 1.875m 1.59 67 68 // 68 69 // >>chng 00 oct 03, from 12.1 to 12.86 rebin uv continuum H- opacity bug branches/c07.02_branch/tsuite/auto/blr_rnfb.in
r1471 r1750 233 233 // >>chng 04 jul 03, from 1.55 to 1.39, NA update H, Co chem net 234 234 // >>chng 06 jul 18, from 1.39 to 1.58 RP major upgrade VS coll strengths 235 assert line "6lev" 1304 1.58, err 0.1 235 // >>chng 08 jan 20, from 1.58 to 1.43, drift down 236 assert line "6lev" 1304 1.43, err 0.1 236 237 // 237 238 // >>chng 01 jun 15, from 1.90 to 1.72, H ct network chng
