00001 /* This file is part of Cloudy and is copyright (C)1978-2008 by Gary J. Ferland and 00002 * others. For conditions of distribution and use see copyright notice in license.txt */ 00003 00004 #ifndef _CONV_H_ 00005 #define _CONV_H_ 00006 00015 void ConvIterCheck( void ); 00016 00018 bool lgConvPres(void); 00019 00021 bool lgConvTemp(void); 00022 00024 bool lgConvEden(void); 00025 00028 int ConvInitSolution(void); 00029 00034 int ConvPresTempEdenIoniz(void); 00035 00040 int PressureChange(double dP_chng_factor ); 00041 00045 int ConvTempEdenIoniz(void); 00046 00050 int ConvEdenIoniz(void); 00051 00054 int ConvIoniz(void); 00055 00060 void ConvFail( 00061 /* chMode is one of "pres", "eden", "ioni", "pops", "grai", "temp" */ 00062 const char chMode[], 00063 /* chDetail - string giving details about the convergence failure */ 00064 const char chDetail[] ); 00065 00073 int ConvBase(long loopi); 00074 00078 int eden_sum(void); 00079 00083 EXTERN struct t_conv { 00084 00086 char *chConvEden; 00087 00090 char *chConvIoniz; 00091 00094 char *chNotConverged; 00095 00097 bool lgConvIoniz; 00098 00100 bool lgConvPops; 00101 00104 double BadConvIoniz[2]; 00105 00107 long int nPres2Ioniz; 00110 long int limPres2Ioniz; 00111 00115 long int nTotalIoniz; 00116 00120 long int nTotalIoniz_start; 00121 00124 bool lgSearch; 00125 00127 realnum AverEdenError; 00128 00130 realnum BigHeatCoolError; 00131 realnum AverHeatCoolError; 00132 00134 realnum BigPressError; 00135 realnum AverPressError; 00136 00138 bool lgIonStageTrimed; 00139 00141 bool lgCmHOsc; 00142 00144 bool lgTOscl; 00145 00147 bool lgEdenOscl; 00148 00151 bool lgOscilOTS; 00152 00154 bool lgConvTemp; 00155 00157 bool lgConvPres; 00158 00160 bool lgConvEden; 00161 00163 bool lgLevel2_OTS_Imp; 00164 00166 bool lgLevel2_Cool_Imp; 00167 00169 long int nTotalFailures; 00170 00172 long int nTeFail; 00173 00175 realnum failmx; 00176 00178 long int nPreFail; 00179 00181 long int nNeFail; 00182 00184 realnum BigEdenError; 00185 00187 long int nIonFail; 00188 00190 long int nPopFail; 00191 00193 long int nConvIonizFails; 00194 00196 long int nGrainFail; 00197 00199 long int LimFail; 00200 00202 bool lgMap; 00203 00205 long int ifailz[12]; 00206 00209 char chSolverEden[20]; 00210 00213 char chSolverTemp[20]; 00214 00217 bool lgBadStop; 00218 00220 bool lgAutoIt; 00221 00223 realnum autocv; 00224 00228 double EdenErrorAllowed; 00229 00233 realnum PressureErrorAllowed; 00234 00237 realnum HeatCoolRelErrorAllowed; 00238 00241 double *hist_pres_density , *hist_pres_current , *hist_pres_correct; 00242 long int hist_pres_npres , hist_pres_nzone , hist_pres_limit; 00243 00246 double *hist_temp_temp , *hist_temp_heat , *hist_temp_cool; 00247 long int hist_temp_ntemp , hist_temp_nzone , hist_temp_limit; 00248 00249 } conv; 00250 00251 #endif /* _CONV_H_ */