Cloudy
Spectral Synthesis Code for Astrophysics
Loading...
Searching...
No Matches
optimize.h File Reference
#include "energy.h"
#include "flux.h"
#include "lines.h"
Include dependency graph for optimize.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

void optimize_do ()
 
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(5.00)
 
const chi2_type BIG_CHI2 = chi2_type(FLT_MAX)
 
const long LIMEXT = 5L
 
const long LIMPAR = 20L
 
string chOptimFileName
 
t_optimize optimize
 

Typedef Documentation

◆ chi2_type

typedef double chi2_type

Enumeration Type Documentation

◆ phymir_mode

Enumerator
PHYMIR_ILL 
PHYMIR_SEQ 
PHYMIR_FORK 
PHYMIR_MPI 

Function Documentation

◆ optimize_do()

void optimize_do ( )

called instead of cloudy to do optimize routine

References called, cdEXIT, chOptimFileName, cpu, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), input, ioQQQ, LIMPAR, MakeInputLine(), NPLXMX, open_data(), optimize, optimize_func(), optimize_phymir(), optimize_subplex(), prt, and TotalInsanity().

Referenced by grid_do().

Here is the call graph for this function:

◆ optimize_func()

chi2_type optimize_func ( const realnum param[],
int grid_index = -1 )

optimize_func actual function called during evaluation of optimization run

References ASSERT, BIG_CHI2, called, cdColm(), cdEXIT, cdTemp(), cdWarnings(), chi2_func(), cloudy(), DEBUG_ENTRY, EXIT_FAILURE, exp10(), fprintf(), Flux::get(), grid, input, Singleton< t_PredCont >::Inst(), ioQQQ, LineSave, MakeInputLine(), max(), min(), t_PredCont::offset(), optimize, radius, rfield, SMALLFLOAT, vary_input(), and zero().

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

Here is the call graph for this function:

◆ optimize_phymir()

void optimize_phymir ( realnum [],
const realnum [],
long ,
chi2_type * ,
realnum  )

Referenced by optimize_do().

◆ optimize_subplex()

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

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

References cdcopy(), DEBUG_ENTRY, evalf(), fp_equal(), isubc, MAX2, partx(), POW2, setstp(), simplx(), sortd(), subopt(), and usubc.

Referenced by optimize_do().

Here is the call graph for this function:

◆ vary_input()

void vary_input ( bool * lgLimOK,
int grid_index )

vary_input sets input lines to feed into cloudy in optimization runs

Parameters
*lgLimOK

References cpu, DEBUG_ENTRY, fprintf(), grid, GridPointPrefix(), input, ioQQQ, MakeInputLine(), mode_w, nMatch(), open_data(), optimize, save, and TotalInsanity().

Referenced by optimize_func().

Here is the call graph for this function:

Variable Documentation

◆ BIG_CHI2

const chi2_type BIG_CHI2 = chi2_type(FLT_MAX)

Referenced by chi2_func(), and optimize_func().

◆ chOptimFileName

string chOptimFileName
extern

Referenced by grid_do(), optimize_do(), and ParseOptimize().

◆ LIMEXT

const long LIMEXT = 5L

the limit to the number of numbers on the command line

Referenced by ParseTable(), and ParseTLaw().

◆ LIMPAR

◆ optimize

◆ VRSNEW