mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 13:15:39 -04:00
parent
9bf069e636
commit
3347aeaa03
3 changed files with 9 additions and 14 deletions
|
|
@ -340,11 +340,6 @@ enum class RunMode {
|
|||
|
||||
enum class GeometryType { CSG, DAG };
|
||||
|
||||
//==============================================================================
|
||||
// Volume Calculation Constants
|
||||
|
||||
constexpr uint64_t UINT64_T_MAX {std::numeric_limits<uint64_t>::max()};
|
||||
|
||||
} // namespace openmc
|
||||
|
||||
#endif // OPENMC_CONSTANTS_H
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#include "openmc/output.h"
|
||||
|
||||
#include <algorithm> // for transform, max
|
||||
#include <cstring> // for strlen
|
||||
#include <cstdio> // for stdout
|
||||
#include <cstring> // for strlen
|
||||
#include <ctime> // for time, localtime
|
||||
#include <fstream>
|
||||
#include <iomanip> // for setw, setprecision, put_time
|
||||
|
|
@ -134,9 +134,10 @@ void header(const char* msg, int level)
|
|||
auto out = header(msg);
|
||||
|
||||
// Print header based on verbosity level.
|
||||
if (settings::verbosity >= level)
|
||||
if (settings::verbosity >= level) {
|
||||
fmt::print("\n{}\n\n", out);
|
||||
std::fflush(stdout);
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -396,7 +397,7 @@ void print_build_info()
|
|||
fmt::print("DAGMC support: {}\n", dagmc);
|
||||
fmt::print("libMesh support: {}\n", libmesh);
|
||||
fmt::print("Coverage testing: {}\n", coverage);
|
||||
fmt::print("Profiling flags: {}\n", profiling);
|
||||
fmt::print("Profiling flags: {}\n", profiling);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -225,12 +225,11 @@ vector<VolumeCalculation::Result> VolumeCalculation::execute() const
|
|||
iterations++;
|
||||
uint64_t total_samples = iterations * n_samples_;
|
||||
|
||||
// warn user if total sample size is greater than what the size_t type can
|
||||
// warn user if total sample size is greater than what the uin64_t type can
|
||||
// represent
|
||||
if (total_samples == UINT64_T_MAX) {
|
||||
if (total_samples == std::numeric_limits<uint64_t>::max()) {
|
||||
warning("The number of samples has exceeded the type used to track hits. "
|
||||
"Volume "
|
||||
"results may be inaccurate.");
|
||||
"Volume results may be inaccurate.");
|
||||
}
|
||||
|
||||
// reset
|
||||
|
|
@ -246,8 +245,8 @@ vector<VolumeCalculation::Result> VolumeCalculation::execute() const
|
|||
// Create 2D array to store atoms/uncertainty for each nuclide. Later this
|
||||
// is compressed into vectors storing only those nuclides that are
|
||||
// non-zero
|
||||
auto n_nuc = settings::run_CE ? data::nuclides.size()
|
||||
: data::mg.nuclides_.size();
|
||||
auto n_nuc =
|
||||
settings::run_CE ? data::nuclides.size() : data::mg.nuclides_.size();
|
||||
xt::xtensor<double, 2> atoms({n_nuc, 2}, 0.0);
|
||||
|
||||
#ifdef OPENMC_MPI
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue