Cloudy
Spectral Synthesis Code for Astrophysics
Loading...
Searching...
No Matches
t_conv Struct Reference

#include <conv.h>

Inheritance diagram for t_conv:
Collaboration diagram for t_conv:

Public Member Functions

const char * chName () const
 
void zero ()
 
void comment (t_warnings &)
 
void resetConvIoniz ()
 
void setConvIonizFail (const char *reason, double oldval, double newval)
 
bool lgConvIoniz () const
 
const char * chConvIoniz () const
 
double convIonizOldVal () const
 
double convIonizNewVal () const
 
size_t ntypes (void) const
 
ConvergenceCounter register_ (const string name)
 
void incrementCounter (const size_t type)
 
void resetCounters ()
 
void resetCountersZone ()
 
long getCounter (const long type) const
 
long getCounter (const string &name) const
 
long getCounterZone (const long type) const
 
long getCounterZone (const string &name) const
 
long getCounterMax (const long type) const
 
long getCounterMax (const string &name) const
 
const char * getCounterName (const long type) const
 
- Public Member Functions inherited from module
 module ()
 
virtual ~module ()
 

Public Attributes

char chNotConverged [INPUT_LINE_LENGTH]
 
bool lgConvPops
 
long int nPres2Ioniz
 
bool lgFirstSweepThisZone
 
bool lgLastSweepThisZone
 
long int limPres2Ioniz
 
long int nTotalIoniz
 
long int nTotalIoniz_start
 
bool lgSearch
 
realnum AverEdenError
 
realnum BigHeatCoolError
 
realnum AverHeatCoolError
 
realnum BigPressError
 
realnum AverPressError
 
bool lgIonStageTrimed
 
bool lgOscilOTS
 
bool lgConvTemp
 
bool lgConvPres
 
bool lgConvEden
 
long int nTotalFailures
 
long int nTeFail
 
realnum failmx
 
long int nPreFail
 
long int nNeFail
 
realnum BigEdenError
 
long int nIonFail
 
long int nPopFail
 
long int nGrainFail
 
long int nChemFail
 
long int LimFail
 
bool lgMap
 
long int ifailz [12]
 
char chSolverEden [20]
 
char chSolverTemp [20]
 
bool lgBadStop
 
bool lgAutoIt
 
bool lgAllTransitions
 
bool lgUpdateCouplings
 
realnum autocv
 
double EdenErrorAllowed
 
realnum PressureErrorAllowed
 
double MaxFractionalDensityStepPerIteration
 
realnum HeatCoolRelErrorAllowed
 
realnum IonizErrorAllowed
 
realnum GasPhaseAbundErrorAllowed
 
double dCmHdT
 
double sigma_dCmHdT
 
vector< double > hist_pres_density
 
vector< double > hist_pres_current
 
vector< double > hist_pres_error
 
long int hist_pres_nzone
 
vector< double > hist_temp_temp
 
vector< double > hist_temp_heat
 
vector< double > hist_temp_cool
 
long int hist_temp_nzone
 

Private Attributes

string m_chConvIoniz
 
bool m_lgConvIoniz
 
double m_BadConvIoniz [2]
 
std::vector< long > m_counters
 
std::vector< long > m_counters_zone
 
std::vector< long > m_counters_max
 
std::vector< string > m_labels
 

Detailed Description

the variables that deal with the convergence of the model

Member Function Documentation

◆ chConvIoniz()

const char * t_conv::chConvIoniz ( ) const
inline

References m_chConvIoniz.

◆ chName()

const char * t_conv::chName ( ) const
inlinevirtual

Implements module.

◆ comment()

void t_conv::comment ( t_warnings & )
inlinevirtual

Implements module.

◆ convIonizNewVal()

double t_conv::convIonizNewVal ( ) const
inline

References m_BadConvIoniz.

◆ convIonizOldVal()

double t_conv::convIonizOldVal ( ) const
inline

References m_BadConvIoniz.

◆ getCounter() [1/2]

long t_conv::getCounter ( const long type) const
inline

References m_counters.

◆ getCounter() [2/2]

long t_conv::getCounter ( const string & name) const
inline

References m_counters, and m_labels.

◆ getCounterMax() [1/2]

long t_conv::getCounterMax ( const long type) const
inline

References m_counters_max.

◆ getCounterMax() [2/2]

long t_conv::getCounterMax ( const string & name) const
inline

References m_counters, m_counters_max, and m_labels.

◆ getCounterName()

const char * t_conv::getCounterName ( const long type) const
inline

References m_labels.

◆ getCounterZone() [1/2]

long t_conv::getCounterZone ( const long type) const
inline

References m_counters_zone.

◆ getCounterZone() [2/2]

long t_conv::getCounterZone ( const string & name) const
inline

References m_counters, m_counters_zone, and m_labels.

◆ incrementCounter()

void t_conv::incrementCounter ( const size_t type)
inline

References m_counters, and m_counters_zone.

◆ lgConvIoniz()

bool t_conv::lgConvIoniz ( ) const
inline

References m_lgConvIoniz.

◆ ntypes()

size_t t_conv::ntypes ( void ) const
inline

References m_counters.

◆ register_()

ConvergenceCounter t_conv::register_ ( const string name)

References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), ioQQQ, m_counters, m_counters_max, m_counters_zone, and m_labels.

Here is the call graph for this function:

◆ resetConvIoniz()

void t_conv::resetConvIoniz ( )
inline

References m_BadConvIoniz, m_chConvIoniz, and m_lgConvIoniz.

Referenced by zero().

◆ resetCounters()

void t_conv::resetCounters ( )
inline

References m_counters, and m_counters_max.

Referenced by zero().

◆ resetCountersZone()

void t_conv::resetCountersZone ( )
inline

References m_counters_max, m_counters_zone, and max().

Here is the call graph for this function:

◆ setConvIonizFail()

void t_conv::setConvIonizFail ( const char * reason,
double oldval,
double newval )
inline

◆ zero()

Member Data Documentation

◆ autocv

realnum t_conv::autocv

a convergence criteria

Referenced by zero().

◆ AverEdenError

realnum t_conv::AverEdenError

remember the average electron density error

Referenced by zero().

◆ AverHeatCoolError

realnum t_conv::AverHeatCoolError

Referenced by zero().

◆ AverPressError

realnum t_conv::AverPressError

Referenced by zero().

◆ BigEdenError

realnum t_conv::BigEdenError

remember the biggest electron density error as test of convergence quality

Referenced by zero().

◆ BigHeatCoolError

realnum t_conv::BigHeatCoolError

remember the biggest and average heating-cooling error

Referenced by zero().

◆ BigPressError

realnum t_conv::BigPressError

remember the biggest and average pressure error

Referenced by zero().

◆ chNotConverged

char t_conv::chNotConverged[INPUT_LINE_LENGTH]

this gives the reason the model was declared not converged when 'iter to convergence' command is given

Referenced by zero().

◆ chSolverEden

char t_conv::chSolverEden[20]

which electron density solver to use? set with set eden solver command, simple and new

Referenced by zero().

◆ chSolverTemp

char t_conv::chSolverTemp[20]

which temperature density solver to use? set with set eden solver command, default and brent

Referenced by zero().

◆ dCmHdT

double t_conv::dCmHdT

numerical estimate of d(cooling-heating)/dT

Referenced by zero().

◆ EdenErrorAllowed

double t_conv::EdenErrorAllowed

this is relative error in the electron density we want set in zero to 0.01 reset with set eden error command

Referenced by zero().

◆ failmx

realnum t_conv::failmx

failmx is largest relative error in heating cooling match

Referenced by zero().

◆ GasPhaseAbundErrorAllowed

realnum t_conv::GasPhaseAbundErrorAllowed

allowed error in total gas-phase density of each element, including molecules change with "SET DENSITY TOLERANCE" command default set in zero

Referenced by zero().

◆ HeatCoolRelErrorAllowed

realnum t_conv::HeatCoolRelErrorAllowed

allowed error in heating - cooling balance, set with TOLERANCE command default set in zerologic

Referenced by zero().

◆ hist_pres_current

vector<double> t_conv::hist_pres_current

◆ hist_pres_density

vector<double> t_conv::hist_pres_density

these are used to retain the density pressure history in current zone, can be output with save pressure history

◆ hist_pres_error

vector<double> t_conv::hist_pres_error

◆ hist_pres_nzone

long int t_conv::hist_pres_nzone

◆ hist_temp_cool

vector<double> t_conv::hist_temp_cool

◆ hist_temp_heat

vector<double> t_conv::hist_temp_heat

◆ hist_temp_nzone

long int t_conv::hist_temp_nzone

◆ hist_temp_temp

vector<double> t_conv::hist_temp_temp

these are used to retain the temp/heat/cooling history in current zone, can be output with save temperature history

◆ ifailz

long int t_conv::ifailz[12]

zones where converge problems occurred

◆ IonizErrorAllowed

realnum t_conv::IonizErrorAllowed

Referenced by zero().

◆ lgAllTransitions

bool t_conv::lgAllTransitions

says "iterate to convergence all" command given

Referenced by zero().

◆ lgAutoIt

bool t_conv::lgAutoIt

says "iterate to convergence" command given

Referenced by zero().

◆ lgBadStop

bool t_conv::lgBadStop

flag saying that calculation stopped for bad reason mostly set in lgEndfun

◆ lgConvEden

bool t_conv::lgConvEden

true when the electron density has converged

