Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Switched F90_NONE macro in MG energy filter so as to not use CE logic…
… on group 0
  • Loading branch information
jtramm committed Nov 22, 2023
commit 8e63668d6cc3e3b92604c7dadea2868612475c61
1 change: 0 additions & 1 deletion include/openmc/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ enum class GlobalTally { K_COLLISION, K_ABSORPTION, K_TRACKLENGTH, LEAKAGE };

// Miscellaneous
constexpr int C_NONE {-1};
constexpr int F90_NONE {0}; // TODO: replace usage of this with C_NONE

// Interpolation rules
enum class Interpolation {
Expand Down
2 changes: 1 addition & 1 deletion include/openmc/particle_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class ParticleData {
// Energy data
double E_; //!< post-collision energy in eV
double E_last_; //!< pre-collision energy in eV
int g_ {0}; //!< post-collision energy group (MG only)
int g_ {C_NONE};//!< post-collision energy group (MG only)
int g_last_; //!< pre-collision energy group (MG only)

// Other physical data
Expand Down
4 changes: 2 additions & 2 deletions src/tallies/filter_energy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void EnergyFilter::set_bins(gsl::span<const double> bins)
void EnergyFilter::get_all_bins(
const Particle& p, TallyEstimator estimator, FilterMatch& match) const
{
if (p.g() != F90_NONE && matches_transport_groups_) {
if (p.g() != C_NONE && matches_transport_groups_) {
if (estimator == TallyEstimator::TRACKLENGTH) {
match.bins_.push_back(data::mg.num_energy_groups_ - p.g() - 1);
} else {
Expand Down Expand Up @@ -98,7 +98,7 @@ std::string EnergyFilter::text_label(int bin) const
void EnergyoutFilter::get_all_bins(
const Particle& p, TallyEstimator estimator, FilterMatch& match) const
{
if (p.g() != F90_NONE && matches_transport_groups_) {
if (p.g() != C_NONE && matches_transport_groups_) {
match.bins_.push_back(data::mg.num_energy_groups_ - p.g() - 1);
match.weights_.push_back(1.0);

Expand Down