Skip to content

Commit 7017558

Browse files
committed
sync all
2 parents 5475e9a + a64cc96 commit 7017558

File tree

770 files changed

+295777
-2483
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

770 files changed

+295777
-2483
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ jobs:
8181
RDMAV_FORK_SAFE: 1
8282

8383
steps:
84+
- name: Setup cmake
85+
uses: jwlawson/actions-setup-cmake@v2
86+
with:
87+
cmake-version: '3.31'
88+
8489
- name: Checkout repository
8590
uses: actions/checkout@v4
8691
with:

CITATION.cff

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
preferred-citation:
2+
authors:
3+
- family-names: Romano
4+
given-names: Paul K.
5+
orcid: "https://orcid.org/0000-0002-1147-045X"
6+
- final-names: Horelik
7+
given-names: Nicholas E.
8+
- family-names: Herman
9+
given-names: Bryan R.
10+
- family-names: Nelson
11+
given-names: Adam G.
12+
orcid: "https://orcid.org/0000-0002-3614-0676"
13+
- family-names: Forget
14+
given-names: Benoit
15+
orcid: "https://orcid.org/0000-0003-1459-7672"
16+
- family-names: Smith
17+
given-names: Kord
18+
contact:
19+
- family-names: Romano
20+
given-names: Paul K.
21+
orcid: "https://orcid.org/0000-0002-1147-045X"
22+
doi: 10.1016/j.anucene.2014.07.048
23+
issn: 0306-4549
24+
volume: 82
25+
journal: Annals of Nuclear Energy
26+
publisher:
27+
name: Elsevier
28+
start: 90
29+
end: 97
30+
year: 2015
31+
month: 8
32+
title: "OpenMC: A state-of-the-art Monte Carlo code for research and development"
33+
type: article
34+
url: "https://doi.org/10.1016/j.anucene.2014.07.048"

CMakeLists.txt

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ option(OPENMC_ENABLE_COVERAGE "Compile with coverage analysis flags"
3636
option(OPENMC_USE_DAGMC "Enable support for DAGMC (CAD) geometry" OFF)
3737
option(OPENMC_USE_LIBMESH "Enable support for libMesh unstructured mesh tallies" OFF)
3838
option(OPENMC_USE_MPI "Enable MPI" OFF)
39-
option(OPENMC_USE_MCPL "Enable MCPL" OFF)
4039
option(OPENMC_USE_UWUW "Enable UWUW" OFF)
40+
option(OPENMC_FORCE_VENDORED_LIBS "Explicitly use submodules defined in 'vendor'" OFF)
4141

4242
message(STATUS "OPENMC_USE_OPENMP ${OPENMC_USE_OPENMP}")
4343
message(STATUS "OPENMC_BUILD_TESTS ${OPENMC_BUILD_TESTS}")
@@ -46,8 +46,8 @@ message(STATUS "OPENMC_ENABLE_COVERAGE ${OPENMC_ENABLE_COVERAGE}")
4646
message(STATUS "OPENMC_USE_DAGMC ${OPENMC_USE_DAGMC}")
4747
message(STATUS "OPENMC_USE_LIBMESH ${OPENMC_USE_LIBMESH}")
4848
message(STATUS "OPENMC_USE_MPI ${OPENMC_USE_MPI}")
49-
message(STATUS "OPENMC_USE_MCPL ${OPENMC_USE_MCPL}")
5049
message(STATUS "OPENMC_USE_UWUW ${OPENMC_USE_UWUW}")
50+
message(STATUS "OPENMC_FORCE_VENDORED_LIBS ${OPENMC_FORCE_VENDORED_LIBS}")
5151

5252
# Warnings for deprecated options
5353
foreach(OLD_OPT IN ITEMS "openmp" "profile" "coverage" "dagmc" "libmesh")
@@ -189,15 +189,6 @@ if(${HDF5_VERSION} VERSION_GREATER_EQUAL 1.12.0)
189189
list(APPEND cxxflags -DH5Oget_info_by_idx_vers=1 -DH5O_info_t_vers=1)
190190
endif()
191191

192-
#===============================================================================
193-
# MCPL
194-
#===============================================================================
195-
196-
if (OPENMC_USE_MCPL)
197-
find_package(MCPL REQUIRED)
198-
message(STATUS "Found MCPL: ${MCPL_DIR} (found version \"${MCPL_VERSION}\")")
199-
endif()
200-
201192
#===============================================================================
202193
# Set compile/link flags based on which compiler is being used
203194
#===============================================================================
@@ -249,41 +240,61 @@ endif()
249240
# pugixml library
250241
#===============================================================================
251242

252-
find_package_write_status(pugixml)
253-
if (NOT pugixml_FOUND)
243+
if(OPENMC_FORCE_VENDORED_LIBS)
254244
add_subdirectory(vendor/pugixml)
255245
set_target_properties(pugixml PROPERTIES CXX_STANDARD 14 CXX_EXTENSIONS OFF)
246+
else()
247+
find_package_write_status(pugixml)
248+
if (NOT pugixml_FOUND)
249+
add_subdirectory(vendor/pugixml)
250+
set_target_properties(pugixml PROPERTIES CXX_STANDARD 14 CXX_EXTENSIONS OFF)
251+
endif()
256252
endif()
257253

258254
#===============================================================================
259255
# {fmt} library
260256
#===============================================================================
261257

262-
find_package_write_status(fmt)
263-
if (NOT fmt_FOUND)
258+
if(OPENMC_FORCE_VENDORED_LIBS)
264259
set(FMT_INSTALL ON CACHE BOOL "Generate the install target.")
265260
add_subdirectory(vendor/fmt)
261+
else()
262+
find_package_write_status(fmt)
263+
if (NOT fmt_FOUND)
264+
set(FMT_INSTALL ON CACHE BOOL "Generate the install target.")
265+
add_subdirectory(vendor/fmt)
266+
endif()
266267
endif()
267268

268269
#===============================================================================
269270
# xtensor header-only library
270271
#===============================================================================
271272

272-
find_package_write_status(xtensor)
273-
if (NOT xtensor_FOUND)
273+
if(OPENMC_FORCE_VENDORED_LIBS)
274274
add_subdirectory(vendor/xtl)
275275
set(xtl_DIR ${CMAKE_CURRENT_BINARY_DIR}/vendor/xtl)
276276
add_subdirectory(vendor/xtensor)
277+
else()
278+
find_package_write_status(xtensor)
279+
if (NOT xtensor_FOUND)
280+
add_subdirectory(vendor/xtl)
281+
set(xtl_DIR ${CMAKE_CURRENT_BINARY_DIR}/vendor/xtl)
282+
add_subdirectory(vendor/xtensor)
283+
endif()
277284
endif()
278285

279286
#===============================================================================
280287
# Catch2 library
281288
#===============================================================================
282289

283290
if(OPENMC_BUILD_TESTS)
284-
find_package_write_status(Catch2)
285-
if (NOT Catch2_FOUND)
291+
if (OPENMC_FORCE_VENDORED_LIBS)
286292
add_subdirectory(vendor/Catch2)
293+
else()
294+
find_package_write_status(Catch2)
295+
if (NOT Catch2_FOUND)
296+
add_subdirectory(vendor/Catch2)
297+
endif()
287298
endif()
288299
endif()
289300

@@ -343,6 +354,7 @@ list(APPEND libopenmc_SOURCES
343354
src/geometry.cpp
344355
src/geometry_aux.cpp
345356
src/hdf5_interface.cpp
357+
src/ifp.cpp
346358
src/initialize.cpp
347359
src/lattice.cpp
348360
src/material.cpp
@@ -406,6 +418,7 @@ list(APPEND libopenmc_SOURCES
406418
src/tallies/filter_materialfrom.cpp
407419
src/tallies/filter_mesh.cpp
408420
src/tallies/filter_meshborn.cpp
421+
src/tallies/filter_meshmaterial.cpp
409422
src/tallies/filter_meshsurface.cpp
410423
src/tallies/filter_mu.cpp
411424
src/tallies/filter_musurface.cpp
@@ -417,6 +430,7 @@ list(APPEND libopenmc_SOURCES
417430
src/tallies/filter_surface.cpp
418431
src/tallies/filter_time.cpp
419432
src/tallies/filter_universe.cpp
433+
src/tallies/filter_weight.cpp
420434
src/tallies/filter_zernike.cpp
421435
src/tallies/tally.cpp
422436
src/tallies/tally_scoring.cpp
@@ -489,11 +503,11 @@ else()
489503
endif()
490504

491505
if(OPENMC_USE_DAGMC)
492-
target_compile_definitions(libopenmc PRIVATE DAGMC)
506+
target_compile_definitions(libopenmc PRIVATE OPENMC_DAGMC_ENABLED)
493507
target_link_libraries(libopenmc dagmc-shared)
494508

495509
if(OPENMC_USE_UWUW)
496-
target_compile_definitions(libopenmc PRIVATE OPENMC_UWUW)
510+
target_compile_definitions(libopenmc PRIVATE OPENMC_UWUW_ENABLED)
497511
target_link_libraries(libopenmc uwuw-shared)
498512
endif()
499513
elseif(OPENMC_USE_UWUW)
@@ -502,7 +516,7 @@ elseif(OPENMC_USE_UWUW)
502516
endif()
503517

504518
if(OPENMC_USE_LIBMESH)
505-
target_compile_definitions(libopenmc PRIVATE LIBMESH)
519+
target_compile_definitions(libopenmc PRIVATE OPENMC_LIBMESH_ENABLED)
506520
target_link_libraries(libopenmc PkgConfig::LIBMESH)
507521
endif()
508522

@@ -525,11 +539,6 @@ if (OPENMC_BUILD_TESTS)
525539
add_subdirectory(tests/cpp_unit_tests)
526540
endif()
527541

528-
if (OPENMC_USE_MCPL)
529-
target_compile_definitions(libopenmc PUBLIC OPENMC_MCPL)
530-
target_link_libraries(libopenmc MCPL::mcpl)
531-
endif()
532-
533542
#===============================================================================
534543
# Log build info that this executable can report later
535544
#===============================================================================

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ARG compile_cores=1
2424
ARG build_dagmc=off
2525
ARG build_libmesh=off
2626

27-
FROM debian:bookworm-slim AS dependencies
27+
FROM ubuntu:24.04 AS dependencies
2828

2929
ARG compile_cores
3030
ARG build_dagmc
@@ -96,6 +96,7 @@ RUN if [ "$build_dagmc" = "on" ]; then \
9696
# Install addition packages required for DAGMC
9797
apt-get -y install libeigen3-dev libnetcdf-dev libtbb-dev libglfw3-dev \
9898
&& pip install --upgrade numpy \
99+
&& pip install --no-cache-dir setuptools cython \
99100
# Clone and install EMBREE
100101
&& mkdir -p $HOME/EMBREE && cd $HOME/EMBREE \
101102
&& git clone --single-branch -b ${EMBREE_TAG} --depth 1 ${EMBREE_REPO} \

0 commit comments

Comments
 (0)