|
GridFire v0.7.1_rc2
General Purpose Nuclear Network
|
Namespaces | |
| namespace | hashing |
Classes | |
| class | Column |
| class | ColumnBase |
| class | Table |
| class | TableBase |
Concepts | |
| concept | Streamable |
Enumerations | |
| enum class | SUNDIALS_RET_CODE_TYPES { CVODE , KINSOL } |
Functions | |
| uint_fast32_t | hash_atomic (const uint16_t a, const uint8_t z) noexcept |
| Generate a unique hash for an isotope given its mass number (A) and atomic number (Z). | |
| std::uint64_t | hash_reaction (const reaction::Reaction &reaction) noexcept |
| template<typename T > | |
| std::size_t | hash_combine (std::size_t seed, const T &v) |
| std::string | formatNuclearTimescaleLogString (const engine::DynamicEngine &engine, const fourdst::composition::Composition &composition, double T9, double rho) |
| Formats a map of nuclear species timescales into a human-readable string. | |
| template<std::ranges::input_range Container, typename Elem = std::ranges::range_reference_t<Container>, typename Transform = std::identity, typename Pred = bool(*)(const std::ranges::range_value_t<Container>&)> requires std::invocable<Transform, Elem> && Streamable<std::invoke_result_t<Transform, Elem>> && std::predicate<Pred, Elem> | |
| static std::string | iterable_to_delimited_string (const Container &container, const std::string_view delimiter=", ", Transform transform={}, Pred pred=[](const auto &){ return true;}) noexcept |
| const std::unordered_map< int, std::string > & | sundials_retcode_map (const SUNDIALS_RET_CODE_TYPES type) |
| void | check_cvode_flag (const int flag, const std::string &func_name) |
| N_Vector | init_sun_vector (uint64_t size, SUNContext sun_ctx) |
| void | check_sundials_flag (const int flag, const std::string &func_name, const SUNDIALS_RET_CODE_TYPES type) |
| size_t | visual_width (const std::string &s) |
| std::string | format_table (const std::string &tableName, const std::vector< std::unique_ptr< ColumnBase > > &columns) |
| std::string | format_table (const TableBase &table) |
| void | print_table (const std::string &tableName, const std::vector< std::unique_ptr< ColumnBase > > &columns) |
| void | print_table (const TableBase &table) |
| void | to_csv (const std::string &filename, const std::vector< std::unique_ptr< ColumnBase > > &columns) |
| nlohmann::json | to_json (const std::vector< std::unique_ptr< ColumnBase > > &columns) |
| void | to_json_file (const std::string &filename, const std::vector< std::vector< std::unique_ptr< ColumnBase > > > &tables, const std::vector< std::string > &tableNames) |
Variables | |
| static std::unordered_map< int, std::string > | cvode_ret_code_map |
| static std::unordered_map< int, std::string > | kinsol_ret_code_map |
|
strong |
|
inline |
|
inline |
|
inline |
|
inline |
| std::string gridfire::utils::formatNuclearTimescaleLogString | ( | const engine::DynamicEngine & | engine, |
| const fourdst::composition::Composition & | composition, | ||
| double | T9, | ||
| 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. |
| composition | The current composition of the plasma |
| 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
|
inlinenoexcept |
Generate a unique hash for an isotope given its mass number (A) and atomic number (Z).
This function combines the mass number and atomic number into a single 32-bit integer by shifting the mass number 8 bits to the left and OR'ing it with the atomic number. This ensures a unique representation for each isotope within physically possible ranges.
| a | The mass number (A) of the isotope. |
| z | The atomic number (Z) of the isotope. |
| std::size_t gridfire::utils::hash_combine | ( | std::size_t | seed, |
| const T & | v | ||
| ) |
|
inlinenoexcept |
|
inline |
|
staticnoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |