Changeset 1988
- Timestamp:
- 04/29/08 14:19:04 (2 weeks ago)
- Files:
-
- trunk/source/assert_results.cpp (modified) (5 diffs)
- trunk/source/rt_line_one.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/source/assert_results.cpp
r1970 r1988 1924 1924 if( nISOCaseB == ipH_LIKE ) 1925 1925 { 1926 fprintf(ioQQQ," Species nHi nLo Wl Computed Asserted error\n");1926 fprintf(ioQQQ," Species nHi nLo Wl Computed Asserted error\n"); 1927 1927 /* limit of 10 is because that is all we printed and saved in prt_lines_hydro */ 1928 1928 for( long int ipLo=1+iCase; ipLo< MIN2(10,nHighestPrinted-1); ++ipLo ) … … 1946 1946 absint = pow( 10., absint ); 1947 1947 error = (CBabsint - absint)/MAX2(CBabsint , absint); 1948 fprintf(ioQQQ,"ChkAssert %s %3li %3li ", 1948 double RelativeError = fabs(error) / AssertError[i]; 1949 /* start of line, flag problems */ 1950 if( RelativeError < 1. ) 1951 { 1952 if( RelativeError < 0.25 ) 1953 { 1954 fprintf( ioASSERT, " ChkAssert "); 1955 } 1956 else if( RelativeError < 0.50 ) 1957 { 1958 fprintf( ioASSERT, " ChkAssert - "); 1959 } 1960 else if( RelativeError < 0.75 ) 1961 { 1962 fprintf( ioASSERT, " ChkAssert -- "); 1963 } 1964 else if( RelativeError < 0.90 ) 1965 { 1966 fprintf( ioASSERT, " ChkAssert --- "); 1967 } 1968 else if( RelativeError < 0.95 ) 1969 { 1970 fprintf( ioASSERT, " ChkAssert ---- "); 1971 } 1972 else if( RelativeError < 0.98 ) 1973 { 1974 fprintf( ioASSERT, " ChkAssert ----- "); 1975 } 1976 else 1977 { 1978 fprintf( ioASSERT, " ChkAssert ------ "); 1979 } 1980 1981 } 1982 else 1983 { 1984 fprintf( ioASSERT, " ChkAssert botch>>"); 1985 } 1986 fprintf(ioQQQ," %s %3li %3li ", 1949 1987 chElemLabelCaseB , ipHi , ipLo ); 1950 1988 prt_wl(ioQQQ, wl ); … … 1973 2011 else if( nISOCaseB == ipHE_LIKE ) 1974 2012 { 2013 if( !dense.lgElmtOn[ipHELIUM] ) 2014 { 2015 fprintf(ioQQQ,"DISASTER assert case B for a He is requested but He is not " 2016 "included.\n"); 2017 fprintf(ioQQQ,"Do not turn off He is you want to assert its spectrum.\n"); 2018 cdEXIT(EXIT_FAILURE); 2019 } 1975 2020 # define N_CASEB_HEI 11 1976 2021 realnum CaseBWlHeI[N_CASEB_HEI]= … … 1978 2023 4026.f, 6678.f, 4922.f }; 1979 2024 /* do He I as special case */ 1980 fprintf(ioQQQ," SpeciesWl Computed Asserted error\n");2025 fprintf(ioQQQ," Wl Computed Asserted error\n"); 1981 2026 for( long int ipLine=0; ipLine< N_CASEB_HEI ; ++ipLine ) 1982 2027 { … … 1991 2036 absint = pow( 10., absint ); 1992 2037 error = (CBabsint - absint)/MAX2(CBabsint , absint); 1993 fprintf(ioQQQ,"ChkAssert %s ", 1994 chElemLabelCaseB ); 2038 double RelativeError = fabs(error) / AssertError[i]; 2039 /* start of line, flag problems */ 2040 if( RelativeError < 1. ) 2041 { 2042 if( RelativeError < 0.25 ) 2043 { 2044 fprintf( ioASSERT, " ChkAssert "); 2045 } 2046 else if( RelativeError < 0.50 ) 2047 { 2048 fprintf( ioASSERT, " ChkAssert - "); 2049 } 2050 else if( RelativeError < 0.75 ) 2051 { 2052 fprintf( ioASSERT, " ChkAssert -- "); 2053 } 2054 else if( RelativeError < 0.90 ) 2055 { 2056 fprintf( ioASSERT, " ChkAssert --- "); 2057 } 2058 else if( RelativeError < 0.95 ) 2059 { 2060 fprintf( ioASSERT, " ChkAssert ---- "); 2061 } 2062 else if( RelativeError < 0.98 ) 2063 { 2064 fprintf( ioASSERT, " ChkAssert ----- "); 2065 } 2066 else 2067 { 2068 fprintf( ioASSERT, " ChkAssert ------ "); 2069 } 2070 2071 } 2072 else 2073 { 2074 fprintf( ioASSERT, " ChkAssert botch>>"); 2075 } 1995 2076 prt_wl(ioQQQ, wl ); 1996 2077 fprintf(ioQQQ," %.2e %.2e %10.3f", trunk/source/rt_line_one.cpp
r1987 r1988 294 294 fprintf(ioQQQ,"DEBUG hit it \n"); 295 295 }*/ 296 ASSERT( t->Emis->damp >= 0. ); 296 ASSERT( t->Emis->damp > 0. || 297 (opac.lgCaseB && t->Emis->damp >= 0.) ); 297 298 298 299 /* static solution - which type of line will determine
