diff --git a/include/openmc/photon.h b/include/openmc/photon.h index 989d6dfa9c..e8ec82d107 100644 --- a/include/openmc/photon.h +++ b/include/openmc/photon.h @@ -23,10 +23,10 @@ namespace openmc { class ElectronSubshell { public: struct Transition { - int primary_subshell; - int secondary_subshell; - double energy; - double probability; + int primary_subshell; //!< Index in shells_ of originating subshell + int secondary_subshell; //!< Index in shells_ of Auger electron subshell + double energy; //!< Energy of transition + double probability; //!< Probability of transition between subshells }; // Constructors @@ -105,6 +105,12 @@ private: void compton_doppler( double alpha, double mu, double* E_out, int* i_shell, uint64_t* seed) const; + //! Calculate the maximum size of the vacancy stack in atomic relaxation + // + //! These helper functions use the subshell transition data to calculate the + //! maximum size the stack of unprocessed subshell vacancies can grow to for + //! the given element while simulating the cascade of photons and electrons + //! in atomic relaxation. int calc_max_stack_size() const; int calc_helper(std::unordered_map& visited, int i_shell) const; }; diff --git a/src/photon.cpp b/src/photon.cpp index 385583ee33..a9b9cdbf50 100644 --- a/src/photon.cpp +++ b/src/photon.cpp @@ -18,6 +18,7 @@ #include "xtensor/xview.hpp" #include +#include #include // for tie namespace openmc { @@ -191,9 +192,10 @@ PhotonInteraction::PhotonInteraction(hid_t group) // Check the maximum size of the atomic relaxation stack auto max_size = this->calc_max_stack_size(); if (max_size > MAX_STACK_SIZE && mpi::master) { - warning("The subshell vacancy stack in atomic relaxation can grow up to " + - std::to_string(max_size) + ", but the stack size limit is set to " + - std::to_string(MAX_STACK_SIZE) + "."); + warning(fmt::format( + "The subshell vacancy stack in atomic relaxation can grow up to {}, but " + "the stack size limit is set to {}.", + max_size, MAX_STACK_SIZE)); } // Determine number of electron shells