cloudy
trunk
|
Go to the source code of this file.
Data Structures | |
class | phymir_state< X, Y, NP, NSTR > |
struct | t_optimize |
Typedefs | |
typedef double | chi2_type |
Enumerations | |
enum | phymir_mode { PHYMIR_ILL, PHYMIR_SEQ, PHYMIR_FORK, PHYMIR_MPI } |
Functions | |
bool | lgOptimize_do (void) |
void | vary_input (bool *lgLimOK, int grid_index) |
void | optimize_subplex (long int n, double tol, long int maxnfe, long int mode, realnum scale[], realnum x[], realnum *fx, long int *nfe, realnum work[], long int iwork[], long int *iflag) |
void | optimize_phymir (realnum[], const realnum[], long, chi2_type *, realnum) |
chi2_type | optimize_func (const realnum param[], int grid_index=-1) |
Variables | |
const realnum | VRSNEW = realnum(4.00) |
const chi2_type | BIG_CHI2 = chi2_type(FLT_MAX) |
const long | LIMEXT = 5L |
const long | LIMPAR = 20L |
char | chOptimFileName [INPUT_LINE_LENGTH] |
t_optimize | optimize |
typedef double chi2_type |
Definition at line 49 of file optimize.h.
enum phymir_mode |
Enumerator | |
---|---|
PHYMIR_ILL | |
PHYMIR_SEQ | |
PHYMIR_FORK | |
PHYMIR_MPI |
Definition at line 65 of file optimize.h.
bool lgOptimize_do | ( | void | ) |
called instead of cloudy to do optimize routine,
Definition at line 12 of file optimize_do.cpp.
References called, cdEXIT, t_input::chCardSav, t_input::chCardStrip, chOptimFileName, t_optimize::chOptRtn, t_optimize::chVarFmt, cpu, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), t_cpu::i(), t_input::InclLevel, input, INPUT_LINE_LENGTH, ioQQQ, lgAbort, t_prt::lgFaintOn, t_cpu_i::lgMaster(), t_cpu_i::lgMPI_talk(), t_optimize::lgOptimFlow, t_called::lgTalk, t_called::lgTalkIsOK, LIMPAR, t_optimize::nIterOptim, t_optimize::nOptimiz, NPLXMX, t_input::nSave, t_optimize::nvarxt, t_optimize::nvary, t_optimize::nvfpnt, open_data(), t_optimize::OptGlobalErr, optimize, optimize_func(), optimize_phymir(), optimize_subplex(), prt, TotalInsanity(), t_optimize::varang, t_optimize::varmax, t_optimize::varmin, t_optimize::vincr, and t_optimize::vparm.
Referenced by grid_do().
optimize_func actual function called during evaluation of optimization run
Definition at line 19 of file optimize_func.cpp.
References ASSERT, BIG_CHI2, called, cap4(), cdColm(), cdEXIT, cdTemp(), cdWarnings(), t_input::chCardSav, t_input::chCardStrip, t_optimize::chColDen_label, chi2_func(), t_optimize::chLineLabel, t_optimize::chOptRtn, t_optimize::chTempLab, t_optimize::chTempWeight, t_optimize::chVarFmt, cloudy(), t_optimize::ColDen_error, t_optimize::ColDen_Obs, t_optimize::ContEner, t_optimize::ContIndex, t_optimize::ContNFnu, t_optimize::ContNFnuErr, t_radius::Conv2PrtInten, DEBUG_ENTRY, t_radius::distance, EXIT_FAILURE, exp10(), t_LineSave::findline(), fprintf(), grid, input, INPUT_LINE_LENGTH, Singleton< T >::Inst(), t_optimize::ion_ColDen, t_optimize::ionTemp, ioQQQ, t_LineSave::ipNormWavL, t_optimize::ipobs, t_optimize::lgDiamInCM, t_grid::lgGrid, t_optimize::lgOptDiam, t_optimize::lgOptimFlow, t_optimize::lgOptimize, t_optimize::lgOptLum, t_called::lgTalk, t_rfield::lgUSphON, t_LineSave::lines, LineSave, max(), min(), t_optimize::nEmergent, t_optimize::nOptimiz, t_optimize::nOptLum, t_optimize::nvarxt, t_optimize::nvary, t_optimize::nvfpnt, t_optimize::optDiam, t_optimize::optDiamErr, t_optimize::optier, optimize, t_optimize::optint, radius, t_radius::Radius, rfield, t_rfield::rstrom, t_optimize::SavGenericData, t_LineSave::ScaleNormLine, SMALLFLOAT, t_optimize::temp_error, t_optimize::temp_obs, t_optimize::varang, t_optimize::varmax, t_optimize::varmin, vary_input(), t_optimize::vparm, t_optimize::wavelength, t_optimize::xLineInt_error, t_optimize::xLineInt_Obs, and zero().
Referenced by evalf(), gridXspec(), lgOptimize_do(), and optimize_phymir().
Referenced by lgOptimize_do().
void optimize_subplex | ( | long int | n, |
double | tol, | ||
long int | maxnfe, | ||
long int | mode, | ||
realnum | scale[], | ||
realnum | x[], | ||
realnum * | fx, | ||
long int * | nfe, | ||
realnum | work[], | ||
long int | iwork[], | ||
long int * | iflag | ||
) |
optimize_subplex is the main driver, and only exposed, routine for the cowan downhill simplex routine
n | |
tol | |
maxnfe | |
mode | |
scale[] | |
x[] | |
*fx | |
*nfe | |
work[] | |
iwork[] | |
*iflag |
Definition at line 64 of file optimize_subplx.cpp.
References t_usubc::alpha, t_usubc::beta, t_usubc::bonus, cdcopy(), DEBUG_ENTRY, t_usubc::delta, evalf(), t_isubc::fbonus, fp_equal(), 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().
void vary_input | ( | bool * | lgLimOK, |
int | grid_index | ||
) |
vary_input sets input lines to feed into cloudy in optimization runs
*lgLimOK |
Definition at line 9 of file vary_input.cpp.
References cdEXIT, t_input::chCardSav, t_input::chCardStrip, t_save::chRedirectPrefix, t_optimize::chVarFmt, cpu, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), grid, GridPointPrefix(), t_cpu::i(), t_input::InclLevel, input, INPUT_LINE_LENGTH, ioQQQ, t_grid::lgGrid, t_cpu_i::lgMaster(), t_optimize::lgOptimizeAsLinear, mode_w, nMatch(), t_input::nSave, t_optimize::nvarxt, t_optimize::nvary, t_optimize::nvfpnt, open_data(), optimize, t_grid::paramIncrements, save, TotalInsanity(), t_optimize::varang, and t_optimize::vparm.
Referenced by optimize_func().
Definition at line 51 of file optimize.h.
Referenced by chi2_func(), and optimize_func().
char chOptimFileName[INPUT_LINE_LENGTH] |
file name for output, set in cddefines.c
Definition at line 7 of file optimize.cpp.
Referenced by grid_do(), InitCoreload(), lgOptimize_do(), and ParseOptimize().
const long LIMEXT = 5L |
the limit to the number of numbers on the command line
Definition at line 60 of file optimize.h.
Referenced by ParseTable(), and ParseTLaw().
const long LIMPAR = 20L |
Definition at line 61 of file optimize.h.
Referenced by grid_do(), gridXspec(), InitCoreload(), lgOptimize_do(), optimize_phymir(), ParseCommands(), ParseElement(), ParseGrid(), punchFITS_ParamData(), punchFITS_ParamHeader(), punchFITS_SpectraData(), and punchFITS_SpectraHeader().
t_optimize optimize |
Definition at line 6 of file optimize.cpp.
Referenced by abund_starburst(), cdDrive(), cdInit(), cdMain(), cdRead(), GetOptColDen(), GetOptLineInt(), GetOptTemp(), grid_do(), GridRetrieveXSPECData(), gridXspec(), InitCoreload(), InitDefaultsPreparse(), lgCheckMonitors(), lgOptimize_do(), main(), optimize_func(), optimize_phymir(), phymir_state< X, Y, NP, NSTR >::optimize_with_restart(), ParseAgn(), ParseBlackbody(), ParseBremsstrahlung(), ParseCommands(), ParseConstant(), ParseCoronal(), ParseCosmicRays(), ParseDarkMatter(), ParseDatabaseISO(), ParseDistance(), ParseDLaw(), ParseEden(), ParseElement(), ParseEnergy(), ParseFill(), ParseFudge(), ParseGlobule(), ParseGrain(), ParseGrid(), ParseHDEN(), ParseHExtra(), ParseIlluminate(), ParseIntensity(), ParseIonPar(), ParseLuminosity(), ParseMagnet(), ParseMetal(), ParseMonitorResults(), ParseOptimize(), ParsePhi(), ParsePowerlawContinuum(), ParseQH(), ParseRadius(), ParseRatio(), ParseSet(), ParseStop(), ParseTable(), ParseTLaw(), ParseTurbulence(), SaveDo(), saveFITSfile(), SaveGrid(), SetLimits(), and vary_input().
<I4> default to INTEGER*4
Definition at line 47 of file optimize.h.
Referenced by phymir_state< X, Y, NP, NSTR >::continue_from_state(), and phymir_state< X, Y, NP, NSTR >::p_clear1().