Address reviewer feedback

This commit is contained in:
amandalund 2021-10-20 11:49:44 -05:00
parent 07a0ff5072
commit 10e4489ff0
2 changed files with 15 additions and 7 deletions

View file

@ -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<int, int>& visited, int i_shell) const;
};

View file

@ -18,6 +18,7 @@
#include "xtensor/xview.hpp"
#include <cmath>
#include <fmt/core.h>
#include <tuple> // 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