Skip to content
Merged
Changes from all commits
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
8 changes: 8 additions & 0 deletions src/mgxs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "openmc/error.h"
#include "openmc/math_functions.h"
#include "openmc/mgxs_interface.h"
#include "openmc/nuclide.h"
#include "openmc/random_lcg.h"
#include "openmc/settings.h"
#include "openmc/string_utils.h"
Expand Down Expand Up @@ -85,6 +86,13 @@ void Mgxs::metadata_from_hdf5(hid_t xs_id, const vector<double>& temperature,
delete[] dset_names;
std::sort(temps_available.begin(), temps_available.end());

// Set the global upper and lower interpolation bounds to avoid errors
Comment thread
nuclearkevin marked this conversation as resolved.
// involving C-API functions.
data::temperature_min =
std::min(data::temperature_min, temps_available.front());
data::temperature_max =
std::max(data::temperature_max, temps_available.back());

// If only one temperature is available, lets just use nearest temperature
// interpolation
if ((num_temps == 1) &&
Expand Down
Loading