00001
00002
00003
00004
00005
00006
00007 #include "cddefines.h"
00008 #include "optimize.h"
00009 #include "parse.h"
00010 #include "dense.h"
00011 #include "hcmap.h"
00012 #include "h2.h"
00013 #include "version.h"
00014 #include "hextra.h"
00015 #include "mole.h"
00016 #include "extinc.h"
00017 #include "heavy.h"
00018 #include "grid.h"
00019 #include "ionbal.h"
00020 #include "iso.h"
00021 #include "taulines.h"
00022
00023
00024
00025
00026 #include "predcont.h"
00027
00028
00029
00030
00031
00032
00033
00034 realnum EnrPredCont[NPREDCONT] = {
00035
00036 2.680e-06f
00037 , 7.445e-04f
00038 , 1.498e-03f
00039 , 2.211e-03f
00040 , 2.952e-03f
00041 , 3.677e-03f
00042 , 3.7501e-03f
00043 , 3.9915e-03f
00044 , 4.2543e-03f
00045 , 4.314e-03f
00046 , 4.6446e-03f
00047 , 5.162e-03f
00048 , 5.2462e-03f
00049 , 5.8079e-03f
00050 , 6.240e-03f
00051
00052 , 7.3312e-03f
00053 , 7.9936e-03f
00054 , 8.7119e-03f
00055 , 9.6125e-03f
00056 , 9.77243e-03f
00057 , 1.1099e-02f
00058 , 1.2022e-02f
00059 , 1.29253e-02f
00060 , 2.2152e-02f
00061 , 3.92044e-02f
00062 , 5.54593e-02f
00063
00064
00065 , 6.1563e-02f
00066 , 6.3437e-02f
00067 , 8.1460e-02f
00068
00069
00070 , 0.1094f
00071 , 0.1128f
00072 , 0.14675f
00073 , 0.18653f
00074
00075
00076 , 0.246f
00077 , 0.254f
00078 , 0.375f
00079 , 0.38096f
00080 , 0.43994f
00081 , 0.44394f
00082 , 0.50811f
00083 , 0.57489f
00084 , 0.62487f
00085 , 0.67155f
00086 , 0.70244f
00087 , 0.72163f
00088 , 0.74812f
00089 , 0.76172f
00090 , 0.77551f
00091 , 0.79681f
00092 , 0.81859f
00093 , 0.8260f
00094 , 0.84859f
00095 , 0.85618f
00096 , 0.87967f
00097 , 0.911267f
00098
00099
00100
00101
00102
00103 , 0.985f
00104 , 1.015f
00105 , 1.199f
00106 , 1.299f
00107 , 1.4984f
00108 , 1.58441f
00109
00110
00111
00112
00113
00114 , 1.780f
00115 , 1.834f
00116 , 2.283f
00117 };
00118
00119 long int ipPredCont[NPREDCONT];
00120
00121
00122
00123
00124
00125 void InitCoreload( void )
00126 {
00127 static int nCalled=0;
00128 long int nelem;
00129
00130 DEBUG_ENTRY( "InitCoreload()" );
00131
00132
00133 if( nCalled )
00134 {
00135
00136 return;
00137 }
00138 ++nCalled;
00139
00140
00141
00142
00143 nSimThisCoreload = 0;
00144
00145 strncpy( chOptimFileName , "optimal.in" , sizeof( chOptimFileName ) );
00146
00147
00148 extinc.cnst_col2optdepth = 6.22e-18f;
00149
00150 extinc.cnst_power = -2.43f;
00151
00152 hcmap.lgMapOK = true;
00153 hcmap.lgMapDone = false;
00154
00155
00156 hcmap.nMapAlloc = 0;
00157 hcmap.nmap = 0;
00158 hcmap.lgMapBeingDone = false;
00159
00160
00161 strncpy( chOptimFileName , "optimal.in" , sizeof( chOptimFileName ) );
00162
00163
00164 long int nCom[LIMELM] =
00165 {
00166 1 , 2 ,
00167 1 , 2 ,
00168 1 , 2 , 3 , 4 , 5 , 6 ,
00169 1 , 2 ,
00170 1 , 2 , 3 , 4 , 5 , 6 ,
00171 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ,
00172 1 , 2 ,
00173 1 , 2
00174 };
00175
00176 for( nelem=ipHYDROGEN; nelem<LIMELM; ++nelem )
00177 {
00178 ionbal.nCompRecoilElec[nelem] = nCom[nelem];
00179 }
00180
00181
00182 strcpy( Heavy.chShell[0], "1s" );
00183 strcpy( Heavy.chShell[1], "2s" );
00184 strcpy( Heavy.chShell[2], "2p" );
00185 strcpy( Heavy.chShell[3], "3s" );
00186 strcpy( Heavy.chShell[4], "3p" );
00187 strcpy( Heavy.chShell[5], "3d" );
00188 strcpy( Heavy.chShell[6], "4s" );
00189
00190
00191
00192 for( nelem=ipHYDROGEN; nelem < LIMELM; ++nelem )
00193 {
00194 iso.n_HighestResolved_max[ipH_LIKE][nelem] = 5;
00195 iso.nCollapsed_max[ipH_LIKE][nelem] = 2;
00196 }
00197
00198 iso.n_HighestResolved_max[ipH_LIKE][ipHYDROGEN] = 10;
00199 iso.n_HighestResolved_max[ipH_LIKE][ipHELIUM] = 10;
00200
00201 iso.nCollapsed_max[ipH_LIKE][ipHYDROGEN] = 15;
00202 iso.nCollapsed_max[ipH_LIKE][ipHELIUM] = 15;
00203
00204
00205
00206 iso.n_HighestResolved_max[ipHE_LIKE][ipHYDROGEN] = -LONG_MAX;
00207 iso.numLevels_max[ipHE_LIKE][ipHYDROGEN] = -LONG_MAX;
00208 iso.numPrintLevels[ipHE_LIKE][ipHYDROGEN] = -LONG_MAX;
00209 iso.nCollapsed_max[ipHE_LIKE][ipHYDROGEN] = -LONG_MAX;
00210
00211 for( nelem=ipHELIUM; nelem < LIMELM; ++nelem )
00212 {
00213
00214 iso.n_HighestResolved_max[ipHE_LIKE][nelem] = 3;
00215 iso.nCollapsed_max[ipHE_LIKE][nelem] = 1;
00216 }
00217
00218 iso.n_HighestResolved_max[ipHE_LIKE][ipHELIUM] = 6;
00219 iso.nCollapsed_max[ipHE_LIKE][ipHELIUM] = 20;
00220
00221
00222 iso.n_HighestResolved_max[ipHE_LIKE][ipCARBON] = 5;
00223 iso.n_HighestResolved_max[ipHE_LIKE][ipNITROGEN] = 5;
00224 iso.n_HighestResolved_max[ipHE_LIKE][ipOXYGEN] = 5;
00225 iso.n_HighestResolved_max[ipHE_LIKE][ipNEON] = 5;
00226 iso.n_HighestResolved_max[ipHE_LIKE][ipSILICON] = 5;
00227 iso.n_HighestResolved_max[ipHE_LIKE][ipMAGNESIUM] = 5;
00228 iso.n_HighestResolved_max[ipHE_LIKE][ipSULPHUR] = 5;
00229 iso.n_HighestResolved_max[ipHE_LIKE][ipIRON] = 5;
00230
00231 iso.n_HighestResolved_max[ipHE_LIKE][LIMELM-1] = 5;
00232
00233 iso.chISO[ipH_LIKE] = "H-like ";
00234 iso.chISO[ipHE_LIKE] = "He-like";
00235
00236 max_num_levels = 0;
00237 for( long ipISO = ipH_LIKE; ipISO < NISO; ipISO++ )
00238 {
00239 for( nelem=ipISO; nelem < LIMELM; nelem++ )
00240 {
00241
00242
00243 iso.numLevels_malloc[ipISO][nelem] = LONG_MAX;
00244 iso_update_num_levels( ipISO, nelem );
00245 }
00246 }
00247
00248 statesAdded = 0;
00249 lgStatesAdded = false;
00250 linesAdded = 0;
00251 lgLinesAdded = false;
00252
00254
00255
00256 mole.nH2_trace_final = 1;
00257
00258 mole.nH2_trace_iterations = 2;
00259
00260 mole.nH2_trace_full = 3;
00261
00262 mole.nH2_trace_matrix = 4;
00263
00264
00265
00266 for( nelem=0; nelem < LIMELM; nelem++ )
00267 {
00268
00269 dense.lgElmtOn[nelem] = true;
00270
00271
00272
00273 dense.lgSetIoniz[nelem] = false;
00274 }
00275
00276
00277 dense.density_low_limit = SMALLFLOAT * 1e3;
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300 hextra.background_density = 2.15e-9f;
00301 hextra.background_rate = 2.5e-17f;
00302
00303
00304
00305
00306 grid.lgGridDone = false;
00307 grid.lgStrictRepeat = false;
00308
00309 PunchFilesInit();
00310
00311 H2_init_coreload();
00312
00313 return;
00314 }