134 for (ChemNuclideList::iterator atom =
nuclide_list.begin();
137 if( !(*atom)->lgHasLinkedIon())
139 const long int nelem=(*atom)->el->Z-1;
143 for (
long int ion=0;ion<nelem+2;ion++)
145 if ((*atom)->ipMl[ion] != -1)
183 bool lgHi_Down =
false;
184 bool lgHi_Up =
false;
187 bool lgLo_Up =
false;
188 bool lgLo_Down =
false;
238 trimhi =
MIN2( trimhi , 1e-20f );
250 trimhi =
MIN2( trimhi , 1e-17f );
255 trimhi =
MIN2( trimhi , 1e-12f );
267 trimhi =
MIN2(trimhi, 1e-20f);
297 iso_sp[ipISO][nelem].st[level].Pop() = 0.;
325 iso_sp[ipISO][nelem].st[level].Pop() = 0.;
346 "PROBLEM DISASTER the density of ion %li of element %s is too small to be computed on this cpu.\n",
350 "Turn off the element with the command ELEMENT XXX OFF or do not consider "
351 "gas with low density, the current hydrogen density is %.2e cm-3.\n",
354 "The outer radius of the cloud is %.2e cm - should a stopping "
358 "The abort flag is being set - the calculation is stopping.\n");
387 iso_sp[ipISO][nelem].st[level].Pop() = 0.;
399 lgHi_Up_enable =
true;
402 lgHi_Up_enable =
false;
405 lgHi_Up_enable =
false;
408 lgHi_Up_enable =
false;
411 lgHi_Up_enable =
false;
426 abundnew > abundold*1.01 )
437 if (ipISO >= 0 && ipISO <
NISO)
457 if (ipISO >= 0 && ipISO <
NISO)
477 iso_sp[ipISO][nelem].st[level].Pop() = 0.;
505 iso_sp[ipISO][nelem].st[level].Pop() = 0.;
533 enum {DEBUG_LOC=
false};
534 if( DEBUG_LOC && nelem ==
ipHELIUM )
536 if( lgHi_Down ||lgHi_Up ||lgLo_Up ||lgLo_Down )
569 if( lgHi_Down || lgHi_Up || lgLo_Up || lgLo_Down )
574 enum {DEBUG_LOC=
false};
616 long int oldIonRange[2]
621 bool lgHi_Down =
false;
623 bool lgLo_Up =
false;
627 realnum trimhi , trimlo, trimcharge;
672 trimhi =
MIN2( trimhi , 1e-20f );
684 trimhi =
MIN2( trimhi , 1e-17f );
689 trimhi =
MIN2( trimhi , 1e-12f );
701 trimhi =
MIN2(trimhi, 1e-20f);
721 "PROBLEM DISASTER the density of ion %li of element %s is too small to be computed on this cpu.\n",
725 "Turn off the element with the command ELEMENT XXX OFF or do not consider "
726 "gas with low density, the current hydrogen density is %.2e cm-3.\n",
729 "The outer radius of the cloud is %.2e cm - should a stopping "
733 "The abort flag is being set - the calculation is stopping.\n");
741 double threshextend = 1.0, threshkeep = 0.125;
742 double itrim = (
dense.
IonHigh[nelem] > oldIonRange[1] ) ? threshextend : threshkeep;
769 if ( ipISO>=0 && ipISO<
NISO )
772 iso_sp[ipISO][nelem].st[level].Pop() = 0.;
782 itrim = (
dense.
IonLow[nelem] < oldIonRange[0] ) ? threshextend : threshkeep ;
805 if ( ipISO>=0 && ipISO<
NISO )
808 iso_sp[ipISO][nelem].st[level].Pop() = 0.;
828 enum {DEBUG_LOC=
false};
829 if( DEBUG_LOC && nelem ==
ipHELIUM )
831 if( lgHi_Down ||lgLo_Up )
852 if( lgHi_Down || lgLo_Up )
857 enum {DEBUG_LOC=
false};
904 double abundnew =
abund;
911 if (ipISO >= 0 && ipISO <
NISO)
920 if (ipISO >= 0 && ipISO <
NISO)
923 double frac = abund/abundnew;
966 for(
long ion=
dense.
IonHigh[nelem]+1; ion<=nelem+1; ++ion )
void ion_trim(long int nelem)
t_mole_global mole_global
realnum SetIoniz[LIMELM][LIMELM+1]
void ion_widen(long nelem)
long int IonHigh[LIMELM+1]
void ion_trim_untrim(long nelem)
bool lgTimeDependentStatic
void ion_trim_invalidate(long nelem)
ChemNuclideList nuclide_list
double anu(size_t i) const
t_elementnames elementnames
t_iso_sp iso_sp[NISO][LIMELM]
STATIC void ion_trim_from_set(long nelem)
double xIonDense[LIMELM][LIMELM+1]
long int IonLow[LIMELM+1]
void setHeating(long nelem, long ion, double heating)
realnum gas_phase[LIMELM]
void ion_trim_small(long nelem, double abund_total)
double Valence_IP_Ryd[LIMELM][LIMELM]
#define DEBUG_ENTRY(funcname)
int fprintf(const Output &stream, const char *format,...)
sys_float SDIV(sys_float x)
char chElementName[LIMELM][CHARS_ELEMENT_NAME]
void ion_trim_validate(long nelem, bool lgIonizTrimCalled)
void ion_trim2(long int nelem, long int oldIonRange[2])
long int ipHeavy[LIMELM][LIMELM]