Merge branch 'develop' into wmp-performance-opt

This commit is contained in:
Paul Romano 2021-01-18 21:47:03 -06:00
commit 40aa74a2dc
7 changed files with 17 additions and 19 deletions

View file

@ -40,6 +40,10 @@ endif()
#===============================================================================
if(dagmc)
find_package(DAGMC REQUIRED PATH_SUFFIXES lib/cmake)
if (${DAGMC_VERSION} VERSION_LESS 3.2.0)
message(FATAL_ERROR "Discovered DAGMC Version: ${DAGMC_VERSION}. \
Please update DAGMC to version 3.2.0 or greater.")
endif()
endif()
#===============================================================================
@ -329,7 +333,7 @@ endif()
# Avoid vs error lnk1149 :output filename matches input filename
if(NOT MSVC)
set_target_properties(libopenmc PROPERTIES
OUTPUT_NAME openmc)
OUTPUT_NAME openmc)
endif()
target_include_directories(libopenmc

View file

@ -2044,7 +2044,6 @@ class DecayRate(MDGXS):
num_delayed_groups)
else:
new_shape = (num_subdomains, num_delayed_groups)
new_shape += xs.shape[1:]
xs = np.reshape(xs, new_shape)
if squeeze:

View file

@ -776,7 +776,7 @@ class XSdata:
"""
# Get the accepted shapes for this xs
shapes = [self.xs_shapes["[DG]"], self.xs_shapes["[DG][G]"]]
shapes = [self.xs_shapes["[DG]"]]
# Convert to a numpy array so we can easily get the shape for checking
decay_rate = np.asarray(decay_rate)

View file

@ -66,7 +66,7 @@ bool get_uwuw_materials_xml(std::string& s) {
ss << "<materials>\n";
const auto& mat_lib = uwuw.material_library;
// write materials
for (auto mat : mat_lib) { ss << mat.second.openmc("atom"); }
for (auto mat : mat_lib) { ss << mat.second->openmc("atom"); }
// write footer
ss << "</materials>";
s = ss.str();
@ -101,12 +101,15 @@ bool write_uwuw_materials_xml() {
return found_uwuw_mats;
}
void legacy_assign_material(const std::string& mat_string, DAGCell* c)
void legacy_assign_material(std::string mat_string, DAGCell* c)
{
bool mat_found_by_name = false;
// attempt to find a material with a matching name
to_lower(mat_string);
for (const auto& m : model::materials) {
if (mat_string == m->name_) {
std::string m_name = m->name();
to_lower(m_name);
if (mat_string == m_name) {
// assign the material with that name
if (!mat_found_by_name) {
mat_found_by_name = true;
@ -239,7 +242,7 @@ void load_dagmc_geometry()
std::string uwuw_mat = DMD.volume_material_property_data_eh[vol_handle];
if (uwuw.material_library.count(uwuw_mat) != 0) {
// Note: material numbers are set by UWUW
int mat_number = uwuw.material_library[uwuw_mat].metadata["mat_number"].asInt();
int mat_number = uwuw.material_library.get_material(uwuw_mat).metadata["mat_number"].asInt();
c->material_.push_back(mat_number);
} else {
fatal_error(fmt::format("Material with value {} not found in the "

View file

@ -193,18 +193,10 @@ domain=1 type=beta
[1.21876271e-04 8.77101834e-05]
[4.95946084e-05 3.67414816e-05]]
domain=1 type=decay-rate
[[1.33568413e-02]
[3.25887984e-02]
[1.21105565e-01]
[3.06139633e-01]
[8.62763808e-01]
[2.89789222e+00]]
[[9.57055016e-04]
[2.28222032e-03]
[8.35436401e-03]
[2.06734948e-02]
[5.63019289e-02]
[1.89486538e-01]]
[1.33568413e-02 3.25887984e-02 1.21105565e-01 3.06139633e-01
8.62763808e-01 2.89789222e+00]
[9.57055016e-04 2.28222032e-03 8.35436401e-03 2.06734948e-02
5.63019289e-02 1.89486538e-01]
domain=1 type=delayed-nu-fission matrix
[[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]