Skip to content

Commit 3347aea

Browse files
committed
Fixes related to openmc-dev#2253 and openmc-dev#2270
1 parent 9bf069e commit 3347aea

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

include/openmc/constants.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,6 @@ enum class RunMode {
340340

341341
enum class GeometryType { CSG, DAG };
342342

343-
//==============================================================================
344-
// Volume Calculation Constants
345-
346-
constexpr uint64_t UINT64_T_MAX {std::numeric_limits<uint64_t>::max()};
347-
348343
} // namespace openmc
349344

350345
#endif // OPENMC_CONSTANTS_H

src/output.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#include "openmc/output.h"
22

33
#include <algorithm> // for transform, max
4-
#include <cstring> // for strlen
54
#include <cstdio> // for stdout
5+
#include <cstring> // for strlen
66
#include <ctime> // for time, localtime
77
#include <fstream>
88
#include <iomanip> // for setw, setprecision, put_time
@@ -134,9 +134,10 @@ void header(const char* msg, int level)
134134
auto out = header(msg);
135135

136136
// Print header based on verbosity level.
137-
if (settings::verbosity >= level)
137+
if (settings::verbosity >= level) {
138138
fmt::print("\n{}\n\n", out);
139139
std::fflush(stdout);
140+
}
140141
}
141142

142143
//==============================================================================
@@ -396,7 +397,7 @@ void print_build_info()
396397
fmt::print("DAGMC support: {}\n", dagmc);
397398
fmt::print("libMesh support: {}\n", libmesh);
398399
fmt::print("Coverage testing: {}\n", coverage);
399-
fmt::print("Profiling flags: {}\n", profiling);
400+
fmt::print("Profiling flags: {}\n", profiling);
400401
}
401402
}
402403

src/volume_calc.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,11 @@ vector<VolumeCalculation::Result> VolumeCalculation::execute() const
225225
iterations++;
226226
uint64_t total_samples = iterations * n_samples_;
227227

228-
// warn user if total sample size is greater than what the size_t type can
228+
// warn user if total sample size is greater than what the uin64_t type can
229229
// represent
230-
if (total_samples == UINT64_T_MAX) {
230+
if (total_samples == std::numeric_limits<uint64_t>::max()) {
231231
warning("The number of samples has exceeded the type used to track hits. "
232-
"Volume "
233-
"results may be inaccurate.");
232+
"Volume results may be inaccurate.");
234233
}
235234

236235
// reset
@@ -246,8 +245,8 @@ vector<VolumeCalculation::Result> VolumeCalculation::execute() const
246245
// Create 2D array to store atoms/uncertainty for each nuclide. Later this
247246
// is compressed into vectors storing only those nuclides that are
248247
// non-zero
249-
auto n_nuc = settings::run_CE ? data::nuclides.size()
250-
: data::mg.nuclides_.size();
248+
auto n_nuc =
249+
settings::run_CE ? data::nuclides.size() : data::mg.nuclides_.size();
251250
xt::xtensor<double, 2> atoms({n_nuc, 2}, 0.0);
252251

253252
#ifdef OPENMC_MPI

0 commit comments

Comments
 (0)