Go to the documentation of this file.
54 fprintf(
ioQQQ,
" EDEN change PressureChange from to %10.3e %10.3e %10.3e\n",
73 for(
long ion=0; ion < (nelem + 2); ion++ )
76 if (nelem-ion >= 0 && nelem-ion <
NISO)
104 for( ChemAtomList::iterator atom =
atom_list.begin(); atom !=
atom_list.end(); ++atom )
106 long nelem = (*atom)->el->Z-1;
112 double sum_monatomic = 0.;
113 for(
long ion=0; ion<nelem+2; ++ion )
119 if( sum_monatomic + sum_molecules <=
SMALLFLOAT &&
122 fprintf(
ioQQQ,
"PROBLEM non-conservation of nuclei %s\tions %g moles %g error %g of %g\n",
123 (*atom)->label().c_str(),
126 sum_monatomic + sum_molecules-sum_gas_phase,
135 if( fabs( sum_monatomic + sum_molecules - sum_gas_phase ) >
138 fprintf(
ioQQQ,
"PROBLEM non-conservation of nuclei %s\t nzone %li atoms %.12e moles %.12e sum %.12e tot gas %.12e rel err %.3e\n",
139 (*atom)->label().c_str(),
143 sum_monatomic + sum_molecules,
145 (sum_monatomic + sum_molecules - sum_gas_phase)/sum_gas_phase );
168 for (
long ipLev=0; ipLev<numStates; ipLev++)
170 abund += states[ipLev].Pop();
178 if( rel_err > err_tol )
181 if( 0 &&
nzone > 0 && loop_ion > 0 )
183 fprintf(
ioQQQ,
"PROBLEM Inconsistent states/stage pops nzone %3ld loop_ion %2ld nelem %2ld ion %2ld states = %e stage = %e error = %e\n",
193 sprintf( chConvIoniz ,
"States!=stage pops nelem %ld ion %ld ", nelem, ionStage );
211 for(
long ion=0; ion<=nelem+1; ++ion )
219 ASSERT( DenseAtomsIons > 0. );
230 fprintf(
ioQQQ,
"PROBLEM DISASTER SumDensities has found "
231 "dense.xNucleiTotal with an insane density.\n");
232 fprintf(
ioQQQ,
"The density was %.2e\n",
244 for(
long i=0; i <
LIMELM; i++ )
284 bool lgChange =
false;
291 for(
long nelem=1; nelem <
LIMELM; nelem++ )
301 for(
long ion=0; ion < (nelem + 2); ion++ )
315 static double FacAbunSav;
316 double OldAbun = 0.0;
321 OldAbun = FacAbunSav;
340 FacAbun = FacAbunSav/OldAbun;
375 const int SCALE_NEW = 1;
diatomics h2("h2", 4100., &hmi.H2_total, Yan_H2_CS)
realnum m_xMolecules[LIMELM]
t_elementnames elementnames
void TempChange(double TempNew, bool lgForceUpdate)
void ScaleIonDensities(const long nelem, const realnum factor)
void setConvIonizFail(const char *reason, double oldval, double newval)
realnum GasPhaseAbundErrorAllowed
sys_float SDIV(sys_float x)
void mole_print_species_reactions(molecule *speciesToPrint)
realnum gas_phase[LIMELM]
double AbundancesTable(double r0, double depth, long int iel)
void total_molecule_elems(realnum total[LIMELM])
const UNUSED double ATOMIC_MASS_UNIT
void lgStatesConserved(long nelem, long ionStage, qList states, long numStates, realnum err_tol, long loop_ion)
realnum scalingZoneDensity(long i)
void ScaleAllDensities(realnum factor)
NORETURN void TotalInsanity(void)
char chElementSym[LIMELM][CHARS_ELEMENT_SYM]
void EdenChange(double EdenNew)
realnum xMolecules(long nelem)
void ScaleDensitiesDeuterium(const realnum &factor)
void iso_renorm(long nelem, long ipISO, double &renorm)
const UNUSED realnum BIGFLOAT
double xIonDense[LIMELM][LIMELM+1]
const int INPUT_LINE_LENGTH
realnum AtomicWeight[LIMELM]
realnum total_molecules_gasphase(void)
molecule * findspecies(const char buf[])
valarray< class molezone > species
bool lgElemsConserved(void)
void SetGasPhaseDensity(const long nelem, const realnum density)
realnum scalingDensity(void)
void SetGasPhaseDeuterium(const realnum &Hdensity)
t_mole_global mole_global
#define DEBUG_ENTRY(funcname)