From 6e7df257abf486be4690cf99e31f23d2620df863 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Sat, 28 Sep 2024 23:20:48 +0600 Subject: [PATCH 01/17] Replace UWUW to UWUW_HPP --- CMakeLists.txt | 4 ++-- include/openmc/dagmc.h | 2 +- src/dagmc.cpp | 28 ++++++++++++++-------------- src/output.cpp | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f4cc1b527b..8f27f2f125b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ option(OPENMC_USE_LIBMESH "Enable support for libMesh unstructured mesh tall option(OPENMC_USE_MPI "Enable MPI" OFF) option(OPENMC_USE_MCPL "Enable MCPL" OFF) option(OPENMC_USE_NCRYSTAL "Enable support for NCrystal scattering" OFF) -option(OPENMC_USE_UWUW "Enable UWUW" OFF) +option(OPENMC_USE_UWUW "Enable UWUW" ON) # Warnings for deprecated options foreach(OLD_OPT IN ITEMS "openmp" "profile" "coverage" "dagmc" "libmesh") @@ -546,7 +546,7 @@ if(OPENMC_USE_NCRYSTAL) endif() if (OPENMC_USE_UWUW) - target_compile_definitions(libopenmc PRIVATE UWUW) + target_compile_definitions(libopenmc PRIVATE UWUW_HPP) target_link_libraries(libopenmc uwuw-shared) endif() diff --git a/include/openmc/dagmc.h b/include/openmc/dagmc.h index 2facf4fc05e..f02d57af604 100644 --- a/include/openmc/dagmc.h +++ b/include/openmc/dagmc.h @@ -125,7 +125,7 @@ class DAGUniverse : public Universe { //! \param[in] vol_handle The DAGMC material assignment string //! \param[in] c The OpenMC cell to which the material is assigned void uwuw_assign_material( - moab::EntityHandle vol_handle, std::unique_ptr& c) const; + moab::EntityHandle vol_handle, std::unique_ptr& c); //! Assign a material to a cell based //! \param[in] mat_string The DAGMC material assignment string diff --git a/src/dagmc.cpp b/src/dagmc.cpp index a29a2589f0b..30d27641fb9 100644 --- a/src/dagmc.cpp +++ b/src/dagmc.cpp @@ -11,7 +11,7 @@ #include "openmc/settings.h" #include "openmc/string_utils.h" -#ifdef UWUW +#ifdef UWUW_HPP #include "uwuw.hpp" #endif #include @@ -29,7 +29,7 @@ const bool DAGMC_ENABLED = true; const bool DAGMC_ENABLED = false; #endif -#ifdef UWUW +#ifdef UWUW_HPP const bool UWUW_ENABLED = true; #else const bool UWUW_ENABLED = false; @@ -431,16 +431,16 @@ void DAGUniverse::to_hdf5(hid_t universes_group) const bool DAGUniverse::uses_uwuw() const { -#ifdef UWUW +#ifdef UWUW_HPP return uwuw_ && !uwuw_->material_library.empty(); #else return false; -#endif // UWUW +#endif // UWUW_HPP } std::string DAGUniverse::get_uwuw_materials_xml() const { -#ifdef UWUW +#ifdef UWUW_HPP if (!uses_uwuw()) { throw std::runtime_error("This DAGMC Universe does not use UWUW materials"); } @@ -460,12 +460,12 @@ std::string DAGUniverse::get_uwuw_materials_xml() const return ss.str(); #else fatal_error("DAGMC was not configured with UWUW."); -#endif // UWUW +#endif // UWUW_HPP } void DAGUniverse::write_uwuw_materials_xml(const std::string& outfile) const { -#ifdef UWUW +#ifdef UWUW_HPP if (!uses_uwuw()) { throw std::runtime_error( "This DAGMC universe does not use UWUW materials."); @@ -478,7 +478,7 @@ void DAGUniverse::write_uwuw_materials_xml(const std::string& outfile) const mats_xml.close(); #else fatal_error("DAGMC was not configured with UWUW."); -#endif +#endif // UWUW_HPP } void DAGUniverse::legacy_assign_material( @@ -540,7 +540,7 @@ void DAGUniverse::legacy_assign_material( void DAGUniverse::read_uwuw_materials() { -#ifdef UWUW +#ifdef UWUW_HPP // If no filename was provided, don't read UWUW materials if (filename_ == "") return; @@ -580,13 +580,13 @@ void DAGUniverse::read_uwuw_materials() } #else fatal_error("DAGMC was not configured with UWUW."); -#endif +#endif // UWUW_HPP } void DAGUniverse::uwuw_assign_material( - moab::EntityHandle vol_handle, std::unique_ptr& c) const + moab::EntityHandle vol_handle, std::unique_ptr& c) { -#ifdef UWUW +#ifdef UWUW_HPP // read materials from uwuw material file read_uwuw_materials(); @@ -601,11 +601,11 @@ void DAGUniverse::uwuw_assign_material( } else { fatal_error(fmt::format("Material with value '{}' not found in the " "UWUW material library", - mat_str)); + uwuw_mat)); // Replaced mat_str with uwuw_mat } #else fatal_error("DAGMC was not configured with UWUW."); -#endif +#endif // UWUW_HPP } //============================================================================== // DAGMC Cell implementation diff --git a/src/output.cpp b/src/output.cpp index 5fdbea1304e..0fae5817f79 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -347,7 +347,7 @@ void print_build_info() #ifdef COVERAGEBUILD coverage = y; #endif -#ifdef UWUW +#ifdef UWUW_HPP uwuw = y; #endif From c9413a436f8578f9223f8c71e58578c3f27976ca Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Sun, 29 Sep 2024 08:56:06 +0600 Subject: [PATCH 02/17] change UWUW_HPP to DAGMC_UWUW --- CMakeLists.txt | 13 ++++++++----- src/dagmc.cpp | 24 ++++++++++++------------ src/output.cpp | 2 +- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f27f2f125b..256e43610ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -509,6 +509,14 @@ endif() if(OPENMC_USE_DAGMC) target_compile_definitions(libopenmc PRIVATE DAGMC) target_link_libraries(libopenmc dagmc-shared) + + if(OPENMC_USE_UWUW) + target_compile_definitions(libopenmc PRIVATE DAGMC_UWUW) + target_link_libraries(libopenmc uwuw-shared) + endif() +elseif(OPENMC_USE_UWUW) + set(OPENMC_USE_UWUW OFF) + message(WARNING "UWUW is enabled but DAGMC was not found. Disabling.") endif() if(OPENMC_USE_LIBMESH) @@ -545,11 +553,6 @@ if(OPENMC_USE_NCRYSTAL) target_link_libraries(libopenmc NCrystal::NCrystal) endif() -if (OPENMC_USE_UWUW) - target_compile_definitions(libopenmc PRIVATE UWUW_HPP) - target_link_libraries(libopenmc uwuw-shared) -endif() - #=============================================================================== # Log build info that this executable can report later #=============================================================================== diff --git a/src/dagmc.cpp b/src/dagmc.cpp index 30d27641fb9..3897343311e 100644 --- a/src/dagmc.cpp +++ b/src/dagmc.cpp @@ -11,7 +11,7 @@ #include "openmc/settings.h" #include "openmc/string_utils.h" -#ifdef UWUW_HPP +#ifdef DAGMC_UWUW #include "uwuw.hpp" #endif #include @@ -29,7 +29,7 @@ const bool DAGMC_ENABLED = true; const bool DAGMC_ENABLED = false; #endif -#ifdef UWUW_HPP +#ifdef DAGMC_UWUW const bool UWUW_ENABLED = true; #else const bool UWUW_ENABLED = false; @@ -431,16 +431,16 @@ void DAGUniverse::to_hdf5(hid_t universes_group) const bool DAGUniverse::uses_uwuw() const { -#ifdef UWUW_HPP +#ifdef DAGMC_UWUW return uwuw_ && !uwuw_->material_library.empty(); #else return false; -#endif // UWUW_HPP +#endif // DAGMC_UWUW } std::string DAGUniverse::get_uwuw_materials_xml() const { -#ifdef UWUW_HPP +#ifdef DAGMC_UWUW if (!uses_uwuw()) { throw std::runtime_error("This DAGMC Universe does not use UWUW materials"); } @@ -460,12 +460,12 @@ std::string DAGUniverse::get_uwuw_materials_xml() const return ss.str(); #else fatal_error("DAGMC was not configured with UWUW."); -#endif // UWUW_HPP +#endif // DAGMC_UWUW } void DAGUniverse::write_uwuw_materials_xml(const std::string& outfile) const { -#ifdef UWUW_HPP +#ifdef DAGMC_UWUW if (!uses_uwuw()) { throw std::runtime_error( "This DAGMC universe does not use UWUW materials."); @@ -478,7 +478,7 @@ void DAGUniverse::write_uwuw_materials_xml(const std::string& outfile) const mats_xml.close(); #else fatal_error("DAGMC was not configured with UWUW."); -#endif // UWUW_HPP +#endif // DAGMC_UWUW } void DAGUniverse::legacy_assign_material( @@ -540,7 +540,7 @@ void DAGUniverse::legacy_assign_material( void DAGUniverse::read_uwuw_materials() { -#ifdef UWUW_HPP +#ifdef DAGMC_UWUW // If no filename was provided, don't read UWUW materials if (filename_ == "") return; @@ -580,13 +580,13 @@ void DAGUniverse::read_uwuw_materials() } #else fatal_error("DAGMC was not configured with UWUW."); -#endif // UWUW_HPP +#endif // DAGMC_UWUW } void DAGUniverse::uwuw_assign_material( moab::EntityHandle vol_handle, std::unique_ptr& c) { -#ifdef UWUW_HPP +#ifdef DAGMC_UWUW // read materials from uwuw material file read_uwuw_materials(); @@ -605,7 +605,7 @@ void DAGUniverse::uwuw_assign_material( } #else fatal_error("DAGMC was not configured with UWUW."); -#endif // UWUW_HPP +#endif // DAGMC_UWUW } //============================================================================== // DAGMC Cell implementation diff --git a/src/output.cpp b/src/output.cpp index 0fae5817f79..b8c6b764db5 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -347,7 +347,7 @@ void print_build_info() #ifdef COVERAGEBUILD coverage = y; #endif -#ifdef UWUW_HPP +#ifdef DAGMC_UWUW uwuw = y; #endif From f3fe37c4655414c3d54440528b2399ea50360d2e Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Sun, 29 Sep 2024 16:01:12 +0600 Subject: [PATCH 03/17] reset to mat_str --- src/dagmc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dagmc.cpp b/src/dagmc.cpp index 3897343311e..17ab261b9b3 100644 --- a/src/dagmc.cpp +++ b/src/dagmc.cpp @@ -601,7 +601,7 @@ void DAGUniverse::uwuw_assign_material( } else { fatal_error(fmt::format("Material with value '{}' not found in the " "UWUW material library", - uwuw_mat)); // Replaced mat_str with uwuw_mat + mat_str)); } #else fatal_error("DAGMC was not configured with UWUW."); From 58c7ffb94c575cf03d435028fb687787f69d2662 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Sun, 29 Sep 2024 20:01:23 +0600 Subject: [PATCH 04/17] uwuw_mat is not defined --- src/dagmc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dagmc.cpp b/src/dagmc.cpp index 17ab261b9b3..0ac487734b5 100644 --- a/src/dagmc.cpp +++ b/src/dagmc.cpp @@ -601,7 +601,7 @@ void DAGUniverse::uwuw_assign_material( } else { fatal_error(fmt::format("Material with value '{}' not found in the " "UWUW material library", - mat_str)); + uwuw_mat)); } #else fatal_error("DAGMC was not configured with UWUW."); From f9a370c4d462b3fa9e44115510eada25f6f7ba7b Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Thu, 3 Oct 2024 09:05:27 +0600 Subject: [PATCH 05/17] DAGMC_UWUW >> OPENMC_UWUW --- CMakeLists.txt | 2 +- src/dagmc.cpp | 24 ++++++++++++------------ src/output.cpp | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 256e43610ab..b6b26b5aa13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -511,7 +511,7 @@ if(OPENMC_USE_DAGMC) target_link_libraries(libopenmc dagmc-shared) if(OPENMC_USE_UWUW) - target_compile_definitions(libopenmc PRIVATE DAGMC_UWUW) + target_compile_definitions(libopenmc PRIVATE OPENMC_UWUW) target_link_libraries(libopenmc uwuw-shared) endif() elseif(OPENMC_USE_UWUW) diff --git a/src/dagmc.cpp b/src/dagmc.cpp index 0ac487734b5..8b37a29b648 100644 --- a/src/dagmc.cpp +++ b/src/dagmc.cpp @@ -11,7 +11,7 @@ #include "openmc/settings.h" #include "openmc/string_utils.h" -#ifdef DAGMC_UWUW +#ifdef OPENMC_UWUW #include "uwuw.hpp" #endif #include @@ -29,7 +29,7 @@ const bool DAGMC_ENABLED = true; const bool DAGMC_ENABLED = false; #endif -#ifdef DAGMC_UWUW +#ifdef OPENMC_UWUW const bool UWUW_ENABLED = true; #else const bool UWUW_ENABLED = false; @@ -431,16 +431,16 @@ void DAGUniverse::to_hdf5(hid_t universes_group) const bool DAGUniverse::uses_uwuw() const { -#ifdef DAGMC_UWUW +#ifdef OPENMC_UWUW return uwuw_ && !uwuw_->material_library.empty(); #else return false; -#endif // DAGMC_UWUW +#endif // OPENMC_UWUW } std::string DAGUniverse::get_uwuw_materials_xml() const { -#ifdef DAGMC_UWUW +#ifdef OPENMC_UWUW if (!uses_uwuw()) { throw std::runtime_error("This DAGMC Universe does not use UWUW materials"); } @@ -460,12 +460,12 @@ std::string DAGUniverse::get_uwuw_materials_xml() const return ss.str(); #else fatal_error("DAGMC was not configured with UWUW."); -#endif // DAGMC_UWUW +#endif // OPENMC_UWUW } void DAGUniverse::write_uwuw_materials_xml(const std::string& outfile) const { -#ifdef DAGMC_UWUW +#ifdef OPENMC_UWUW if (!uses_uwuw()) { throw std::runtime_error( "This DAGMC universe does not use UWUW materials."); @@ -478,7 +478,7 @@ void DAGUniverse::write_uwuw_materials_xml(const std::string& outfile) const mats_xml.close(); #else fatal_error("DAGMC was not configured with UWUW."); -#endif // DAGMC_UWUW +#endif // OPENMC_UWUW } void DAGUniverse::legacy_assign_material( @@ -540,7 +540,7 @@ void DAGUniverse::legacy_assign_material( void DAGUniverse::read_uwuw_materials() { -#ifdef DAGMC_UWUW +#ifdef OPENMC_UWUW // If no filename was provided, don't read UWUW materials if (filename_ == "") return; @@ -580,13 +580,13 @@ void DAGUniverse::read_uwuw_materials() } #else fatal_error("DAGMC was not configured with UWUW."); -#endif // DAGMC_UWUW +#endif // OPENMC_UWUW } void DAGUniverse::uwuw_assign_material( moab::EntityHandle vol_handle, std::unique_ptr& c) { -#ifdef DAGMC_UWUW +#ifdef OPENMC_UWUW // read materials from uwuw material file read_uwuw_materials(); @@ -605,7 +605,7 @@ void DAGUniverse::uwuw_assign_material( } #else fatal_error("DAGMC was not configured with UWUW."); -#endif // DAGMC_UWUW +#endif // OPENMC_UWUW } //============================================================================== // DAGMC Cell implementation diff --git a/src/output.cpp b/src/output.cpp index b8c6b764db5..a430fe9a6c6 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -347,7 +347,7 @@ void print_build_info() #ifdef COVERAGEBUILD coverage = y; #endif -#ifdef DAGMC_UWUW +#ifdef OPENMC_UWUW uwuw = y; #endif From 482631b83988f0cbbc71cce6040395491d8e8911 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Thu, 3 Oct 2024 09:26:05 +0600 Subject: [PATCH 06/17] OPEMC_UWUW --- cmake/OpenMCConfig.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/OpenMCConfig.cmake.in b/cmake/OpenMCConfig.cmake.in index 44a5e0d5a3f..7d2d1a1c16d 100644 --- a/cmake/OpenMCConfig.cmake.in +++ b/cmake/OpenMCConfig.cmake.in @@ -40,5 +40,5 @@ if(@OPENMC_USE_MCPL@) endif() if(@OPENMC_USE_UWUW@) - find_package(UWUW REQUIRED) + find_package(OPEMC_UWUW REQUIRED) endif() From 1bb1f376577e5c0a478a4de0c3a4330e903fbc9d Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Thu, 3 Oct 2024 22:15:32 +0600 Subject: [PATCH 07/17] no need to find UWUW as it is a part of dagmc --- cmake/OpenMCConfig.cmake.in | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cmake/OpenMCConfig.cmake.in b/cmake/OpenMCConfig.cmake.in index 7d2d1a1c16d..1305ad3edf5 100644 --- a/cmake/OpenMCConfig.cmake.in +++ b/cmake/OpenMCConfig.cmake.in @@ -38,7 +38,3 @@ endif() if(@OPENMC_USE_MCPL@) find_package(MCPL REQUIRED) endif() - -if(@OPENMC_USE_UWUW@) - find_package(OPEMC_UWUW REQUIRED) -endif() From 78306f1573bd0b462cd51c3db98fdebea2ff5f6d Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Fri, 4 Oct 2024 00:36:56 +0600 Subject: [PATCH 08/17] add FATAL_ERROR if DAGMC was not configured with UWUW --- cmake/OpenMCConfig.cmake.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/OpenMCConfig.cmake.in b/cmake/OpenMCConfig.cmake.in index 1305ad3edf5..c9a83402678 100644 --- a/cmake/OpenMCConfig.cmake.in +++ b/cmake/OpenMCConfig.cmake.in @@ -38,3 +38,7 @@ endif() if(@OPENMC_USE_MCPL@) find_package(MCPL REQUIRED) endif() + +if(@OPENMC_USE_UWUW@ AND NOT @DAGMC_BUILD_UWUW@) + message(FATAL_ERROR "UWUW is enabled but DAGMC was not configured with UWUW.") +endif() \ No newline at end of file From fd82f3336416ff27ebed8451543cf71e38213b9a Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Fri, 4 Oct 2024 08:03:26 -0500 Subject: [PATCH 09/17] Display OpenMC version after install --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9293e319b42..c67f1935977 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -131,6 +131,11 @@ jobs: echo "$HOME/NJOY2016/build" >> $GITHUB_PATH $GITHUB_WORKSPACE/tools/ci/gha-install.sh + - name: display-config + shell: bash + run: | + openmc -v + - name: cache-xs uses: actions/cache@v4 with: From 11075c66ea64d1d3d9a0d6cc435c773634fb8bc9 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Fri, 4 Oct 2024 09:36:06 -0500 Subject: [PATCH 10/17] Move UWUW material definitions read into DAGUniverse::initialize method --- src/dagmc.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/dagmc.cpp b/src/dagmc.cpp index 8b37a29b648..8c780d422ac 100644 --- a/src/dagmc.cpp +++ b/src/dagmc.cpp @@ -112,6 +112,11 @@ void DAGUniverse::initialize() { geom_type() = GeometryType::DAG; +#ifdef OPENMC_UWUW + // read uwuw materials from the .h5m file if present + read_uwuw_materials(); +#endif + init_dagmc(); init_metadata(); @@ -587,9 +592,6 @@ void DAGUniverse::uwuw_assign_material( moab::EntityHandle vol_handle, std::unique_ptr& c) { #ifdef OPENMC_UWUW - // read materials from uwuw material file - read_uwuw_materials(); - // lookup material in uwuw if present std::string uwuw_mat = dmd_ptr->volume_material_property_data_eh[vol_handle]; if (uwuw_->material_library.count(uwuw_mat) != 0) { From 17e0b5a5ec8faa96ff1f1951f4f7c4a8aa4599c6 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Sat, 5 Oct 2024 01:33:41 +0600 Subject: [PATCH 11/17] Update cmake/OpenMCConfig.cmake.in Co-authored-by: Patrick Shriwise --- cmake/OpenMCConfig.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/OpenMCConfig.cmake.in b/cmake/OpenMCConfig.cmake.in index c9a83402678..afee6d2fde3 100644 --- a/cmake/OpenMCConfig.cmake.in +++ b/cmake/OpenMCConfig.cmake.in @@ -39,6 +39,6 @@ if(@OPENMC_USE_MCPL@) find_package(MCPL REQUIRED) endif() -if(@OPENMC_USE_UWUW@ AND NOT @DAGMC_BUILD_UWUW@) +if(@OPENMC_USE_UWUW@ AND NOT ${DAGMC_BUILD_UWUW}) message(FATAL_ERROR "UWUW is enabled but DAGMC was not configured with UWUW.") endif() \ No newline at end of file From 8ebabd80534aa12b2ddcadb6890581b0983f8445 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Sat, 5 Oct 2024 01:33:55 +0600 Subject: [PATCH 12/17] Update CMakeLists.txt Co-authored-by: Patrick Shriwise --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b6b26b5aa13..a1a92319e2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -516,7 +516,7 @@ if(OPENMC_USE_DAGMC) endif() elseif(OPENMC_USE_UWUW) set(OPENMC_USE_UWUW OFF) - message(WARNING "UWUW is enabled but DAGMC was not found. Disabling.") + message(FATAL_ERROR "DAGMC is required for use of UWUW materials.") endif() if(OPENMC_USE_LIBMESH) From 3a88e14ee40eab0deed2265dc577fbea650a2035 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Sat, 5 Oct 2024 01:49:42 +0600 Subject: [PATCH 13/17] OPENMC_USE_UWUW OFF --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a1a92319e2d..44a8d78b9c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ option(OPENMC_USE_LIBMESH "Enable support for libMesh unstructured mesh tall option(OPENMC_USE_MPI "Enable MPI" OFF) option(OPENMC_USE_MCPL "Enable MCPL" OFF) option(OPENMC_USE_NCRYSTAL "Enable support for NCrystal scattering" OFF) -option(OPENMC_USE_UWUW "Enable UWUW" ON) +option(OPENMC_USE_UWUW "Enable UWUW" OFF) # Warnings for deprecated options foreach(OLD_OPT IN ITEMS "openmp" "profile" "coverage" "dagmc" "libmesh") From 219fff791a7948b6da72695b7cdc52af6501d3ba Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Fri, 4 Oct 2024 21:59:54 -0500 Subject: [PATCH 14/17] Update error message for clarity. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 44a8d78b9c0..97a4f181c45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -516,7 +516,7 @@ if(OPENMC_USE_DAGMC) endif() elseif(OPENMC_USE_UWUW) set(OPENMC_USE_UWUW OFF) - message(FATAL_ERROR "DAGMC is required for use of UWUW materials.") + message(FATAL_ERROR "DAGMC must be enabled when UWUW is enabled.") endif() if(OPENMC_USE_LIBMESH) From 7295c3bbfd48baa7f69a8201b38d3e84bc6e0fc3 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Fri, 4 Oct 2024 22:07:23 -0500 Subject: [PATCH 15/17] Updating message about UWUW to make it clear it's related to the OpenMC configuration --- cmake/OpenMCConfig.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/OpenMCConfig.cmake.in b/cmake/OpenMCConfig.cmake.in index afee6d2fde3..b3b901de427 100644 --- a/cmake/OpenMCConfig.cmake.in +++ b/cmake/OpenMCConfig.cmake.in @@ -40,5 +40,5 @@ if(@OPENMC_USE_MCPL@) endif() if(@OPENMC_USE_UWUW@ AND NOT ${DAGMC_BUILD_UWUW}) - message(FATAL_ERROR "UWUW is enabled but DAGMC was not configured with UWUW.") + message(FATAL_ERROR "UWUW is enabled in OpenMC but the DAGMC installation discovered was not configured with UWUW.") endif() \ No newline at end of file From 93e21023c111bd91faab14b647c1949112bfbb14 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Wed, 9 Oct 2024 00:11:44 +0600 Subject: [PATCH 16/17] Re-add const --- include/openmc/dagmc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/openmc/dagmc.h b/include/openmc/dagmc.h index f02d57af604..2facf4fc05e 100644 --- a/include/openmc/dagmc.h +++ b/include/openmc/dagmc.h @@ -125,7 +125,7 @@ class DAGUniverse : public Universe { //! \param[in] vol_handle The DAGMC material assignment string //! \param[in] c The OpenMC cell to which the material is assigned void uwuw_assign_material( - moab::EntityHandle vol_handle, std::unique_ptr& c); + moab::EntityHandle vol_handle, std::unique_ptr& c) const; //! Assign a material to a cell based //! \param[in] mat_string The DAGMC material assignment string From 7d19c4b4552707827a03c21271c428fa46566c93 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Wed, 9 Oct 2024 00:13:29 +0600 Subject: [PATCH 17/17] Re add const --- src/dagmc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dagmc.cpp b/src/dagmc.cpp index 8c780d422ac..b79676c3626 100644 --- a/src/dagmc.cpp +++ b/src/dagmc.cpp @@ -589,7 +589,7 @@ void DAGUniverse::read_uwuw_materials() } void DAGUniverse::uwuw_assign_material( - moab::EntityHandle vol_handle, std::unique_ptr& c) + moab::EntityHandle vol_handle, std::unique_ptr& c) const { #ifdef OPENMC_UWUW // lookup material in uwuw if present