00001
00002
00003
00004
00005 #define EXTERN
00006 #include "cddefines.h"
00007
00008
00009 FILE *ioMAP = NULL;
00010
00011
00012
00013 const double ZeroNum = 0.;
00014
00015 #include "taulines.h"
00016
00017
00018 long nWindLine = NWINDDIM;
00019
00020
00021 long int nCORotate = NCOROTATE;
00022
00023
00024 bool lgCORotateMalloc = false;
00025
00026 #include "abund.h"
00027 #include "atmdat.h"
00028 #include "atoms.h"
00029 #include "atomfeii.h"
00030 #include "assertresults.h"
00031 #include "broke.h"
00032 #include "ca.h"
00033 #include "called.h"
00034 #include "carb.h"
00035 #include "cddrive.h"
00036
00037
00038
00039 bool lgcdInitCalled=false;
00040 #include "colden.h"
00041 #include "conv.h"
00042 #include "continuum.h"
00043 #include "coolheavy.h"
00044 #include "dense.h"
00045 #include "doppvel.h"
00046 #include "dynamics.h"
00047 #include "elementnames.h"
00048 #include "embesq.h"
00049 #include "extinc.h"
00050 #include "fe.h"
00051 #include "fudgec.h"
00052 #include "geometry.h"
00053 #include "grainvar.h"
00054
00055 #include "optimize.h"
00056
00057 #include "grid.h"
00058 #include "h2.h"
00059 #include "h2_priv.h"
00060 bool lgH2_READ_DATA = false;
00061 #include "helike.h"
00062 #include "he.h"
00063 #include "heavy.h"
00064 #include "hextra.h"
00065 #include "hmi.h"
00066 #include "hydrogenic.h"
00067
00068
00069
00070
00071
00072 bool lgHydroMalloc = false;
00073
00074 #include "hyperfine.h"
00075 #include "input.h"
00076 #include "ionbal.h"
00077 #include "iso.h"
00078 #include "iterations.h"
00079 #include "lines.h"
00080
00081
00082 LinSv *LineSv=NULL;
00083 #include "magnetic.h"
00084 #include "map.h"
00085 #include "mean.h"
00086 #include "mewecoef.h"
00087 #include "mole.h"
00088 #include "neutrn.h"
00089 #include "nitro.h"
00090 #include "noexec.h"
00091 #include "numderiv.h"
00092 #include "oxy.h"
00093 #include "peimbt.h"
00094 #include "phycon.h"
00095 #include "plot.h"
00096 #include "sil.h"
00097 #include "version.h"
00098
00099
00100 bool lgFeIIMalloc=false;
00101
00102 #include "pressure.h"
00103 #include "prt.h"
00104 #include "punch.h"
00105 #include "radius.h"
00106 #include "reason.h"
00107 #include "rfield.h"
00108
00109 bool lgRfieldMalloced=false;
00110 #include "opacity.h"
00111 bool lgOpacMalloced=false;
00112 #include "rt.h"
00113 #include "secondaries.h"
00114 #include "state.h"
00115 #include "stopcalc.h"
00116 #include "struc.h"
00117 #include "thermal.h"
00118 #include "timesc.h"
00119 #include "trace.h"
00120 #include "warnings.h"
00121 #include "wind.h"
00122
00123 void cdDefines(void)
00124 {
00125 long int nelem;
00126
00127 strncpy( chOptimFileName , "optimal.in" , sizeof( chOptimFileName ) );
00128
00129
00130
00131
00132 if( !lgHydroMalloc )
00133 {
00134
00135
00141
00142
00143 for( nelem=ipHYDROGEN; nelem < LIMELM; ++nelem )
00144 {
00145 iso.n_HighestResolved_max[ipH_LIKE][nelem] = 15;
00146
00147 iso.numLevels_max[ipH_LIKE][nelem] = iso.n_HighestResolved_max[ipH_LIKE][nelem] + 1;
00148
00149
00150 iso.nTopOff[ipH_LIKE][nelem] = iso.numLevels_max[ipH_LIKE][nelem]-1;
00151
00152
00153 iso.numPrintLevels[ipH_LIKE][nelem] = iso.numLevels_max[ipH_LIKE][nelem];
00154
00155 iso.nCollapsed_max[ipH_LIKE][nelem] = 0;
00156 }
00157 for( nelem=ipHYDROGEN; nelem <= ipHELIUM; ++nelem )
00158 {
00159
00160 iso.n_HighestResolved_max[ipH_LIKE][nelem] = 25;
00161
00162 iso.numLevels_max[ipH_LIKE][nelem] = iso.n_HighestResolved_max[ipH_LIKE][nelem] + 1;
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172 iso.nTopOff[ipH_LIKE][nelem] = 22;
00173
00174
00175 iso.numPrintLevels[ipH_LIKE][nelem] = iso.numLevels_max[ipH_LIKE][nelem] - 1;
00176 }
00177
00178
00179 iso.n_HighestResolved_max[ipHE_LIKE][ipHYDROGEN] = 0;
00180 iso.numLevels_max[ipHE_LIKE][ipHYDROGEN] = 0;
00181 iso.numPrintLevels[ipHE_LIKE][ipHYDROGEN] = 0;
00182 iso.nCollapsed_max[ipHE_LIKE][ipHYDROGEN] = 0;
00183
00184
00185 for( nelem=ipHELIUM; nelem < LIMELM; ++nelem )
00186 {
00187
00188 iso.n_HighestResolved_max[ipHE_LIKE][nelem] = 3;
00191 iso.nCollapsed_max[ipHE_LIKE][nelem] = 1;
00192 }
00193
00194
00195 iso.nCollapsed_max[ipHE_LIKE][ipHELIUM] = 20;
00196
00197 iso.n_HighestResolved_max[ipHE_LIKE][ipHELIUM] = 6;
00198
00199 iso.n_HighestResolved_max[ipHE_LIKE][ipCARBON] = 5;
00200 iso.n_HighestResolved_max[ipHE_LIKE][ipNITROGEN] = 5;
00201 iso.n_HighestResolved_max[ipHE_LIKE][ipOXYGEN] = 5;
00202 iso.n_HighestResolved_max[ipHE_LIKE][ipIRON] = 5;
00203 iso.n_HighestResolved_max[ipHE_LIKE][ipZINC] = 5;
00204
00205 for( nelem=ipHELIUM; nelem < LIMELM; ++nelem )
00206 {
00207
00208 iso.n_HighestResolved_max[ipHE_LIKE][nelem] = MAX2( iso.n_HighestResolved_max[ipHE_LIKE][nelem], 3 );
00209
00210 iso.numLevels_max[ipHE_LIKE][nelem] = ( ( 1 + iso.n_HighestResolved_max[ipHE_LIKE][nelem] ) * iso.n_HighestResolved_max[ipHE_LIKE][nelem] + 1 );
00211
00212 iso.numPrintLevels[ipHE_LIKE][nelem] = iso.numLevels_max[ipHE_LIKE][nelem]-1;
00213 }
00214 }
00215
00216
00217 {
00218 long int nCom[LIMELM] =
00219 {
00220 1 , 2 ,
00221 1 , 2 ,
00222 1 , 2 , 3 , 4 , 5 , 6 ,
00223 1 , 2 ,
00224 1 , 2 , 3 , 4 , 5 , 6 ,
00225 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ,
00226 1 , 2 ,
00227 1 , 2
00228 };
00229
00230 for( nelem=ipHYDROGEN; nelem<LIMELM; ++nelem )
00231 {
00232 ionbal.nCompRecoilElec[nelem] = nCom[nelem];
00233 }
00234 }
00235 }