optimize.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  t_optimize

Defines

#define VRSNEW   3.00f
#define CNTFILE   "continue.pmr"
#define LIMEXT   5L
#define LIMPAR   20L
#define NCOLLM   100L
#define NOBSLM   100L

Functions

bool lgOptimize_do (void)
void vary_input (bool *lgLimOK)
void optimize_subplex (long int n, double tol, long int maxnfe, long int mode, float scale[], float x[], float *fx, long int *nfe, float work[], long int iwork[], long int *iflag)
void optimize_phymir (float[], float[], long, float *, float)
double optimize_func (float param[])

Variables

EXTERN char chOptimFileName [INPUT_LINE_LENGTH]
EXTERN struct t_optimize optimize


Define Documentation

#define CNTFILE   "continue.pmr"

this is the name of the file that optimize_phymir automatically creates containing information to continue the optimization at a later time.

Definition at line 45 of file optimize.h.

Referenced by optimize_phymir().

#define LIMEXT   5L

the limit to the number of numbers on the command line

Definition at line 54 of file optimize.h.

Referenced by ParseDLaw(), ParseTable(), and ParseTLaw().

#define LIMPAR   20L

#define NCOLLM   100L

Definition at line 56 of file optimize.h.

Referenced by GetOptColDen().

#define NOBSLM   100L

Definition at line 57 of file optimize.h.

Referenced by GetOptLineInt(), GetOptTemp(), and optimize_func().

#define VRSNEW   3.00f

<I4> default to INTEGER*4

Definition at line 41 of file optimize.h.

Referenced by optimize_phymir(), and rd_continue().


Function Documentation

bool lgOptimize_do ( void   ) 

double optimize_func ( float  param[]  ) 

optimize_func actual function called during evaluation of optimization run

Definition at line 21 of file optimize_func.cpp.

References ASSERT, called, cap4(), cdColm(), cdEXIT(), cdLine(), cdTemp(), cdWarnings(), t_tag_LineSv::chALab, t_input::chCardSav, t_optimize::chColDen_error, t_optimize::chColDen_label, chi2_func(), t_optimize::chLineLabel, t_optimize::chTempLab, t_optimize::chTempWeight, t_optimize::chVarFmt, cloudy(), t_optimize::ColDen_Obs, t_radius::Conv2PrtInten, DEBUG_ENTRY, DEBUG_EXIT, EmisLines, t_optimize::errorwave, grid, GridInitialize(), input, t_optimize::ion_ColDen, t_optimize::ionTemp, ioQQQ, ipHe1s1S, ipHe2p3P0, ipHe2p3P1, ipHE_LIKE, ipHELIUM, t_LineSave::ipNormWavL, iso, Elevels::l, t_grid::lgGrid, t_LineSave::lgLineEmergent, t_optimize::lgOptCol, t_optimize::lgOptimFlow, t_optimize::lgOptLin, t_optimize::lgOptLum, t_optimize::lgOptTemp, t_called::lgTalk, LineSave, LineSv, MAX2, MAXCAT, MIN2, Elevels::n, t_optimize::ncobs, t_iso::nCollapsed_local, t_optimize::nlobs, NOBSLM, t_optimize::nOptimiz, t_optimize::nTempObs, t_iso::numLevels_local, t_optimize::nvarxt, t_optimize::nvary, t_optimize::nvfpnt, t_optimize::optier, optimize, t_optimize::optint, PrintE82(), prt_wl(), t_iso::quant_desig, radius, Elevels::s, t_optimize::SavGenericData, t_LineSave::ScaleNormLine, t_tag_LineSv::sumlin, t_optimize::temp_error, t_optimize::temp_obs, t_optimize::varang, t_optimize::varmax, t_optimize::varmin, vary_input(), t_optimize::vparm, t_optimize::vpused, t_tag_LineSv::wavelength, wavelength, t_optimize::wavelength, t_optimize::xLineInt_error, t_optimize::xLineInt_Obs, and zero().

