diff --git a/ratecoeff.cc b/ratecoeff.cc index f6715a1cd..ae397a166 100644 --- a/ratecoeff.cc +++ b/ratecoeff.cc @@ -63,11 +63,11 @@ auto read_ratecoeff_dat(FILE *ratecoeff_file) -> bool if (fscanf(ratecoeff_file, "%32s\n", adatafile_hash_in) != 1) { return false; } - printout("ratecoeff.dat: MD5 adata.txt = %s ", adatafile_hash_in); + printoutf("ratecoeff.dat: MD5 adata.txt = %s ", adatafile_hash_in); if (strcmp(adatafile_hash, adatafile_hash_in) == 0) { - printout("(pass)\n"); + printoutf("(pass)\n"); } else { - printout("MISMATCH: MD5 adata.txt = %s\n", adatafile_hash); + printoutf("MISMATCH: MD5 adata.txt = %s\n", adatafile_hash); return false; } @@ -75,11 +75,11 @@ auto read_ratecoeff_dat(FILE *ratecoeff_file) -> bool if (fscanf(ratecoeff_file, "%32s\n", compositionfile_hash_in) != 1) { return false; } - printout("ratecoeff.dat: MD5 compositiondata.txt %s ", compositionfile_hash_in); + printoutf("ratecoeff.dat: MD5 compositiondata.txt %s ", compositionfile_hash_in); if (strcmp(compositionfile_hash, compositionfile_hash_in) == 0) { - printout("(pass)\n"); + printoutf("(pass)\n"); } else { - printout("\nMISMATCH: MD5 compositiondata.txt = %s\n", compositionfile_hash); + printoutf("\nMISMATCH: MD5 compositiondata.txt = %s\n", compositionfile_hash); return false; } @@ -89,11 +89,11 @@ auto read_ratecoeff_dat(FILE *ratecoeff_file) -> bool if (fscanf(ratecoeff_file, "%32s\n", phixsfile_hash_in) != 1) { return false; } - printout("ratecoeff.dat: MD5 %s = %s ", phixsdata_filenames[phixsver], phixsfile_hash_in); + printoutf("ratecoeff.dat: MD5 %s = %s ", phixsdata_filenames[phixsver], phixsfile_hash_in); if (strcmp(phixsfile_hash[phixsver], phixsfile_hash_in) == 0) { - printout("(pass)\n"); + printoutf("(pass)\n"); } else { - printout("\nMISMATCH: MD5 %s = %s\n", phixsdata_filenames[phixsver], phixsfile_hash[phixsver]); + printoutf("\nMISMATCH: MD5 %s = %s\n", phixsdata_filenames[phixsver], phixsfile_hash[phixsver]); return false; } } @@ -108,37 +108,37 @@ auto read_ratecoeff_dat(FILE *ratecoeff_file) -> bool const int items_read = fscanf(ratecoeff_file, "%la %la %d %d %d %la\n", &in_T_min, &in_T_max, &in_tablesize, &in_nlines, &in_nbfcontinua, &in_ratecoeff_integral_accuracy); if (items_read != 6) { - printout("\nMISMATCH: error reading header line\n"); + printoutf("\nMISMATCH: error reading header line\n"); return false; } - printout("ratecoeff.dat: Tmin %g Tmax %g TABLESIZE %d nlines %d nbfcontinua %d in_ratecoeff_integral_accuracy %g ", - in_T_min, in_T_max, in_tablesize, in_nlines, in_nbfcontinua, in_ratecoeff_integral_accuracy); + printoutf("ratecoeff.dat: Tmin %g Tmax %g TABLESIZE %d nlines %d nbfcontinua %d in_ratecoeff_integral_accuracy %g ", + in_T_min, in_T_max, in_tablesize, in_nlines, in_nbfcontinua, in_ratecoeff_integral_accuracy); if (in_T_min != MINTEMP) { - printout("\nMISMATCH: this simulation has MINTEMP %g\n", MINTEMP); + printoutf("\nMISMATCH: this simulation has MINTEMP %g\n", MINTEMP); return false; } if (in_T_max != MAXTEMP) { - printout("\nMISMATCH: this simulation has MAXTEMP %g\n", MAXTEMP); + printoutf("\nMISMATCH: this simulation has MAXTEMP %g\n", MAXTEMP); return false; } if (in_tablesize != TABLESIZE) { - printout("\nMISMATCH: this simulation has TABLESIZE %d\n", TABLESIZE); + printoutf("\nMISMATCH: this simulation has TABLESIZE %d\n", TABLESIZE); return false; } if (in_nlines != globals::nlines) { - printout("\nMISMATCH: this simulation has nlines %d\n", globals::nlines); + printoutf("\nMISMATCH: this simulation has nlines %d\n", globals::nlines); return false; } if (in_nbfcontinua != globals::nbfcontinua) { - printout("\nMISMATCH: this simulation has nbfcontinua %d\n", globals::nbfcontinua); + printoutf("\nMISMATCH: this simulation has nbfcontinua %d\n", globals::nbfcontinua); return false; } if (in_ratecoeff_integral_accuracy != RATECOEFF_INTEGRAL_ACCURACY) { - printout("\nMISMATCH: this simulation has RATECOEFF_INTEGRAL_ACCURACY %g\n", RATECOEFF_INTEGRAL_ACCURACY); + printoutf("\nMISMATCH: this simulation has RATECOEFF_INTEGRAL_ACCURACY %g\n", RATECOEFF_INTEGRAL_ACCURACY); return false; } - printout("(pass)\n"); + printoutf("(pass)\n"); // this is redundant if the adata and composition data matches, consider removing for (int element = 0; element < get_nelements(); element++) { @@ -154,7 +154,7 @@ auto read_ratecoeff_dat(FILE *ratecoeff_file) -> bool const int ionisinglevels = get_ionisinglevels(element, ion); if (get_atomicnumber(element) != in_element || get_ionstage(element, ion) != in_ionstage || nlevels != in_levels || ionisinglevels != in_ionisinglevels) { - printout( + printoutf( "Levels or ionising levels count mismatch! element %d %d ionstage %d %d nlevels %d %d ionisinglevels " "%d %d\n", get_atomicnumber(element), in_element, get_ionstage(element, ion), in_ionstage, nlevels, in_levels, @@ -164,7 +164,7 @@ auto read_ratecoeff_dat(FILE *ratecoeff_file) -> bool } } - printout("Existing ratecoeff.dat is valid. Reading this file...\n"); + printoutf("Existing ratecoeff.dat is valid. Reading this file...\n"); for (int element = 0; element < get_nelements(); element++) { const int nions = get_nions(element) - 1; for (int ion = 0; ion < nions; ion++) { @@ -195,7 +195,7 @@ auto read_ratecoeff_dat(FILE *ratecoeff_file) -> bool if (in_corrphotoioncoeff >= 0) { corrphotoioncoeffs[get_bflutindex(iter, element, ion, level, phixstargetindex)] = in_corrphotoioncoeff; } else { - printout( + printoutf( "ERROR: USE_LUT_PHOTOION is on, but there are no corrphotoioncoeff values in ratecoeff file\n"); std::abort(); } @@ -205,7 +205,7 @@ auto read_ratecoeff_dat(FILE *ratecoeff_file) -> bool globals::bfheating_coeff[get_bflutindex(iter, element, ion, level, phixstargetindex)] = in_bfheating_coeff; } else { - printout( + printoutf( "ERROR: USE_LUT_BFHEATING is on, but there are no bfheating_coeff values in the ratecoeff " "file\n"); std::abort(); @@ -354,13 +354,13 @@ void precalculate_rate_coefficient_integrals() { const int atomic_number = get_atomicnumber(element); const int ionstage = get_ionstage(element, ion); const int nlevels = get_ionisinglevels(element, ion); - printout("Performing rate integrals for Z = %d, ionstage %d...\n", atomic_number, ionstage); + printoutf("Performing rate integrals for Z = %d, ionstage %d...\n", atomic_number, ionstage); gsl_error_handler_t *previous_handler = gsl_set_error_handler(gsl_error_handler_printout); for (int level = 0; level < nlevels; level++) { if ((level > 0) && (level % 50 == 0)) { - printout(" completed up to level %d of %d\n", level, nlevels); + printoutf(" completed up to level %d of %d\n", level, nlevels); } // coefficients are stored in node shared memory, so divide up the work on the node @@ -399,12 +399,12 @@ void precalculate_rate_coefficient_integrals() { integrator(intparas, nu_threshold, nu_max_phixs, 0, RATECOEFF_INTEGRAL_ACCURACY, GSL_INTEG_GAUSS61, &alpha_sp, &error); if (status != 0 && (status != 18 || (error / alpha_sp) > epsrelwarning)) { - printout("alpha_sp integrator status %d. Integral value %9.3e +/- %9.3e\n", status, alpha_sp, error); + printoutf("alpha_sp integrator status %d. Integral value %9.3e +/- %9.3e\n", status, alpha_sp, error); } alpha_sp *= FOURPI * sfac * phixstargetprobability; if (!std::isfinite(alpha_sp) || alpha_sp < 0) { - printout( + printoutf( "WARNING: alpha_sp was negative or non-finite for level %d Te %g. alpha_sp %g sfac %g " "phixstargetindex %d phixstargetprobability %g\n", level, T_e, alpha_sp, sfac, phixstargetindex, phixstargetprobability); @@ -419,12 +419,12 @@ void precalculate_rate_coefficient_integrals() { RATECOEFF_INTEGRAL_ACCURACY, GSL_INTEG_GAUSS61, &gammacorr, &error); if (status != 0 && (status != 18 || (error / gammacorr) > epsrelwarning)) { - printout("gammacorr integrator status %d. Integral value %9.3e +/- %9.3e\n", status, gammacorr, error); + printoutf("gammacorr integrator status %d. Integral value %9.3e +/- %9.3e\n", status, gammacorr, error); } gammacorr *= FOURPI * phixstargetprobability; assert_always(gammacorr >= 0); if (gammacorr < 0) { - printout("WARNING: gammacorr was negative for level %d\n", level); + printoutf("WARNING: gammacorr was negative for level %d\n", level); gammacorr = 0; } corrphotoioncoeffs[bflutindex] = gammacorr; @@ -438,12 +438,12 @@ void precalculate_rate_coefficient_integrals() { &this_bfheating_coeff, &error); if (status != 0 && (status != 18 || (error / this_bfheating_coeff) > epsrelwarning)) { - printout("bfheating_coeff integrator status %d. Integral value %9.3e +/- %9.3e\n", status, - this_bfheating_coeff, error); + printoutf("bfheating_coeff integrator status %d. Integral value %9.3e +/- %9.3e\n", status, + this_bfheating_coeff, error); } this_bfheating_coeff *= FOURPI * phixstargetprobability; if (this_bfheating_coeff < 0) { - printout("WARNING: bfheating_coeff was negative for level %d\n", level); + printoutf("WARNING: bfheating_coeff was negative for level %d\n", level); this_bfheating_coeff = 0; } globals::bfheating_coeff[bflutindex] = this_bfheating_coeff; @@ -455,12 +455,12 @@ void precalculate_rate_coefficient_integrals() { RATECOEFF_INTEGRAL_ACCURACY, GSL_INTEG_GAUSS61, &this_bfcooling_coeff, &error); if (status != 0 && (status != 18 || (error / this_bfcooling_coeff) > epsrelwarning)) { - printout("bfcooling_coeff integrator status %d. Integral value %9.3e +/- %9.3e\n", status, - this_bfcooling_coeff, error); + printoutf("bfcooling_coeff integrator status %d. Integral value %9.3e +/- %9.3e\n", status, + this_bfcooling_coeff, error); } this_bfcooling_coeff *= FOURPI * sfac * phixstargetprobability; if (!std::isfinite(this_bfcooling_coeff) || this_bfcooling_coeff < 0) { - printout( + printoutf( "WARNING: bfcooling_coeff was negative or non-finite for level %d Te %g. bfcooling_coeff %g sfac %g " "phixstargetindex %d phixstargetprobability %g\n", level, T_e, this_bfcooling_coeff, sfac, phixstargetindex, phixstargetprobability); @@ -514,16 +514,16 @@ void read_recombrate_file() { use_cellcache = false; FILE *recombrate_file = fopen("recombrates.txt", "r"); if (recombrate_file == nullptr) { - printout("No recombrates.txt file found. Skipping recombination rate scaling...\n"); + printoutf("No recombrates.txt file found. Skipping recombination rate scaling...\n"); return; } - printout("Reading recombination rate file (recombrates.txt)...\n"); + printoutf("Reading recombination rate file (recombrates.txt)...\n"); const double Te_estimate = RECOMBCALIBRATION_T_ELEC; const double log_Te_estimate = log10(Te_estimate); - printout("Calibrating recombination rates for a temperature of %.1f K\n", Te_estimate); + printoutf("Calibrating recombination rates for a temperature of %.1f K\n", Te_estimate); struct RRCRow { double log_Te; @@ -536,7 +536,7 @@ void read_recombrate_file() { int tablerows = 0; while (fscanf(recombrate_file, "%d %d %d\n", &atomicnumber, &upperionstage, &tablerows) > 0) { - // printout("%d %d %d\n", atomicnumber, upperionstage, tablerows); + // printoutf("%d %d %d\n", atomicnumber, upperionstage, tablerows); RRCRow T_highestbelow = {.log_Te = 0, .rrc_low_n = 0, .rrc_total = 0}; RRCRow T_lowestabove = {.log_Te = 0, .rrc_low_n = 0, .rrc_total = 0}; @@ -561,7 +561,7 @@ void read_recombrate_file() { if (element >= 0) { const int ion = upperionstage - get_ionstage(element, 0); // the index of the upper ion if (ion > 0 && ion < get_nions(element)) { - printout("Z=%d ionstage %d->%d\n", atomicnumber, upperionstage, upperionstage - 1); + printoutf("Z=%d ionstage %d->%d\n", atomicnumber, upperionstage, upperionstage - 1); assert_always(T_highestbelow.log_Te > 0); assert_always(T_lowestabove.log_Te > 0); @@ -577,17 +577,17 @@ void read_recombrate_file() { double rrc = calculate_ionrecombcoeff(-1, Te_estimate, element, ion, assume_lte, false, printdebug, false, per_groundmultipletpop, false); - printout(" rrc: %10.3e\n", rrc); + printoutf(" rrc: %10.3e\n", rrc); if (input_rrc_low_n >= 0) // if it's < 0, ignore it { - printout(" input_rrc_low_n: %10.3e\n", input_rrc_low_n); + printoutf(" input_rrc_low_n: %10.3e\n", input_rrc_low_n); const double phixs_multiplier = input_rrc_low_n / rrc; if (phixs_multiplier < 0.05 || phixs_multiplier >= 2.0) { - printout(" Not scaling phixs of all levels by %.3f (because < 0.05 or >= 2.0)\n", phixs_multiplier); + printoutf(" Not scaling phixs of all levels by %.3f (because < 0.05 or >= 2.0)\n", phixs_multiplier); } else { - printout(" scaling phixs of all levels by %.3f\n", phixs_multiplier); + printoutf(" scaling phixs of all levels by %.3f\n", phixs_multiplier); for (int level = 0; level < nlevels; level++) { scale_level_phixs(element, ion - 1, level, phixs_multiplier); @@ -595,23 +595,23 @@ void read_recombrate_file() { rrc = calculate_ionrecombcoeff(-1, Te_estimate, element, ion, assume_lte, false, printdebug, false, per_groundmultipletpop, false); - printout(" rrc: %10.3e\n", rrc); + printoutf(" rrc: %10.3e\n", rrc); } } // hopefully the RRC now matches the low_n value well, if it was defined // Next, use the superlevel recombination rates to make up the excess needed to reach the total RRC - printout(" input_rrc_total: %10.3e\n", input_rrc_total); + printoutf(" input_rrc_total: %10.3e\n", input_rrc_total); if (rrc < input_rrc_total) { const double rrc_superlevel = calculate_ionrecombcoeff(-1, Te_estimate, element, ion, assume_lte, false, printdebug, true, per_groundmultipletpop, false); - printout(" rrc(superlevel): %10.3e\n", rrc_superlevel); + printoutf(" rrc(superlevel): %10.3e\n", rrc_superlevel); if (rrc_superlevel > 0) { const double phixs_multiplier_superlevel = 1.0 + ((input_rrc_total - rrc) / rrc_superlevel); - printout(" scaling phixs of levels in the superlevel by %.3f\n", phixs_multiplier_superlevel); + printoutf(" scaling phixs of levels in the superlevel by %.3f\n", phixs_multiplier_superlevel); assert_always(phixs_multiplier_superlevel >= 0); const int first_superlevel_level = get_nlevels_nlte(element, ion - 1) + 1; @@ -619,9 +619,9 @@ void read_recombrate_file() { scale_level_phixs(element, ion - 1, level, phixs_multiplier_superlevel); } } else { - printout("There is no superlevel recombination, so multiplying all levels instead\n"); + printoutf("There is no superlevel recombination, so multiplying all levels instead\n"); const double phixs_multiplier = input_rrc_total / rrc; - printout(" scaling phixs of all levels by %.3f\n", phixs_multiplier); + printoutf(" scaling phixs of all levels by %.3f\n", phixs_multiplier); assert_always(phixs_multiplier >= 0); for (int level = 0; level < nlevels; level++) { @@ -629,9 +629,9 @@ void read_recombrate_file() { } } } else { - printout("rrc >= input_rrc_total!\n"); + printoutf("rrc >= input_rrc_total!\n"); const double phixs_multiplier = input_rrc_total / rrc; - printout(" scaling phixs of all levels by %.3f\n", phixs_multiplier); + printoutf(" scaling phixs of all levels by %.3f\n", phixs_multiplier); assert_always(phixs_multiplier >= 0); for (int level = 0; level < nlevels; level++) { @@ -641,7 +641,7 @@ void read_recombrate_file() { rrc = calculate_ionrecombcoeff(-1, Te_estimate, element, ion, assume_lte, false, printdebug, false, per_groundmultipletpop, false); - printout(" rrc: %10.3e\n", rrc); + printoutf(" rrc: %10.3e\n", rrc); } } } @@ -720,7 +720,7 @@ auto calculate_stimrecombcoeff_integral(const int element, const int lowerion, c // if (status != 0) // { // error *= FOURPI * get_phixsprobability(element, ion, level, phixstargetindex); - // printout("stimrecombcoeff gsl integrator warning %d. modelgridindex %d Z=%d ionstage %d lower %d + // printoutf("stimrecombcoeff gsl integrator warning %d. modelgridindex %d Z=%d ionstage %d lower %d // phixstargetindex %d gamma %g error %g\n", // status, modelgridindex, get_atomicnumber(element), get_ionstage(element, ion), level, // phixstargetindex, gammacorr, error); @@ -799,7 +799,7 @@ auto calculate_corrphotoioncoeff_integral(int element, const int ion, const int gsl_set_error_handler(previous_handler); if (status != 0 && (status != 18 || (error / gammacorr) > epsrelwarning)) { - printout( + printoutf( "corrphotoioncoeff gsl integrator warning %d. modelgridindex %d Z=%d ionstage %d lower %d phixstargetindex %d " "integral %g error %g\n", status, modelgridindex, get_atomicnumber(element), get_ionstage(element, ion), level, phixstargetindex, @@ -909,7 +909,7 @@ void setup_photoion_luts() { #endif assert_always(bfcooling_coeffs != nullptr); - printout( + printoutf( "[info] mem_usage: lookup tables derived from photoionisation (spontrecombcoeff, bfcooling and " "corrphotoioncoeff/bfheating if enabled) occupy %.3f MB\n", mem_usage_photoionluts / 1024. / 1024.); @@ -984,7 +984,7 @@ __host__ __device__ auto get_spontrecombcoeff(int element, const int ion, const const double f_upper = spontrecombcoeffs[get_bflutindex(upperindex, element, ion, level, phixstargetindex)]; const double f_lower = spontrecombcoeffs[get_bflutindex(lowerindex, element, ion, level, phixstargetindex)]; - // printout("interpolate_spontrecombcoeff element %d, ion %d, level %d, upper %g, lower %g\n", + // printoutf("interpolate_spontrecombcoeff element %d, ion %d, level %d, upper %g, lower %g\n", // element,ion,level,f_upper,f_lower); Alpha_sp = (f_lower + (f_upper - f_lower) / (T_upper - T_lower) * (T_e - T_lower)); } else { @@ -1076,7 +1076,7 @@ auto calculate_ionrecombcoeff(const int modelgridindex, const float T_e, const i const double alpha_ion_contrib = alpha_level * nnupperlevel / nnupperion; alpha += alpha_ion_contrib; if (printdebug && alpha_ion_contrib > 0. && lower < 50) { - printout( + printoutf( "recomb: Z=%d ionstage %d->%d upper+1 %5d lower+1 %5d alpha_level %7.2e alpha_ion_contrib %7.2e sum " "%7.2e nnlevel %7.2e nnionfrac %7.2e\n", get_atomicnumber(element), get_ionstage(element, lowerion + 1), get_ionstage(element, lowerion), @@ -1087,8 +1087,8 @@ auto calculate_ionrecombcoeff(const int modelgridindex, const float T_e, const i } } if (printdebug) { - printout("recomb: Z=%2d ionstage %d->%d upper+1 [all] lower+1 [all] Alpha %g\n\n", get_atomicnumber(element), - get_ionstage(element, lowerion + 1), get_ionstage(element, lowerion), alpha); + printoutf("recomb: Z=%2d ionstage %d->%d upper+1 [all] lower+1 [all] Alpha %g\n\n", get_atomicnumber(element), + get_ionstage(element, lowerion + 1), get_ionstage(element, lowerion), alpha); } return alpha; } @@ -1100,7 +1100,7 @@ auto calculate_ionrecombcoeff(const int modelgridindex, const float T_e, const i // W is easily factored out. For stimulated recombination we must assume // T_e = T_R for this precalculation. void ratecoefficients_init() { - printout("time before tabulation of rate coefficients %ld\n", std::time(nullptr)); + printoutf("time before tabulation of rate coefficients %ld\n", std::time(nullptr)); // Determine the temperature grids gridsize T_step_log = (log(MAXTEMP) - log(MINTEMP)) / (TABLESIZE - 1.); @@ -1119,11 +1119,11 @@ void ratecoefficients_init() { if (ratecoeff_file != nullptr) { ratecoeff_match = read_ratecoeff_dat(ratecoeff_file); if (!ratecoeff_match) { - printout("[info] ratecoefficients_init: ratecoeff.dat does not match current simulation. Recalculating...\n"); + printoutf("[info] ratecoefficients_init: ratecoeff.dat does not match current simulation. Recalculating...\n"); } fclose(ratecoeff_file); } else { - printout("[info] ratecoefficients_init: ratecoeff.dat file not found. Creating a new one...\n"); + printoutf("[info] ratecoefficients_init: ratecoeff.dat file not found. Creating a new one...\n"); } } #ifdef MPI_ON @@ -1149,7 +1149,7 @@ void ratecoefficients_init() { precalculate_ion_alpha_sp(); - printout("time after tabulation of rate coefficients %ld\n", std::time(nullptr)); + printoutf("time after tabulation of rate coefficients %ld\n", std::time(nullptr)); } auto interpolate_corrphotoioncoeff(const int element, const int ion, const int level, const int phixstargetindex, @@ -1310,7 +1310,7 @@ auto iongamma_is_zero(const int nonemptymgi, const int element, const int ion) - } const double epsilon_trans = epsilon(element, ion + 1, upperlevel) - epsilon(element, ion, level); - // printout("%g %g %g\n", get_levelpop(n,element,ion,level),col_ionization(n,0,epsilon_trans),epsilon_trans); + // printoutf("%g %g %g\n", get_levelpop(n,element,ion,level),col_ionization(n,0,epsilon_trans),epsilon_trans); if (nnlevel * col_ionization_ratecoeff(T_e, nne, element, ion, level, phixstargetindex, epsilon_trans) > 0) { return false; @@ -1348,7 +1348,7 @@ auto calculate_iongamma_per_gspop(const int modelgridindex, const int element, c Col_ion += nnlevel * col_ionization_ratecoeff(T_e, nne, element, ion, level, phixstargetindex, epsilon_trans); } } - // printout("element %d ion %d: col/gamma %g Te %g ne %g\n", element, ion, Col_ion/Gamma, grid::get_Te(n), + // printoutf("element %d ion %d: col/gamma %g Te %g ne %g\n", element, ion, Col_ion/Gamma, grid::get_Te(n), // grid::get_nne(n)); Gamma += Col_ion; Gamma /= get_groundlevelpop(modelgridindex, element, ion); @@ -1441,7 +1441,7 @@ auto calculate_iongamma_per_ionpop(const int modelgridindex, const float T_e, co if (printdebug && (gamma_ion_contribution_integral > 0. || gamma_ion_contribution_used > 0.) && lower < 20) { const double threshold_angstroms = 1e8 * CLIGHT / (get_phixs_threshold(element, lowerion, lower, phixstargetindex) / H); - printout( + printoutf( "Gamma_R: Z=%d ionstage %d->%d lower+1 %5d upper+1 %5d lambda_threshold %7.1f Gamma_integral %7.2e " "Gamma_bfest %7.2e Gamma_used %7.2e Gamma_used_sum %7.2e\n", get_atomicnumber(element), get_ionstage(element, lowerion), get_ionstage(element, lowerion + 1), lower + 1, @@ -1451,9 +1451,9 @@ auto calculate_iongamma_per_ionpop(const int modelgridindex, const float T_e, co } } if (printdebug) { - printout("Gamma_R: Z=%d ionstage %d->%d lower+1 [all] upper+1 [all] Gamma_used_ion %7.2e\n", - get_atomicnumber(element), get_ionstage(element, lowerion), get_ionstage(element, lowerion + 1), - gamma_ion_used); + printoutf("Gamma_R: Z=%d ionstage %d->%d lower+1 [all] upper+1 [all] Gamma_used_ion %7.2e\n", + get_atomicnumber(element), get_ionstage(element, lowerion), get_ionstage(element, lowerion + 1), + gamma_ion_used); } return gamma_ion;