00001
00002
00003
00004 #include "cddefines.h"
00005 #include "iterations.h"
00006 #include "geometry.h"
00007 #include "trace.h"
00008 #include "parse.h"
00009
00010 void ParseTrace(char *chCard )
00011 {
00012 bool lgEOL;
00013 long int i;
00014
00015 DEBUG_ENTRY( "ParseTrace()" );
00016
00017
00018
00019
00020
00021
00022
00023
00024 if( !nMatch("O PR",chCard) )
00025 fprintf(ioQQQ,"DEBUG trace output turned on.\n");
00026
00027
00028
00029 trace.lgTrace = false;
00030 i = 5;
00031
00032 trace.nznbug = (long)FFmtRead(chCard,&i,INPUT_LINE_LENGTH,&lgEOL);
00033 if( lgEOL )
00034 trace.lgTrace = true;
00035
00036
00037 trace.npsbug = (long)FFmtRead(chCard,&i,INPUT_LINE_LENGTH,&lgEOL);
00038 if( lgEOL )
00039 trace.npsbug = 1;
00040
00041
00042 if( trace.nznbug == 0 && trace.npsbug <= 1 )
00043 {
00044 trace.lgTrace = true;
00045 geometry.nprint = 1;
00046 iterations.IterPrnt[0] = 1;
00047 }
00048
00049
00050
00051 if( nMatch("CONV",chCard) )
00052 {
00053
00054
00055
00056
00057 if( nMatch("PRES",chCard) )
00058 trace.nTrConvg = -1;
00059
00060 else if( nMatch("TEMP",chCard) )
00061 trace.nTrConvg = -2;
00062
00063 else if( nMatch("EDEN",chCard) )
00064 trace.nTrConvg = -3;
00065
00066 else if( nMatch("IONI",chCard) )
00067 trace.nTrConvg = -4;
00068
00069
00070 else
00071 trace.nTrConvg = -100;
00072
00073
00074
00075 if( trace.nznbug == 0 && trace.npsbug <= 1 )
00076 trace.nTrConvg *= -1;
00077
00078
00079 trace.lgTrace = false;
00080
00081 geometry.nprint = 10000;
00082 iterations.IterPrnt[0] = 10000;
00083
00084
00085 if( nMatch(" OTS",chCard) )
00086 trace.lgOTSBug = true;
00087
00088
00089
00090 if( nMatch("ESOU",chCard) )
00091 trace.lgESOURCE = true;
00092 }
00093
00094
00095
00096 if( nMatch("H-LI",chCard) )
00097 {
00098
00099 trace.lgHBug = true;
00100
00101
00102 if( nMatch("FULL",chCard) )
00103 {
00104 trace.lgIsoTraceFull[ipH_LIKE] = true;
00105 }
00106 else
00107 {
00108 trace.lgIsoTraceFull[ipH_LIKE] = false;
00109 }
00110
00111
00112 trace.ipIsoTrace[ipH_LIKE] = GetElem(chCard);
00113
00114
00115
00116 trace.ipIsoTrace[ipH_LIKE] = MAX2(0, trace.ipIsoTrace[ipH_LIKE] );
00117 }
00118
00119
00120 if( nMatch("HE-L",chCard) )
00121 {
00122
00123 trace.lgHeBug = true;
00124
00125
00126 if( nMatch("FULL",chCard) )
00127 trace.lgIsoTraceFull[ipHE_LIKE] = true;
00128 else
00129 trace.lgIsoTraceFull[ipHE_LIKE] = false;
00130
00131
00132 trace.ipIsoTrace[ipHE_LIKE] = GetElem(chCard);
00133
00134
00135
00136 trace.ipIsoTrace[ipHE_LIKE] = MAX2(1, trace.ipIsoTrace[ipHE_LIKE] );
00137 }
00138
00139
00140 if( nMatch("BETA",chCard) )
00141 trace.lgTr8446 = true;
00142
00143 if( nMatch("CARB",chCard) )
00144 trace.lgCarBug = true;
00145
00146 if( nMatch("CALC",chCard) )
00147 trace.lgCalBug = true;
00148
00149 if( nMatch("COMP",chCard) )
00150 trace.lgComBug = true;
00151
00152 if( nMatch("CONT",chCard) )
00153 trace.lgConBug = true;
00154
00155 if( nMatch("COOL",chCard) )
00156 trace.lgCoolTr = true;
00157
00158 if( nMatch("DIFF",chCard) )
00159 trace.lgTrDiff = true;
00160
00161 if( nMatch(" DR ",chCard) )
00162 trace.lgDrBug = true;
00163
00164 if( nMatch("EDEN",chCard) || nMatch("ELECTRON",chCard) )
00165 trace.lgNeBug = true;
00166
00167 if( nMatch("GAUN",chCard) )
00168 trace.lgTrGant = true;
00169
00170 if( nMatch("GRAI",chCard) )
00171 trace.lgDustBug = true;
00172
00173 if( nMatch("HEAV",chCard) )
00174 trace.lgHeavyBug = true;
00175
00176 if( nMatch("HEAT",chCard) )
00177 trace.lgHeatBug = true;
00178
00179
00180 if( nMatch("HELI",chCard) && !nMatch("H-LI",chCard) && !nMatch("HE-L",chCard) )
00181 trace.lgHeBug = true;
00182
00183
00184 if( nMatch("HYDR",chCard) && !nMatch("H-LI",chCard))
00185 {
00186 trace.lgHBug = true;
00187 trace.lgIsoTraceFull[ipH_LIKE] = false;
00188
00189 trace.ipIsoTrace[ipH_LIKE] = 0;
00190 }
00191
00192 if( nMatch("IRON",chCard) )
00193 trace.lgFeBug = true;
00194
00195 if( nMatch("VELN",chCard) )
00196 trace.lgTrLevN = true;
00197
00198 if( nMatch("LINE",chCard) )
00199 trace.lgTrLine = true;
00200
00201 if( nMatch("NEON",chCard) )
00202 trace.lgNeonBug = true;
00203
00204 if( nMatch("MOLE",chCard) )
00205 {
00206
00207
00208 if( nMatch("HMOL",chCard) )
00209 {
00210
00211 trace.lgTr_H2_Mole = true;
00212 }
00213 else if( nMatch("CMOL",chCard ) )
00214 {
00215
00216 trace.lgTr_CO_Mole = true;
00217 }
00218 else
00219 {
00220
00221 trace.lgTr_CO_Mole = true;
00222 trace.lgTr_H2_Mole = true;
00223 }
00224 }
00225
00226
00227 if( nMatch("POIN",chCard) )
00228 trace.lgPointBug = true;
00229
00230
00231 if( nMatch("PTIC",chCard) )
00232 trace.lgOptcBug = true;
00233
00234 if( nMatch("PTIM",chCard) )
00235 trace.lgTrOptm = true;
00236
00237 if( nMatch(" OTS",chCard) )
00238 trace.lgOTSBug = true;
00239
00240 if( nMatch("SECO",chCard) && nMatch("IONI",chCard) )
00241
00242 trace.lgSecIon = true;
00243
00244 if( nMatch("THRE",chCard) )
00245 trace.lgTrace3Bod = true;
00246
00247
00248 if( nMatch(" TWO",chCard) )
00249 trace.lgBug2nu = true;
00250
00251
00252 if( nMatch("WIND",chCard) )
00253 trace.lgWind = true;
00254
00255
00256 return;
00257 }