Referenced by evalf(), gridXspec(), lgOptimize_do(), and optimize_phymir().

Here is the call graph for this function:

void optimize_phymir ( float  [],
float  [],
long  ,
float *  ,
float   
)

Referenced by lgOptimize_do().

void optimize_subplex ( long int  n,
double  tol,
long int  maxnfe,
long int  mode,
float  scale[],
float  x[],
float *  fx,
long int *  nfe,
float  work[],
long int  iwork[],
long int *  iflag 
)

optimize_subplex is the main driver, and only exposed, routine for the cowan downhill simplex routine

Parameters:
n 
tol 
maxnfe 
mode 
scale[] 
x[] 
*fx 
*nfe 
work[] 
iwork[] 
*iflag 

Definition at line 65 of file optimize_subplx.cpp.

References t_usubc::alpha, t_usubc::beta, t_usubc::bonus, cdcopy(), DEBUG_ENTRY, DEBUG_EXIT, t_usubc::delta, evalf(), t_isubc::fbonus, t_usubc::fstop, t_usubc::ftest, t_usubc::gamma, t_usubc::ifxsw, t_usubc::initx, t_isubc::IntNew, t_usubc::irepl, isubc, MAX2, t_usubc::minf, t_usubc::nfstop, t_usubc::nfxe, t_usubc::nsmax, t_usubc::nsmin, t_usubc::omega, partx(), POW2, t_usubc::psi, setstp(), t_isubc::sfstop, simplx(), sortd(), subopt(), and usubc.

Referenced by lgOptimize_do().

Here is the call graph for this function:

void vary_input ( bool *  lgLimOK  ) 

vary_input sets input lines to feed into cloudy in optimization runs

Parameters:
*lgLimOK 

Definition at line 9 of file vary_input.cpp.

References cdEXIT(), t_input::chCardSav, t_optimize::chVarFmt, DEBUG_ENTRY, DEBUG_EXIT, input, ioQQQ, MAX2, MIN2, t_optimize::nvarxt, t_optimize::nvary, t_optimize::nvfpnt, optimize, t_optimize::varang, t_optimize::vparm, and t_optimize::vpused.

Referenced by optimize_func().

Here is the call graph for this function:


Variable Documentation

file name for output, set in cddefines.c

Definition at line 59 of file optimize.h.

Referenced by cdDefines(), grid_do(), lgOptimize_do(), and ParseOptimize().

EXTERN struct t_optimize optimize

logical variable says whether current line image has vary option

optimize increments, deltas for changing optimized variables range for optimize command io unit for final best parameters from optimizer limit to number of iterations for optimizer, set with optimize iterations command set with optimize tolerance command, used for global match to fit default set in scalar to 0.10 current counter for the number of calls to the optimizer
lgTrOpt flag set with optimization trace command
nTrOpt is which call to cloudy to turn on trace
flags set if we are to optimize lines, luminosity, or colums

labels for column densities on vary command
this specifies the optimization routine
'amoe', 'powe', 'bubr'

Referenced by abund_starburst(), cdDrive(), cdInit(), cdRead(), GetOptColDen(), GetOptLineInt(), GetOptTemp(), grid_do(), GridGather(), GridInitialize(), gridXspec(), lgOptimize_do(), optimize_func(), optimize_phymir(), ParseAssertResults(), ParseCommands(), ParseConstant(), ParseCosmicRays(), ParseDLaw(), ParseElement(), ParseGlobule(), ParseGrain(), ParseHDEN(), ParseIonPar(), ParseMagnet(), ParseMetal(), ParseOptimize(), ParsePowerlawContinuum(), ParsePunch(), ParseRadius(), ParseRatio(), ParseSet(), ParseStop(), ParseTable(), ParseTLaw(), SetLimits(), and vary_input().


Generated for cloudy by doxygen 1.5.9