GridFire 0.0.1a
General Purpose Nuclear Network
|
Functions | |
std::string | formatNuclearTimescaleLogString (const DynamicEngine &engine, const std::vector< double > &Y, const double T9, const double rho) |
Formats a map of nuclear species timescales into a human-readable string. | |
std::string gridfire::utils::formatNuclearTimescaleLogString | ( | const DynamicEngine & | engine, |
const std::vector< double > & | Y, | ||
const double | T9, | ||
const double | rho ) |
Formats a map of nuclear species timescales into a human-readable string.
This function takes a reaction network engine and the current plasma conditions to calculate the characteristic timescales for each species. It then formats this information into a neatly aligned ASCII table, which is suitable for logging or printing to the console.
engine | A constant reference to a DynamicEngine object, used to calculate the species timescales. |
Y | A vector of the molar abundances (mol/g) for each species. |
T9 | The temperature in units of 10^9 K. |
rho | The plasma density in g/cm^3. |
Pre-conditions
engine
must be in a valid state.Y
vector must be consistent with the number of species expected by the engine
.Algorithm
getSpeciesTimescales
method on the provided engine
to get the timescale for each species under the given conditions.std::ostringstream
to build the output string.Usage
Definition at line 13 of file logging.cpp.