00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #include "mf15classes.hpp"
00039 #include "endl_formats.hpp"
00040
00041 extern ENDLClass ENDL;
00042
00043
00044
00045 void MF15_list::read_data( mf15_file& inFile )
00046
00047
00048 {
00049 int ZA;
00050 double AWR;
00051 int LF;
00052 int NC;
00053 int NR;
00054 int NP;
00055
00056
00057 inFile.read_line1(&ZA, &AWR, &NC);
00058 if(NC > 1)
00059 {
00060 Unimplemented("MF15_list::read_data","Implement multiple subsections for mf15");
00061 }
00062
00063
00064 inFile.weight_line(&LF, &NR, &NP);
00065 if(LF != 1)
00066 {
00067 SevereError("MF15_list::read_data",
00068 pastenum("Implement model LF: ",LF)+" in mf15");
00069 }
00070
00071
00072 inFile.get_regions(NR, weights.NBT, weights.INT);
00073
00074
00075 weights.read_data( NP, inFile, ENDL.Max_E_in );
00076
00077
00078 inFile.E_in_interp(&NR, &NP);
00079 inFile.get_regions(NR, NBT, INT);
00080
00081
00082 bool done = false;
00083
00084
00085 for(int count = 0; count < NP; ++count)
00086 {
00087 one_e_dist( inFile, &done );
00088 }
00089
00090
00091 set_interp();
00092
00093 if((NR > 1) || (INT[0] != 2))
00094 {
00095 table_interp( );
00096 }
00097
00098
00099 two_d_iterator last_link = end( );
00100 --last_link;
00101 if( last_link->E_in( ) > ENDL.Max_E_in )
00102 {
00103 chop_highE( ENDL.Max_E_in );
00104 }
00105 }
00106
00107
00108 void MF15_list::one_e_dist( mf15_file& inFile, bool *done )
00109
00110
00111
00112 {
00113 string linebuff;
00114 string strbuff;
00115
00116
00117 int NR;
00118 int NP;
00119 double E_in;
00120 two_d_iterator e_in_link;
00121
00122 inFile.get_E_in( &E_in, &NR, &NP );
00123 E_in *= ENDL.eV2MeV;
00124
00125
00126 one_d_table new_link;
00127 if( !(*done) )
00128 {
00129 insert(end(), new_link);
00130 e_in_link = end();
00131 --e_in_link;
00132 e_in_link->E_in( ) = E_in;
00133 inFile.get_regions(NR, e_in_link->NBT, e_in_link->INT);
00134 }
00135 else
00136 {
00137 inFile.get_regions(NR, new_link.NBT, new_link.INT);
00138 }
00139
00140
00141 for( int iNP=0; iNP < NP; iNP++ )
00142 {
00143 double E_out;
00144 double Prob;
00145
00146 int iP=iNP % 3;
00147 if ( iP == 0 ) getline( inFile, linebuff);
00148 strbuff = linebuff.substr(iP*22, 22);
00149 read_dd(&strbuff, &E_out, &Prob );
00150 if ( E_out==-999.0 || Prob==-999.0 )
00151 {
00152 SevereError("MF15_list::one_e_dist","read_PAIR messed up!");
00153 }
00154 else if( !(*done) )
00155 {
00156 E_out *= ENDL.eV2MeV;
00157 dd_link XYdata(E_out, Prob);
00158 e_in_link->insert(e_in_link->end(), XYdata);
00159 }
00160 }
00161 if( !(*done) )
00162 {
00163
00164 e_in_link->expand_interp( ENDL.Max_E_out );
00165 e_in_link->widen_jumps();
00166 e_in_link->renorm();
00167
00168 double dE = ENDL_EPSILON( ENDL.Max_E_in );
00169 if( E_in > ENDL.Max_E_in - dE )
00170 {
00171 *done = true;
00172 }
00173 }
00174 }