cloudy trunk
|
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 _OPTIMIZE_H_ 00005 #define _OPTIMIZE_H_ 00006 00007 00010 bool lgOptimize_do(void); 00011 00015 void vary_input(bool *lgLimOK); 00016 00031 void optimize_subplex(long int n, 00032 double tol, 00033 long int maxnfe, 00034 long int mode, 00035 realnum scale[], 00036 realnum x[], 00037 realnum *fx, 00038 long int *nfe, 00039 realnum work[], 00040 long int iwork[], 00041 long int *iflag); 00042 00043 /*<NP->*/ 00045 #define VRSNEW 3.00f 00046 00048 /* >>chng 00 sep 12, had been continue.in but was confused with normal input files*/ 00049 #define CNTFILE "continue.pmr" 00050 00051 void optimize_phymir(realnum[],realnum[],long,realnum*,realnum); 00052 00054 double optimize_func(realnum param[]); 00055 00056 /* varypar.h */ 00058 #define LIMEXT 5L 00059 #define LIMPAR 20L 00060 #define NCOLLM 100L 00061 #define NOBSLM 100L 00062 00063 EXTERN char chOptimFileName[INPUT_LINE_LENGTH]; 00086 EXTERN struct t_optimize { 00087 00089 bool lgVaryOn, 00091 lgNoVary; 00092 00094 bool lgOptimr; 00095 00096 realnum 00098 varmax[LIMPAR], 00099 varmin[LIMPAR], 00100 00103 vparm[LIMEXT][LIMPAR], 00104 00106 vincr[LIMPAR]; 00107 00109 long int nvarxt[LIMPAR], 00110 nvfpnt[LIMPAR]; 00111 00112 realnum vpused[LIMPAR], 00113 OptIncrm[LIMPAR], 00114 varang[LIMPAR][2]; 00115 00116 long int nvary, 00117 nparm, 00118 nRangeSet; 00119 bool lgVarOn; 00120 realnum ColDen_Obs[NCOLLM], 00121 chColDen_error[NCOLLM]; 00122 long int ion_ColDen[NCOLLM], 00123 ncobs, 00124 ionTemp[NCOLLM]; 00125 00126 realnum xLineInt_Obs[NOBSLM], 00127 xLineInt_error[NOBSLM]; 00128 00129 realnum temp_obs[NOBSLM], 00130 temp_error[NOBSLM]; 00131 char chTempWeight[NOBSLM][7]; 00132 00133 long int 00134 nlobs, 00135 nIterOptim, 00137 nTempObs; 00138 00140 realnum wavelength [NOBSLM], 00142 errorwave[NOBSLM]; 00143 00145 FILE *ioOptim; 00146 realnum OptGlobalErr; 00147 00148 /* counter for number of models in a grid - is one (not zero) for 00149 * first simulation */ 00150 long int nOptimiz; 00151 00152 bool lgOptimFlow; 00153 realnum optint, 00154 optier; 00155 long int nTrOpt; 00156 bool lgTrOpt; 00157 bool lgOptimize, 00160 lgOptLin, 00161 lgOptLum, 00162 lgOptCol, 00163 lgOptTemp; 00164 00166 bool lgParallel, 00167 lgOptCont; 00168 long useCPU; 00169 00170 char chVarFmt[LIMPAR][FILENAME_PATH_LENGTH_2], 00171 chColDen_label[NCOLLM][5], 00172 chLineLabel[NOBSLM][5], 00173 chTempLab[NOBSLM][5], 00174 chOptRtn[5]; 00175 00176 double SavGenericData[10]; 00177 00178 } optimize; 00179 00180 00181 00182 #endif /* _OPTIMIZE_H_ */