Changeset 1701 for branches/newmole/source
- Timestamp:
- 12/20/07 05:42:46 (11 months ago)
- Location:
- branches/newmole/source
- Files:
-
- 9 removed
- 100 modified
- 40 copied
-
assert_results.cpp (modified) (4 diffs)
-
atmdat_2photon.cpp (modified) (1 diff)
-
atmdat_adfa.cpp (modified) (2 diffs)
-
atmdat_char_tran.cpp (modified) (1 diff)
-
atmdat_chianti.cpp (modified) (7 diffs)
-
atmdat_lamda.cpp (modified) (1 diff)
-
atmdat_readin.cpp (modified) (4 diffs)
-
atom_feii.cpp (modified) (1 diff)
-
atom_hyperfine.cpp (modified) (1 diff)
-
cddefines.h (modified) (13 diffs)
-
cddrive.cpp (modified) (2 diffs)
-
cdinit.cpp (modified) (1 diff)
-
cloudy.cpp (modified) (1 diff)
-
cont_createpointers.cpp (modified) (6 diffs)
-
cont_gaunt.cpp (modified) (1 diff)
-
cont_setintensity.cpp (modified) (2 diffs)
-
conv_base.cpp (modified) (3 diffs)
-
conv_init_solution.cpp (modified) (4 diffs)
-
cool_eval.cpp (modified) (3 diffs)
-
date.h (modified) (1 diff)
-
gcc (deleted)
-
gcc_shared (deleted)
-
gprof (deleted)
-
grains.cpp (modified) (76 diffs)
-
grains.h (modified) (2 diffs)
-
grains_qheat.cpp (modified) (6 diffs)
-
grainvar.h (modified) (20 diffs)
-
grid_do.cpp (modified) (1 diff)
-
heat_sum.cpp (modified) (4 diffs)
-
helike_create.cpp (deleted)
-
helike_cs.cpp (modified) (6 diffs)
-
helike_einsta.cpp (modified) (11 diffs)
-
helike_energy.cpp (copied) (copied from trunk/source/helike_energy.cpp)
-
hydrobranch.cpp (deleted)
-
hydrocollid.cpp (modified) (35 diffs)
-
hydrogenic.h (modified) (3 diffs)
-
hydrolevel.cpp (modified) (6 diffs)
-
hydrot2low.cpp (modified) (2 diffs)
-
hydro_vs_rates.cpp (modified) (10 diffs)
-
hydro_vs_rates.h (modified) (2 diffs)
-
IBMxSeries (deleted)
-
icc (deleted)
-
include (copied) (copied from trunk/source/include)
-
init_coreload.cpp (modified) (3 diffs)
-
init_coreload_postparse.cpp (modified) (1 diff)
-
init_defaults_preparse.cpp (modified) (2 diffs)
-
ion_iron.cpp (modified) (2 diffs)
-
ion_recomb_Badnell.cpp (modified) (9 diffs)
-
iso.h (modified) (3 diffs)
-
iso_collide.cpp (modified) (4 diffs)
-
iso_continuum_lower.cpp (modified) (4 diffs)
-
iso_cool.cpp (modified) (3 diffs)
-
iso_create.cpp (modified) (23 diffs)
-
iso_level.cpp (modified) (8 diffs)
-
iso_photo.cpp (modified) (1 diff)
-
iso_radiative_recomb.cpp (modified) (18 diffs)
-
iso_solve.cpp (modified) (4 diffs)
-
iter_startend.cpp (modified) (4 diffs)
-
lib (copied) (copied from trunk/source/lib)
-
lines.h (modified) (1 diff)
-
lines_service.cpp (modified) (15 diffs)
-
lines_service.h (modified) (1 diff)
-
maincl.cpp (modified) (2 diffs)
-
Makefile (modified) (3 diffs)
-
mole_h2.cpp (modified) (11 diffs)
-
mole_h2_create.cpp (modified) (1 diff)
-
mole_h2_io.cpp (modified) (8 diffs)
-
nemala.cpp (modified) (1 diff)
-
nemala2.cpp (modified) (4 diffs)
-
opacity_addtotal.cpp (modified) (1 diff)
-
parse.h (modified) (1 diff)
-
parse_atom_iso.cpp (modified) (7 diffs)
-
parse_commands.cpp (modified) (15 diffs)
-
parse_compile.cpp (modified) (1 diff)
-
parse_crashdo.cpp (modified) (2 diffs)
-
parse_dont.cpp (modified) (1 diff)
-
parse_grain.cpp (modified) (6 diffs)
-
parse_interp.cpp (modified) (3 diffs)
-
parse_optimize.cpp (modified) (2 diffs)
-
parse_punch.cpp (modified) (13 diffs)
-
parse_set.cpp (modified) (4 diffs)
-
parse_stop.cpp (modified) (1 diff)
-
pgcc (deleted)
-
pgccBounds (deleted)
-
pressure_change.cpp (modified) (5 diffs)
-
pressure_total.cpp (modified) (8 diffs)
-
prt.cpp (modified) (1 diff)
-
prt_comment.cpp (modified) (3 diffs)
-
prt_linepres.cpp (modified) (4 diffs)
-
prt_lines_helium.cpp (modified) (9 diffs)
-
prt_lines_hydro.cpp (modified) (7 diffs)
-
prt_lines_lv1_li_ne.cpp (modified) (36 diffs)
-
prt_met.cpp (modified) (1 diff)
-
punch.h (modified) (1 diff)
-
punch_do.cpp (modified) (5 diffs)
-
punch_line.cpp (modified) (6 diffs)
-
punch_linedata.cpp (modified) (2 diffs)
-
punch_special.cpp (modified) (1 diff)
-
rt_diffuse.cpp (modified) (1 diff)
-
rt_line_all.cpp (modified) (4 diffs)
-
rt_line_one_tauinc.cpp (modified) (4 diffs)
-
rt_line_one_tau_reset.cpp (modified) (1 diff)
-
rt_ots.cpp (modified) (1 diff)
-
rt_stark.cpp (modified) (2 diffs)
-
rt_tau_inc.cpp (modified) (1 diff)
-
rt_tau_init.cpp (modified) (22 diffs)
-
rt_tau_reset.cpp (modified) (4 diffs)
-
sanity_check.cpp (modified) (1 diff)
-
sys_gcc (copied) (copied from trunk/source/sys_gcc)
-
sys_gcc/Makefile (copied) (copied from trunk/source/sys_gcc/Makefile)
-
sys_gcc/Makefile.conf (copied) (copied from trunk/source/sys_gcc/Makefile.conf)
-
sys_gcc/readme.txt (copied) (copied from trunk/source/sys_gcc/readme.txt)
-
sys_gcc/sourceme.txt (copied) (copied from trunk/source/sys_gcc/sourceme.txt)
-
sys_gcc_shared (copied) (copied from trunk/source/sys_gcc_shared)
-
sys_gcc_shared/cloudy.i (copied) (copied from trunk/source/sys_gcc_shared/cloudy.i)
-
sys_gcc_shared/comp4.pl (copied) (copied from trunk/source/sys_gcc_shared/comp4.pl)
-
sys_gcc_shared/Makefile.conf (copied) (copied from trunk/source/sys_gcc_shared/Makefile.conf)
-
sys_gcc_shared/readme.txt (copied) (copied from trunk/source/sys_gcc_shared/readme.txt)
-
sys_gcc_shared/sourceme.txt (copied) (copied from trunk/source/sys_gcc_shared/sourceme.txt)
-
sys_gprof (copied) (copied from trunk/source/sys_gprof)
-
sys_gprof/Makefile.conf (copied) (copied from trunk/source/sys_gprof/Makefile.conf)
-
sys_gprof/readme.txt (copied) (copied from trunk/source/sys_gprof/readme.txt)
-
sys_gprof/sourceme.txt (copied) (copied from trunk/source/sys_gprof/sourceme.txt)
-
sys_IBMxSeries (copied) (copied from trunk/source/sys_IBMxSeries)
-
sys_IBMxSeries/compileall.pl (copied) (copied from trunk/source/sys_IBMxSeries/compileall.pl)
-
sys_IBMxSeries/complinkmpi.dat (copied) (copied from trunk/source/sys_IBMxSeries/complinkmpi.dat)
-
sys_IBMxSeries/Makefile.conf (copied) (copied from trunk/source/sys_IBMxSeries/Makefile.conf)
-
sys_IBMxSeries/readme.txt (copied) (copied from trunk/source/sys_IBMxSeries/readme.txt)
-
sys_IBMxSeries/sourceme.txt (copied) (copied from trunk/source/sys_IBMxSeries/sourceme.txt)
-
sys_icc (copied) (copied from trunk/source/sys_icc)
-
sys_icc/Makefile.conf (copied) (copied from trunk/source/sys_icc/Makefile.conf)
-
sys_icc/readme.txt (copied) (copied from trunk/source/sys_icc/readme.txt)
-
sys_icc/sourceme.txt (copied) (copied from trunk/source/sys_icc/sourceme.txt)
-
sys_pgcc (copied) (copied from trunk/source/sys_pgcc)
-
sys_pgcc/Makefile.conf (copied) (copied from trunk/source/sys_pgcc/Makefile.conf)
-
sys_pgcc/readme.txt (copied) (copied from trunk/source/sys_pgcc/readme.txt)
-
sys_pgcc/sourceme.txt (copied) (copied from trunk/source/sys_pgcc/sourceme.txt)
-
sys_pgccBounds (copied) (copied from trunk/source/sys_pgccBounds)
-
sys_pgccBounds/crashBoundsAuto.in (copied) (copied from trunk/source/sys_pgccBounds/crashBoundsAuto.in)
-
sys_pgccBounds/crashBoundsStack.in (copied) (copied from trunk/source/sys_pgccBounds/crashBoundsStack.in)
-
sys_pgccBounds/Makefile.conf (copied) (copied from trunk/source/sys_pgccBounds/Makefile.conf)
-
sys_pgccBounds/readme.txt (copied) (copied from trunk/source/sys_pgccBounds/readme.txt)
-
sys_pgccBounds/sourceme.txt (copied) (copied from trunk/source/sys_pgccBounds/sourceme.txt)
-
taulines.h (modified) (1 diff)
-
temp_change.cpp (modified) (4 diffs)
-
TestMain.cpp (copied) (copied from trunk/source/TestMain.cpp)
-
TestMultiArr.cpp (copied) (copied from trunk/source/TestMultiArr.cpp)
-
thirdparty.h (modified) (2 diffs)
-
zero.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/newmole/source/assert_results.cpp
r1610 r1701 833 833 } 834 834 835 /* assert grain potential */ 836 else if( nMatch( "GRAI", input.chCARDCAPS ) && nMatch( "POTE", input.chCARDCAPS ) ) 837 { 838 /* this flag will mean grain potential */ 839 strcpy( chAssertType[nAsserts] , "gp" ); 840 /* a label */ 841 strcpy( chAssertLineLabel[nAsserts], "GPot" ); 842 /* now get the first number on the line */ 843 i = 5; 844 /* grain bin number */ 845 wavelength[nAsserts] = (realnum)FFmtRead(input.chCARDCAPS ,&i, INPUT_LINE_LENGTH,&lgEOL); 846 /* the potential itself, in volt, always linear */ 847 AssertQuantity[nAsserts] = FFmtRead(input.chCARDCAPS ,&i, INPUT_LINE_LENGTH,&lgEOL); 848 849 if( lgEOL ) 850 { 851 NoNumb(input.chOrgCard); 852 } 853 854 /* optional error, default available (cannot do before loop since we 855 * do not know how many numbers are on line */ 856 AssertError[nAsserts] = FFmtRead(input.chCARDCAPS ,&i, INPUT_LINE_LENGTH,&lgEOL); 857 858 if( lgEOL ) 859 { 860 /* default error was set in define above */ 861 AssertError[nAsserts] = DEF_ERROR; 862 } 863 } 864 835 865 /* assert mean temperature, assert temperature hydrogen 2 8000 */ 836 866 else if( nMatch("TEMP",input.chCARDCAPS ) ) … … 857 887 /* grains, copy 4-char string "grai" 858 888 * into array that will be used to get temperature after calculation */ 859 strcpy( chAssertLineLabel[nAsserts], "G RAI" );889 strcpy( chAssertLineLabel[nAsserts], "GTem" ); 860 890 /* this is to make sure that pointer to grain type is valid, we check 861 891 * that it is less than this below */ … … 2092 2122 2093 2123 /* options are average Te for ion, temp at ill face, or temp for grain */ 2094 if( strcmp( chAssertLineLabel[i], "G RAI" ) == 0 )2124 if( strcmp( chAssertLineLabel[i], "GTem" ) == 0 ) 2095 2125 { 2096 2126 long nd; … … 2141 2171 PredQuan[i] = relint; 2142 2172 RelError[i] = 1. - PredQuan[i]/AssertQuantity[i]; 2173 } 2174 2175 /* this would be grain potential in volt */ 2176 else if( strcmp( chAssertType[i], "gp" ) == 0 ) 2177 { 2178 /* the minus one is because the grain types are counted from one, 2179 * but stuffed into the c array, that counts from zero */ 2180 long nd = (long)(wavelength[i]-1); 2181 if( nd < 0 || nd >= gv.nBin ) { 2182 fprintf( ioQQQ, "Illegal grain number found: %g\n" , wavelength[i] ); 2183 fprintf( ioQQQ, "Use 1 for first grain that is turned on, " ); 2184 fprintf( ioQQQ, "2 for second, etc....\n" ); 2185 fprintf( ioQQQ, "Old style grain numbers are not valid anymore !!\n" ); 2186 puts( "[Stop in ParseAssertResults]" ); 2187 cdEXIT(EXIT_FAILURE); 2188 } 2189 2190 /* get average grain potential in volt, always averaged over radius */ 2191 PredQuan[i] = gv.bin[nd]->avdpot/radius.depth_x_fillfac; 2192 /* actually absolute error, potential can be zero! */ 2193 RelError[i] = AssertQuantity[i] - PredQuan[i]; 2143 2194 } 2144 2195 -
branches/newmole/source/atmdat_2photon.cpp
r1610 r1701 311 311 long int i, 312 312 limit; 313 double SponRate; 314 315 double s1, s2, t1, t2, t3, p; 316 313 realnum SponRate, s1, s2, t1, t2, t3, p; 314 317 315 DEBUG_ENTRY( "atmdat_2phot_rate()" ); 318 316 -
branches/newmole/source/atmdat_adfa.cpp
r1610 r1701 5 5 #include "physconst.h" 6 6 #include "atmdat.h" 7 #include "iso.h" 7 8 8 9 /** constructor: read in all the ADfA data files */ … … 945 946 ASSERT( ipLo < ipHi ); 946 947 947 if( ipHi <= 2 ) /* n = 1,2 */ 948 { 949 ASSERT( ipLo < 1 ); 950 } 951 else if( ipHi <= 5 ) /* n = 3 */ 952 { 953 ASSERT( ipLo < 3 ); 954 } 955 else if( ipHi <= 9 ) /* n = 4 */ 956 { 957 ASSERT( ipLo < 6 ); 958 } 959 else if( ipHi <= 14 ) /* n = 5 */ 960 { 961 ASSERT( ipLo < 10 ); 962 } 963 else 964 TotalInsanity(); 948 long ipISO = ipH_LIKE; 949 long nelem = ipHYDROGEN; 950 ASSERT( N_(ipLo) < N_(ipHi) ); 951 ASSERT( N_(ipHi) <= 5 ); 965 952 966 953 rate = HCS[ipHi-1][ipLo][ipTe]; -
branches/newmole/source/atmdat_char_tran.cpp
r1687 r1701 434 434 atmdat.HeCharExcRecTo[ipOXYGEN][3] = 6e-10; 435 435 436 /* ionization */ 437 /* O0 + He+ => O+ + He0 */ 438 /* >>refer O0 CT Zhao et al., ApJ, 615, 1063 */ 439 atmdat.HeCharExcIonOf[ipOXYGEN][0] = 440 4.991E-15 * pow( phycon.te / 1e4, 0.3794 )* sexp( phycon.te/1.121E6 ) + 441 2.780E-15 * pow( phycon.te / 1e4, -0.2163 )* exp( -1. * MIN2(1e7, phycon.te)/(-8.158E5) ); 442 436 443 /* neon */ 437 444 /* recombination */ -
branches/newmole/source/atmdat_chianti.cpp
r1610 r1701 15 15 DEBUG_ENTRY( "atmdat_Chianti_readin()" ); 16 16 17 int intCS,intCollIndex = -10000, 18 intLineCount,intsplinepts,intTranType,intxs; 17 int intCS,intCollIndex = -10000,intsplinepts,intTranType,intxs; 19 18 /* type is set to 0 for non chianti and 1 for chianti*/ 20 long int i,j,nMolLevs,intrtct, 21 intCollTran,intcollindex, 22 ipLo,ipHi,intAtomicNo,intIonStage; 23 /*intrtct refers to radiative transitions count*/ 24 FILE *atmolLevDATA , *atmolTraDATA=NULL,*atmolEleColDATA=NULL,*atmolProColDATA=NULL; 19 long int i,j,nMolLevs,intCollTran,intcollindex,ipLo,ipHi; 20 FILE *atmolLevDATA , *atmolTraDATA=NULL,*atmolEleColDATA=NULL; 25 21 realnum fstatwt,fenergyK,fenergyWN,fWLAng,fenergy,feinsteina; 26 22 double fScalingParam,fEnergyDiff,fGF,*xs,*spl,*spl2; … … 45 41 long int *intNewIndex=NULL,*intOldIndex=NULL; 46 42 int interror; 47 bool lg ProtonData=false,lgEneLevOrder;43 bool lgEneLevOrder; 48 44 49 45 /*This is to identify where the fields start */ … … 192 188 if( trace.lgTrace ) 193 189 fprintf( ioQQQ," moldat_readin opening %s:",chFilename); 194 /*We will set a flag here to indicate if the proton collision strengths are available */195 if( ( atmolProColDATA = fopen( chProColFilename , "r" ) ) != NULL )196 {197 lgProtonData = true;198 }199 else200 {201 lgProtonData = false;202 }203 190 204 191 nMolLevs = 0; 205 intrtct = 0;206 192 lgEneLevOrder = true; 207 193 while( read_whole_line( chLine , (int)sizeof(chLine) , atmolLevDATA ) != NULL ) … … 242 228 atmolTrans[intNS][ipHi][ipLo].Lo = &atmolStates[intNS][ipLo]; 243 229 atmolTrans[intNS][ipHi][ipLo].Hi = &atmolStates[intNS][ipHi]; 244 atmolTrans[intNS][ipHi][ipLo].Emis = NULL;230 atmolTrans[intNS][ipHi][ipLo].Emis = &DummyEmis; 245 231 } 246 232 } … … 436 422 fWLAng = (realnum)atof(&chLine[WOTS]); 437 423 438 fixit(); 439 /* Chianti labels the H 1 2-photon transition as z wavelength of zero. 424 /* \todo 2 Chianti labels the H 1 2-photon transition as z wavelength of zero. 440 425 * Should we just ignore all of the wavelengths in this file and use the 441 426 * difference of level energies instead. */ … … 541 526 /*Dummy string used for convenience*/ 542 527 strcpy(chLine,"A"); 543 intLineCount = 0;544 528 545 529 if(read_whole_line( chLine , (int)sizeof(chLine) ,atmolEleColDATA ) == NULL ) … … 563 547 bool lgEOL; 564 548 565 intAtomicNo = (long)FFmtRead( chLine, &i, sizeof(chLine), &lgEOL );566 intIonStage = (long)FFmtRead( chLine, &i, sizeof(chLine), &lgEOL );549 (void)FFmtRead( chLine, &i, sizeof(chLine), &lgEOL ); // intAtomicNo 550 (void)FFmtRead( chLine, &i, sizeof(chLine), &lgEOL ); // intIonStage 567 551 /* level indices */ 568 552 ipLo = (long)FFmtRead( chLine, &i, sizeof(chLine), &lgEOL ) - 1; -
branches/newmole/source/atmdat_lamda.cpp
r1610 r1701 127 127 atmolTrans[intNS][ipHi][ipLo].Lo = &atmolStates[intNS][ipLo]; 128 128 atmolTrans[intNS][ipHi][ipLo].Hi = &atmolStates[intNS][ipHi]; 129 atmolTrans[intNS][ipHi][ipLo].Emis = NULL;129 atmolTrans[intNS][ipHi][ipLo].Emis = &DummyEmis; 130 130 } 131 131 } -
branches/newmole/source/atmdat_readin.cpp
r1653 r1701 383 383 TauLines[i].Hi = AddState2Stack(); 384 384 TauLines[i].Lo = AddState2Stack(); 385 TauLines[i].Emis = AddLine2Stack( );385 TauLines[i].Emis = AddLine2Stack( true ); 386 386 } 387 387 … … 602 602 TauLine2[i].Hi = AddState2Stack(); 603 603 TauLine2[i].Lo = AddState2Stack(); 604 TauLine2[i].Emis = AddLine2Stack( );604 TauLine2[i].Emis = AddLine2Stack( true ); 605 605 } 606 606 … … 937 937 UTALines[i].Hi = AddState2Stack(); 938 938 UTALines[i].Lo = AddState2Stack(); 939 UTALines[i].Emis = AddLine2Stack( );939 UTALines[i].Emis = AddLine2Stack( true ); 940 940 } 941 941 … … 1411 1411 C12O16Rotate[J].Hi = AddState2Stack(); 1412 1412 C12O16Rotate[J].Lo = AddState2Stack(); 1413 C12O16Rotate[J].Emis = AddLine2Stack( );1413 C12O16Rotate[J].Emis = AddLine2Stack( true ); 1414 1414 1415 1415 TransitionJunk( &C13O16Rotate[J] ); 1416 1416 C13O16Rotate[J].Hi = AddState2Stack(); 1417 1417 C13O16Rotate[J].Lo = AddState2Stack(); 1418 C13O16Rotate[J].Emis = AddLine2Stack( );1418 C13O16Rotate[J].Emis = AddLine2Stack( true ); 1419 1419 } 1420 1420 -
branches/newmole/source/atom_feii.cpp
r1610 r1701 406 406 407 407 Fe2LevN[ipHi][ipLo].Hi = Fe2LevN[ipHi][0].Hi; 408 Fe2LevN[ipHi][ipLo].Emis = AddLine2Stack( );408 Fe2LevN[ipHi][ipLo].Emis = AddLine2Stack( true ); 409 409 } 410 410 } -
branches/newmole/source/atom_hyperfine.cpp
r1610 r1701 419 419 HFLines[i].Hi = AddState2Stack(); 420 420 HFLines[i].Lo = AddState2Stack(); 421 HFLines[i].Emis = AddLine2Stack( );421 HFLines[i].Emis = AddLine2Stack( true ); 422 422 } 423 423 -
branches/newmole/source/cddefines.h
r1610 r1701 839 839 // ARPA_TYPE: arrays of pointers to arrays ... 840 840 // C_TYPE: row-major order, exactly as used in C (last index runs fastest) 841 typedef enum { ARPA_TYPE, C_TYPE, GEN_TYPE, ML_TOP } mem_layout;841 typedef enum { ARPA_TYPE, C_TYPE, FLX_TYPE, ML_TOP } mem_layout; 842 842 843 843 // magic numbers to identify each memory layout … … 1398 1398 { 1399 1399 if( _ptr != NULL ) 1400 free(_
