Cloudy
Spectral Synthesis Code for Astrophysics
|
#include "cddefines.h"
#include "yield.h"
#include "prt.h"
#include "continuum.h"
#include "iso.h"
#include "dynamics.h"
#include "grainvar.h"
#include "newton_step.h"
#include "conv.h"
#include "secondaries.h"
#include "phycon.h"
#include "atmdat.h"
#include "heavy.h"
#include "elementnames.h"
#include "ionbal.h"
#include "trace.h"
#include "ion_trim.h"
#include "mole.h"
#include "freebound.h"
#include "dense.h"
#include "thirdparty.h"
Macros | |
#define | MAT(M_, I_, J_) |
#define | MAT1(M_, I_, J_) |
#define | MAT2(M_, I_, J_) |
Functions | |
STATIC bool | lgTrivialSolution (long nelem, double abund_total) |
STATIC void | find_solution (long nelem, long ion_range, valarray< double > &xmat, valarray< double > &source) |
STATIC void | fill_array (long int nelem, long ion_range, valarray< double > &xmat, valarray< double > &auger) |
STATIC void | fill_ext_src_and_snk (long nelem, long ion_low, long ion_range, valarray< double > &xmat, valarray< double > &source) |
STATIC double | get_total_abundance_ions (long int nelem) |
STATIC void | HomogeneousSource (long nelem, long ion_low, long ion_range, valarray< double > &xmat, valarray< double > &source, double abund_total) |
STATIC void | renorm_solution (long nelem, long ion_range, long ion_low, double *source, double abund_total, bool *lgNegPop) |
STATIC void | store_new_densities (long nelem, long ion_range, long ion_low, double *source) |
STATIC void | clean_up (long nelem, double abund_total) |
STATIC void | PrintRates (long nelem, bool lgNegPop, double abund_total, valarray< double > &auger, bool lgPrintIt) |
void | solveions (double *ion, double *rec, double *snk, double *src, long int nlev, long int nmax) |
void | ion_solver (long int nelem, bool lgPrintIt) |
void | ion_wrapper (long nelem) |
#define MAT | ( | M_, | |
I_, | |||
J_ ) |
Referenced by fill_array(), fill_ext_src_and_snk(), find_solution(), HomogeneousSource(), and renorm_solution().
STATIC void clean_up | ( | long | nelem, |
double | abund_total ) |
References ASSERT, DEBUG_ENTRY, dense, fixit, ion_trim_small(), ipH_LIKE, iso_renorm(), NISO, and STATIC.
Referenced by ion_solver().
STATIC void fill_array | ( | long int | nelem, |
long | ion_range, | ||
valarray< double > & | xmat, | ||
valarray< double > & | auger ) |
References ASSERT, atmdat, DEBUG_ENTRY, dense, t_yield::elec_eject_frac(), gv, Heavy, Singleton< t_yield >::Inst(), ionbal, iso_sp, LIMELM, MAT, MIN2, mole, t_atmdat::NCX, t_yield::nelec_eject(), NISO, SDIV(), secondaries, and STATIC.
Referenced by ion_solver().
STATIC void fill_ext_src_and_snk | ( | long | nelem, |
long | ion_low, | ||
long | ion_range, | ||
valarray< double > & | xmat, | ||
valarray< double > & | source ) |
References DEBUG_ENTRY, MAT, mole, and STATIC.
Referenced by ion_solver().
STATIC void find_solution | ( | long | nelem, |
long | ion_range, | ||
valarray< double > & | xmat, | ||
valarray< double > & | source ) |
References ASSERT, cdEXIT, conv, DEBUG_ENTRY, dense, elementnames, EXIT_FAILURE, fnzone, fprintf(), getrf_wrapper(), getrs_wrapper(), ionbal, ioQQQ, ipHYDROGEN, isnan, MAT, MAX_DENSITY, mole, NULL, phycon, solve_system(), and STATIC.
Referenced by ion_solver().
STATIC double get_total_abundance_ions | ( | long int | nelem | ) |
References ASSERT, conv, DEBUG_ENTRY, dense, fp_equal_tol(), fprintf(), ionbal, ioQQQ, LIMELM, MAX_DENSITY, and STATIC.
Referenced by ion_solver().
STATIC void HomogeneousSource | ( | long | nelem, |
long | ion_low, | ||
long | ion_range, | ||
valarray< double > & | xmat, | ||
valarray< double > & | source, | ||
double | abund_total ) |
void ion_solver | ( | long int | nelem, |
bool | lgPrintIt ) |
ion_solver solve the bi-diagonal matrix for ionization balance
nelem | - element number on C scale, He is 1 |
lgPrintIt | - option to print details of matrix elements |
References ASSERT, broken(), clean_up(), conv, DEBUG_ENTRY, dense, fill_array(), fill_ext_src_and_snk(), find_solution(), get_total_abundance_ions(), Heavy, HomogeneousSource(), ionbal, ipCARBON, ipH_LIKE, iso_charge_transfer_update(), iso_departure_coefficients(), iso_satellite_update(), iso_set_ion_rates(), iso_solve(), lgTrivialSolution(), LIMELM, MIN2, NISO, PrintRates(), prt, renorm_solution(), and store_new_densities().
Referenced by IonHelium(), IonHydro(), and IonNelem().
void ion_wrapper | ( | long | nelem | ) |
ion_wrapper a wrapper that redirects to IonHelium, IonCarbo, etc..
References ASSERT, DEBUG_ENTRY, dense, elementnames, fprintf(), IonHelium(), IonHydro(), IonNelem(), ioQQQ, ipHELIUM, ipHYDROGEN, lgElemsConserved(), LIMELM, and trace.
Referenced by ConvBase().
STATIC bool lgTrivialSolution | ( | long | nelem, |
double | abund_total ) |
References dense, ipH_LIKE, iso_renorm(), NISO, and STATIC.
Referenced by ion_solver().
STATIC void PrintRates | ( | long | nelem, |
bool | lgNegPop, | ||
double | abund_total, | ||
valarray< double > & | auger, | ||
bool | lgPrintIt ) |
References ASSERT, atmdat, cdEXIT, ContNegative(), conv, DEBUG_ENTRY, dense, dynamics, elementnames, EXIT_FAILURE, fnzone, fprintf(), gv, Heavy, ionbal, ioQQQ, ipHELIUM, ipHYDROGEN, iso_sp, min(), mole, t_atmdat::NCX, NISO, nzone, phycon, prt, SDIV(), secondaries, ShowMe(), STATIC, and TorF().
Referenced by ion_solver().
STATIC void renorm_solution | ( | long | nelem, |
long | ion_range, | ||
long | ion_low, | ||
double * | source, | ||
double | abund_total, | ||
bool * | lgNegPop ) |
References ASSERT, conv, DEBUG_ENTRY, dense, elementnames, fixit, fprintf(), ionbal, ioQQQ, iso_sp, iteration, LIMELM, MAT, MAX_DENSITY, NISO, nzone, STATIC, and TorF().
Referenced by ion_solver().
void solveions | ( | double * | ion, |
double * | rec, | ||
double * | snk, | ||
double * | src, | ||
long int | nlev, | ||
long int | nmax ) |
References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), and ioQQQ.
STATIC void store_new_densities | ( | long | nelem, |
long | ion_range, | ||
long | ion_low, | ||
double * | source ) |
References ASSERT, DEBUG_ENTRY, dense, MAX_DENSITY, and STATIC.
Referenced by ion_solver().