diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e99b6151e..e983a6566c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/openmc/mgxs/mdgxs.py b/openmc/mgxs/mdgxs.py index f511579528..7a139c7f87 100644 --- a/openmc/mgxs/mdgxs.py +++ b/openmc/mgxs/mdgxs.py @@ -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: diff --git a/openmc/mgxs_library.py b/openmc/mgxs_library.py index e3c830c230..15ad54c43a 100644 --- a/openmc/mgxs_library.py +++ b/openmc/mgxs_library.py @@ -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) diff --git a/src/dagmc.cpp b/src/dagmc.cpp index 5c614e610f..362f9a6e48 100644 --- a/src/dagmc.cpp +++ b/src/dagmc.cpp @@ -66,7 +66,7 @@ bool get_uwuw_materials_xml(std::string& s) { ss << "\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 << ""; 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 " diff --git a/tests/regression_tests/dagmc/refl/dagmc.h5m b/tests/regression_tests/dagmc/refl/dagmc.h5m index ac788d2deb..26b2116847 100644 Binary files a/tests/regression_tests/dagmc/refl/dagmc.h5m and b/tests/regression_tests/dagmc/refl/dagmc.h5m differ diff --git a/tests/regression_tests/dagmc/uwuw/dagmc.h5m b/tests/regression_tests/dagmc/uwuw/dagmc.h5m index 4fbba3bb62..52570f64ac 100644 Binary files a/tests/regression_tests/dagmc/uwuw/dagmc.h5m and b/tests/regression_tests/dagmc/uwuw/dagmc.h5m differ diff --git a/tests/regression_tests/mgxs_library_hdf5/results_true.dat b/tests/regression_tests/mgxs_library_hdf5/results_true.dat index 4aa243b9e3..4a796b0a51 100644 --- a/tests/regression_tests/mgxs_library_hdf5/results_true.dat +++ b/tests/regression_tests/mgxs_library_hdf5/results_true.dat @@ -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]]