Referenced by zero().

◆ lgConvPops

bool t_conv::lgConvPops

this flag is used in ConvPresTempEdenIoniz to check that populations have converged

◆ lgConvPres

bool t_conv::lgConvPres

true if pressure is converged, false if not

Referenced by zero().

◆ lgConvTemp

bool t_conv::lgConvTemp

true if temperature is converged, false if not

Referenced by zero().

◆ lgFirstSweepThisZone

bool t_conv::lgFirstSweepThisZone

first sweep through solvers in this zone. also true is search phase

Referenced by zero().

◆ lgIonStageTrimed

bool t_conv::lgIonStageTrimed

flag set in ConvBase, saying whether ionization stage is trimmed down

◆ lgLastSweepThisZone

bool t_conv::lgLastSweepThisZone

last sweep through solvers in this zone, so update fine opacities

Referenced by zero().

◆ lgMap

bool t_conv::lgMap

lgMap is option to map failures

Referenced by zero().

◆ lgOscilOTS

bool t_conv::lgOscilOTS

this is true if ots rates are oscillating, and this is why ionization is not converged

◆ lgSearch

bool t_conv::lgSearch

conv.lgSearch is true during initial temp-ion search phase, false after first zone established

◆ lgUpdateCouplings

bool t_conv::lgUpdateCouplings

says update inter-couplings after every ion solution

Referenced by zero().

◆ LimFail

long int t_conv::LimFail

LimFail is limit to number of te failures, set with "failures" cmnd

Referenced by zero().

◆ limPres2Ioniz

long int t_conv::limPres2Ioniz

a limit to the above, in case where one zone takes forever to not converge, usually very large, set with SET PRESIONIZ command

Referenced by zero().

◆ m_BadConvIoniz

double t_conv::m_BadConvIoniz[2]
private

when the lgConvIoniz flag is set false, the old and new numbers, the reason for the lack of convergence, should be set to following

Referenced by convIonizNewVal(), convIonizOldVal(), resetConvIoniz(), and setConvIonizFail().

◆ m_chConvIoniz

string t_conv::m_chConvIoniz
private

this says why the ionization did not converge, reasons can be a large change in the level of ionization, or in the heating

Referenced by chConvIoniz(), resetConvIoniz(), and setConvIonizFail().

◆ m_counters

std::vector<long> t_conv::m_counters
private

◆ m_counters_max

std::vector<long> t_conv::m_counters_max
private

◆ m_counters_zone

std::vector<long> t_conv::m_counters_zone
private

◆ m_labels

std::vector<string> t_conv::m_labels
private

◆ m_lgConvIoniz

bool t_conv::m_lgConvIoniz
private

this flag is used in ConvPresTempEdenIoniz to check that ionization has converged

Referenced by lgConvIoniz(), resetConvIoniz(), and setConvIonizFail().

◆ MaxFractionalDensityStepPerIteration

double t_conv::MaxFractionalDensityStepPerIteration

Referenced by zero().

◆ nChemFail

long int t_conv::nChemFail

number of chemistry solution failures

◆ nGrainFail

long int t_conv::nGrainFail

number of grain ionization balance failures

Referenced by zero().

◆ nIonFail

long int t_conv::nIonFail

nIonFail is number of ionization failures

Referenced by zero().

◆ nNeFail

long int t_conv::nNeFail

nNeFail is number of electron density failures

Referenced by zero().

◆ nPopFail

long int t_conv::nPopFail

nIonFail is number of level population failures

Referenced by zero().

◆ nPreFail

long int t_conv::nPreFail

nPreFail is number of pressure failures

Referenced by zero().

◆ nPres2Ioniz

long int t_conv::nPres2Ioniz

this will count the number of ionizations in one call from ConvPresTempEdenIoniz

Referenced by zero().

◆ nTeFail

long int t_conv::nTeFail

nTeFail number of temperature failures

Referenced by zero().

◆ nTotalFailures

long int t_conv::nTotalFailures

total number of all falures, used to trigger abort

Referenced by zero().

◆ nTotalIoniz

long int t_conv::nTotalIoniz

counts the number of calls to conv base after iteration starts can be used to determine very first pass through an iteration reset to zero at start of each iteration in a simulation

Referenced by zero().

◆ nTotalIoniz_start

long int t_conv::nTotalIoniz_start

the same counter but set to zero after the initial solution is converged, so this is a measure of the number of calls within true zones

◆ PressureErrorAllowed

realnum t_conv::PressureErrorAllowed

this is relative error in the pressure, initialized to 0.02 in reset with set pressure error command

Referenced by zero().

◆ sigma_dCmHdT

double t_conv::sigma_dCmHdT

1-sigma uncertainty in numerical estimate of d(cooling-heating)/dT


The documentation for this struct was generated from the following files: