Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
24655df
Report plot ID instead of index for unsupported plot types in random …
pshriwise Mar 31, 2025
b67771a
Random Ray AutoMagic Setup (#3351)
jtramm Apr 2, 2025
07f5334
Random Ray Point Source Locator (#3360)
jtramm Apr 2, 2025
cdc254c
Fix for Issue Loading MGXS Data Files with LLVM 20 or Newer (#3368)
jtramm Apr 10, 2025
bd95b52
Add check for equal value bins in an EnergyFilter (#3372)
shimwell Apr 11, 2025
c1a4d43
Add methods on Material class for waste disposal rating / classificat…
paulromano Apr 11, 2025
47ca291
Kinetics parameters using Iterated Fission Probability (#3133)
JoffreyDorville Apr 14, 2025
a113440
Small Fixes to Allow Random Ray to Work with DAGMC (#3374)
jtramm Apr 22, 2025
5dd6ff6
Fix negative distances from bins_crossed for CylindricalMesh (#3370)
pshriwise Apr 23, 2025
820648d
using reduce chain level to remove need for reduce chain (#3377)
shimwell Apr 23, 2025
c17908f
Install MCPL using same build type as OpenMC in CI (#3388)
paulromano May 2, 2025
4138bc3
Add option to determine waste disposal rating by nuclide (#3376)
paulromano May 3, 2025
d0354db
corrected tally name in D1S example (#3383)
shimwell May 3, 2025
a921280
Fix extremely large yields from Bremsstrahlung (#3386)
HunterBelanger May 3, 2025
512df2f
Skip atomic relaxation if binding energy is larger than photon energy…
amandalund May 3, 2025
1e7d832
Figure of Merit implementation (#3363)
Grego01-biot May 3, 2025
57dc71f
Map Compton subshell data to atomic relaxation data (#3392)
amandalund May 5, 2025
9942269
Updates to VTK data checks (#3371)
pshriwise May 5, 2025
dc619ea
Filter weight implementation (#3345)
Grego01-biot May 5, 2025
e4f55a5
Fix weight modification for uniform source sampling (#3395)
paulromano May 5, 2025
f9dca9a
Fixing an incorrect computation of CDF of bremsstrahlung photons (#3396)
GuySten May 6, 2025
c1c5c0b
Apply resolve paths to path values in `config` (#3400)
pshriwise May 8, 2025
ba834be
added type hints to model file (#3399)
shimwell May 8, 2025
f615441
Random Ray Misc Memory Error Fixes (#3405)
jtramm May 10, 2025
7382b5d
External transfer rates source term (#3088)
church89 May 12, 2025
757617b
added test for dagmc geometry plot (#3375)
shimwell May 16, 2025
a7d1ceb
small typo - spelling of Debian (#3411)
alberto743 May 18, 2025
cb95c78
Fix bug where the same mesh is written multiple times to settings.xml…
GuySten May 27, 2025
ace73ab
Fixed a bug in charged particle energy deposition. (#3416)
GuySten Jun 3, 2025
e14bb88
Update _get_start_data to always grab the beginning of timestep time …
lewisgross1296 Jun 4, 2025
dadc4fe
Fix no serialization of periodic_surface_id bug (#3421)
GuySten Jun 5, 2025
4943fa3
Avoid negative heating values during pair production and bremsstrahlu…
paulromano Jun 5, 2025
67aa0de
Random Ray External Source Plotting Fix (#3430)
jtramm Jun 6, 2025
7fda3eb
Implement a new MeshMaterialFilter (#3406)
paulromano Jun 6, 2025
56b44aa
Random Ray Missed Cell Policy Change for Adjoint Mode (#3434)
jtramm Jun 10, 2025
f796fa0
Adding fix and tests for spherical mesh as spatial distribution (#3428)
pshriwise Jun 10, 2025
f571be8
Add user setting for source rejection fraction (#3433)
paulromano Jun 11, 2025
2eeba89
Apply Max Number of Events Check to Random Rays (#3438)
jtramm Jun 11, 2025
e678b1a
Fix raytrace infinite loop. (#3423)
GuySten Jun 11, 2025
6c9c696
update units for flux (#3441)
aprilnovak Jun 12, 2025
f81962c
Allowing chain_file to be chain object to save reloading time (#3436)
shimwell Jun 12, 2025
aeb1052
Fix Resetting of Auto IDs When Generating MGXS (#3437)
jtramm Jun 13, 2025
b11eb02
Change Dockerfile from debian:bookworm-slim to ubuntu:24.04 (#3442)
paulromano Jun 13, 2025
23eab2c
Allow specifying number of equiprobable angles for thermal scattering…
janmalec Jun 14, 2025
7a1cafa
adding plot function to DAGMCUnvierse (#3451)
shimwell Jun 17, 2025
f31130d
Prevent Adjoint Sources from Trending towards Infinity (#3449)
jtramm Jun 18, 2025
1c5aa65
fixing expansion of elemental Ta bug (#3443)
GuySten Jun 18, 2025
3e32aed
Fixing crash when calling Geometry.plot when DAGMCUniverse in geometr…
shimwell Jun 18, 2025
3d16d4b
Adding checks to geometry.plot to avoid material name overlaps (#3458)
shimwell Jun 19, 2025
eaef13b
Weight Window Birth Scaling (#3459)
jtramm Jun 23, 2025
7c6aaf7
Fix Weight Window Infinite Loop Bug (#3457)
jtramm Jun 23, 2025
3a8894c
Fix Dockerfile DAGMC build (#3463)
paulromano Jun 24, 2025
2a0299a
Limit Random Ray Weight Window Generation to Final Batch (#3464)
jtramm Jun 24, 2025
15dfe7e
Parallelization of Weight Window Update (#3467)
jtramm Jun 25, 2025
a6db05a
Optimize Mapping of Random Ray Source Regions to Tallies (#3465)
jtramm Jun 25, 2025
01fa805
Introduce WeightWindowsList class that enables export to HDF5 (#3456)
paulromano Jun 25, 2025
5c10214
added openmc.Material.mean_free_path function (#3469)
shimwell Jun 26, 2025
c116288
Updated Docs to Not Give Specific Python Version Requirement (#3473)
jtramm Jun 26, 2025
25d64c9
Refactor and Harden Configuration Management (#3461)
ahnaf-tahmid-chowdhury Jun 27, 2025
b939f90
Stabilize Adjoint Source (#3476)
jtramm Jun 30, 2025
dab8af5
Support flux collapse method in `get_microxs_and_flux` (#3466)
paulromano Jul 1, 2025
ecfb666
Allow spatial constraints on element sources within MeshSource (#3431)
paulromano Jul 1, 2025
eb74d49
Introduce `openmc.lib.TemporarySession` context manager (#3475)
paulromano Jul 1, 2025
6636b7e
fix zam parsing (#3484)
GuySten Jul 3, 2025
efcf8f6
Added citation metadata file (#3409)
MicahGale Jul 3, 2025
b6c6ac0
Add flag to CMakeLists to use submodules instead of searching (#3480)
nglaser3 Jul 3, 2025
dd8d621
Only show warning if in restart mode. Refs #3477 (#3478)
aprilnovak Jul 3, 2025
d700d39
Update conda install instructions for macOS Apple silicon (#3488)
paulromano Jul 3, 2025
58ee8d8
Update OSX install instructions to point to x64 platform (#3501)
shikhar413 Jul 15, 2025
6372c29
Provide a way to get ID maps from plot parameters on the Model class …
pshriwise Jul 16, 2025
24f78e6
Use auto-chunking for StepResult HDF5 writing (#3498)
yrrepy Jul 17, 2025
5318ea6
Make MCPL a Runtime Optional Dependency (#3429)
ahnaf-tahmid-chowdhury Jul 17, 2025
bca818c
Add accessor methods for LocalCoord (#3494)
pshriwise Jul 17, 2025
4483583
automatically finding appropriate dimension when making regular mesh …
shimwell Jul 18, 2025
637e04a
Boundary info accessors (#3496)
pshriwise Jul 18, 2025
659e43a
Enabling MCPL source files to be read when using surf_source_read (#3…
JoffreyDorville Jul 18, 2025
8be6551
Adding material depletion function (#3420)
shimwell Jul 18, 2025
a649d7b
Avoid adding ParentNuclideFilter twice when calling prepare_tallies (…
shimwell Jul 18, 2025
9d9dcc2
Update DAGMC and libMesh precompiler definitions (#3510)
pshriwise Jul 22, 2025
6b672f7
Allow already-initialized openmc.lib in TemporarySession (#3505)
paulromano Jul 26, 2025
836bc48
Fix: `materials`, `plots`, and `tallies` cannot be passed as lists (#…
RemDelaporteMathurin Jul 29, 2025
4cce6ee
Fix for Weight Window Scaling Bug (#3511)
jtramm Jul 29, 2025
6f5e134
Add test for FW-CADIS based WW generation on a DAGMC model (#3504)
shimwell Jul 29, 2025
a64cc96
Fixed a bug in distribcell offsets logic (#3424)
GuySten Jul 30, 2025
4fabed5
fixed a bug in MeshMaterialFilter.from_volumes (#3520)
GuySten Aug 8, 2025
4500f07
Remove reorder_attributes from openmc._xml (#3519)
GuySten Aug 8, 2025
e36c0ae
Add stat:sum field to MCPL files for proper weight normalization (#3522)
bpolania Aug 8, 2025
a11021c
Consistent XML parsing using functions from _xml module (#3517)
GuySten Aug 8, 2025
a343653
Remove unused special accessors for tallies (#3527)
GuySten Aug 11, 2025
f8fa751
Adding 616 group structure (#3531)
shimwell Aug 13, 2025
14d51e0
more helpful error message for dose_coefficients (#3534)
shimwell Aug 14, 2025
75b5813
Use cached property for openmc.data.Decay.sources (#3535)
GuySten Aug 18, 2025
c5a7173
Avoid duplicate materials written to XML (#3536)
RemDelaporteMathurin Aug 18, 2025
68e894c
Fix a bug in time cutoff behavior (#3526)
GuySten Aug 18, 2025
e878aeb
not printing nuclides with 0 percent to terminal (option 2 ) (#3448)
shimwell Aug 21, 2025
5e3249f
fix tests that accidentaly got broken (#3543)
GuySten Aug 21, 2025
d1df80a
Leverage particle.move_distance in event advance (#3544)
GuySten Aug 22, 2025
b14eff4
fix broken CI (#3551)
GuySten Aug 27, 2025
2a278c9
Revert "fix broken CI" (#3554)
GuySten Aug 27, 2025
5529731
Refactor endf_data to be a fixture (#3539)
GuySten Aug 29, 2025
ec15803
adding ecco 33 (#3556)
shimwell Aug 30, 2025
00edc77
Change test order to run unit tests first. (#3533)
GuySten Aug 30, 2025
eaed400
Fixed a bug in plotting cross sections with S(a,b) data (#3558)
GuySten Sep 3, 2025
5918564
Bump up tolerance for flaky activation test (#3560)
paulromano Sep 3, 2025
3665090
Do not apply boundary conditions when initialized in volume calculati…
pshriwise Sep 5, 2025
ca42957
depletion: fix performance of chain matrix construction (#3567)
rwcarlsen Sep 11, 2025
c717528
PowerLaw raises an error if sampling interval contains negative value…
j-fletcher Sep 11, 2025
afd9d06
Fixed a bug when combining TimeFilter, MeshFilter, and tracklength es…
GuySten Sep 12, 2025
607f6ba
Add distributed cell densities (#3546)
nuclearkevin Sep 19, 2025
007ac81
Allow newer Sphinx version and fix docbuild warnings (#3571)
paulromano Sep 19, 2025
ecb0a33
Combing for fission site sampling, and delayed neutron emission time …
ilhamv Sep 19, 2025
ca63da9
Ensure n_dimension_ attribute is set for unstructured meshes. (#3575)
pshriwise Sep 19, 2025
8f36ff2
Update find_package calls in OpenMCConfig.cmake (#3572)
paulromano Sep 23, 2025
ed433fe
Fix performance regression in libMesh unstructured mesh tallies (#3577)
nuclearkevin Sep 23, 2025
66e7d86
Remove several TODOs related to C++17 support (#3574)
GuySten Sep 24, 2025
767db7e
Fix IFP implementation (#3580)
JoffreyDorville Sep 25, 2025
781dbf9
Multi-group capability for kinetics parameter calculations with Itera…
realmisch Sep 26, 2025
4011b7a
Optional separation of mesh-material-volume calc from get_homogenized…
yrrepy Sep 26, 2025
feefcc6
Adding tally filter type option to statepoint get_tally (#3584)
shimwell Sep 30, 2025
3ac64d9
Random Ray Base Source Region Refactor (#3576)
jtramm Oct 2, 2025
1dacf4f
Add missing documentation on <source> in depletion chain file format …
pshriwise Oct 2, 2025
91a19cf
Ensure weight_windows_file information is read from XML (#3587)
yrrepy Oct 2, 2025
7806703
Fix random ray source region mesh export when using model.export_to_x…
Copilot Oct 2, 2025
8a62e7e
Fix caching issue when using NCrystal materials (#3538)
tkittel Oct 2, 2025
50071aa
Speed up time correction factors (#3592)
shimwell Oct 3, 2025
2c15480
Add user setting for free gas threshold (#3593)
paulromano Oct 6, 2025
3dfa34d
Switch to using coveralls github action for reporting (#3594)
paulromano Oct 7, 2025
58c7fbe
Re-run flaky tests when needed (#3604)
paulromano Oct 14, 2025
e9077b1
Allow V0 in atomic_mass function (for ENDF/B-VII.0 data) (#3607)
jiankai-yu Oct 14, 2025
b94b496
Ability to source electron/positrons directly (#3404)
GuySten Oct 15, 2025
055ea15
Clip mixture distributions based on mean times integral (#3603)
paulromano Oct 17, 2025
3ac5d6f
Allow Path objects in MGXSLibrary.export_to_hdf5 (#3608)
shimwell Oct 20, 2025
c31032c
load mesh objects from weight_windows.h5 file (#3598)
GuySten Oct 21, 2025
70b5254
Random Ray Geometry Debug Mode Fix (#3615)
jtramm Oct 27, 2025
230db28
FW-CADIS Disregard Max Realizations Setting (#3616)
jtramm Oct 28, 2025
f10d7d9
Speed up `apply_time_correction` by reducing file I/O and deepcopies …
paulromano Oct 28, 2025
a74c142
Update `check_type` calls to accept both `str` and `os.PathLike` obje…
Jarvis2001 Oct 28, 2025
4c41766
Criticality search method on the Model class (#3569)
paulromano Oct 28, 2025
5fc289b
Automate workflow for mesh- or cell-based R2S calculations (#3508)
paulromano Nov 1, 2025
fd964bc
Enable specifying reference direction for azimuthal angle in PolarAzi…
GuySten Nov 3, 2025
2d8e006
Enable nuclide filters with get_decay_photon_energy (#3614)
yrrepy Nov 3, 2025
bd76fc0
Fix bug in normalization of tally results with no_reduce (#3619)
paulromano Nov 3, 2025
e5c7d0c
Adding vtkhdf option to write vtk data (#3252)
jon-proximafusion Nov 5, 2025
c0f302d
Add energy group structure: SCALE-999 (#3564)
yrrepy Nov 7, 2025
8cd3911
Reset DAGMC history when reviving from source. (#3601)
pshriwise Nov 12, 2025
5c2bfe7
Write particle states as separate lines in track VTK files. (#3628)
pshriwise Nov 12, 2025
e5348d3
Avoid divide-by-zero in `from_multigroup_flux` when flux is zero (#3624)
marco-de-pietri Nov 12, 2025
2d77544
Adding variance of variance and normality tests for tally statistics …
Grego01-biot Nov 12, 2025
4e24c2d
Update documentation for particle tracks (#3627)
aprilnovak Nov 12, 2025
50bb0df
depletion-thermochemistry: Redox control transfer rates (#2783)
church89 Nov 12, 2025
cd5cd35
Addition of a collision tracking feature (#3417)
saliba170499 Nov 13, 2025
8d61871
Avoid multiprocessing Pool when running depletion tests with MPI (#3633)
paulromano Nov 13, 2025
7815d3a
Fix typo in DAGMC lost particle test (#3634)
pshriwise Nov 14, 2025
5c63e0d
Fix a few warnings, rename add_to_tallies_file (#3639)
paulromano Nov 18, 2025
028f440
Support MPI parallelism in R2SManager (#3632)
paulromano Nov 19, 2025
f544d02
Don't write reaction rates in depletion results by default, remove pe…
paulromano Nov 19, 2025
d217efa
Add two MPI barriers in R2S workflow (#3646)
paulromano Nov 20, 2025
27e38e8
Add release notes for 0.15.3 (#3644)
paulromano Nov 22, 2025
4a46d17
chore: M1 coupling baseline compatibility
zxkjack123 Jan 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
40 changes: 36 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,18 @@ jobs:
LIBMESH: ${{ matrix.libmesh }}
NPY_DISABLE_CPU_FEATURES: "AVX512F AVX512_SKX"
OPENBLAS_NUM_THREADS: 1
PYTEST_ADDOPTS: --cov=openmc --cov-report=lcov:coverage-python.lcov
# libfabric complains about fork() as a result of using Python multiprocessing.
# We can work around it with RDMAV_FORK_SAFE=1 in libfabric < 1.13 and with
# FI_EFA_FORK_SAFE=1 in more recent versions.
RDMAV_FORK_SAFE: 1

steps:
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.31'

- name: Checkout repository
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -166,11 +172,37 @@ jobs:
uses: mxschmitt/action-tmate@v3
timeout-minutes: 10

- name: after_success
- name: Generate C++ coverage (gcovr)
shell: bash
run: |
# Produce LCOV directly from gcov data in the build tree
gcovr \
--root "$GITHUB_WORKSPACE" \
--object-directory "$GITHUB_WORKSPACE/build" \
--filter "$GITHUB_WORKSPACE/src" \
--filter "$GITHUB_WORKSPACE/include" \
--exclude "$GITHUB_WORKSPACE/src/external/.*" \
--exclude "$GITHUB_WORKSPACE/src/include/openmc/external/.*" \
--gcov-ignore-errors source_not_found \
--gcov-ignore-errors output_error \
--gcov-ignore-parse-errors suspicious_hits.warn \
--print-summary \
--lcov -o coverage-cpp.lcov || true

- name: Merge C++ and Python coverage
shell: bash
run: |
cpp-coveralls -i src -i include -e src/external --exclude-pattern "/usr/*" --dump cpp_cov.json
coveralls --merge=cpp_cov.json --service=github
# Merge C++ and Python LCOV into a single file for upload
cat coverage-cpp.lcov coverage-python.lcov > coverage.lcov

- name: Upload coverage to Coveralls
if: ${{ hashFiles('coverage.lcov') != '' }}
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
flag-name: C++ and Python
path-to-lcov: coverage.lcov

finish:
needs: main
Expand All @@ -179,5 +211,5 @@ jobs:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ CMakeSettings.json

# Visual Studio Code configuration files
.vscode/
.devcontainer/

# Local install prefix (CMake)
install/

# Python pickle files
*.pkl
34 changes: 34 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
preferred-citation:
authors:
- family-names: Romano
given-names: Paul K.
orcid: "https://orcid.org/0000-0002-1147-045X"
- final-names: Horelik
given-names: Nicholas E.
- family-names: Herman
given-names: Bryan R.
- family-names: Nelson
given-names: Adam G.
orcid: "https://orcid.org/0000-0002-3614-0676"
- family-names: Forget
given-names: Benoit
orcid: "https://orcid.org/0000-0003-1459-7672"
- family-names: Smith
given-names: Kord
contact:
- family-names: Romano
given-names: Paul K.
orcid: "https://orcid.org/0000-0002-1147-045X"
doi: 10.1016/j.anucene.2014.07.048
issn: 0306-4549
volume: 82
journal: Annals of Nuclear Energy
publisher:
name: Elsevier
start: 90
end: 97
year: 2015
month: 8
title: "OpenMC: A state-of-the-art Monte Carlo code for research and development"
type: article
url: "https://doi.org/10.1016/j.anucene.2014.07.048"
64 changes: 37 additions & 27 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ option(OPENMC_ENABLE_COVERAGE "Compile with coverage analysis flags"
option(OPENMC_USE_DAGMC "Enable support for DAGMC (CAD) geometry" OFF)
option(OPENMC_USE_LIBMESH "Enable support for libMesh unstructured mesh tallies" OFF)
option(OPENMC_USE_MPI "Enable MPI" OFF)
option(OPENMC_USE_MCPL "Enable MCPL" OFF)
option(OPENMC_USE_UWUW "Enable UWUW" OFF)
option(OPENMC_FORCE_VENDORED_LIBS "Explicitly use submodules defined in 'vendor'" OFF)

message(STATUS "OPENMC_USE_OPENMP ${OPENMC_USE_OPENMP}")
message(STATUS "OPENMC_BUILD_TESTS ${OPENMC_BUILD_TESTS}")
Expand All @@ -46,8 +46,8 @@ message(STATUS "OPENMC_ENABLE_COVERAGE ${OPENMC_ENABLE_COVERAGE}")
message(STATUS "OPENMC_USE_DAGMC ${OPENMC_USE_DAGMC}")
message(STATUS "OPENMC_USE_LIBMESH ${OPENMC_USE_LIBMESH}")
message(STATUS "OPENMC_USE_MPI ${OPENMC_USE_MPI}")
message(STATUS "OPENMC_USE_MCPL ${OPENMC_USE_MCPL}")
message(STATUS "OPENMC_USE_UWUW ${OPENMC_USE_UWUW}")
message(STATUS "OPENMC_FORCE_VENDORED_LIBS ${OPENMC_FORCE_VENDORED_LIBS}")

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

#===============================================================================
# MCPL
#===============================================================================

if (OPENMC_USE_MCPL)
find_package(MCPL REQUIRED)
message(STATUS "Found MCPL: ${MCPL_DIR} (found version \"${MCPL_VERSION}\")")
endif()

#===============================================================================
# Set compile/link flags based on which compiler is being used
#===============================================================================
Expand Down Expand Up @@ -249,41 +240,61 @@ endif()
# pugixml library
#===============================================================================

find_package_write_status(pugixml)
if (NOT pugixml_FOUND)
if(OPENMC_FORCE_VENDORED_LIBS)
add_subdirectory(vendor/pugixml)
set_target_properties(pugixml PROPERTIES CXX_STANDARD 14 CXX_EXTENSIONS OFF)
else()
find_package_write_status(pugixml)
if (NOT pugixml_FOUND)
add_subdirectory(vendor/pugixml)
set_target_properties(pugixml PROPERTIES CXX_STANDARD 14 CXX_EXTENSIONS OFF)
endif()
endif()

#===============================================================================
# {fmt} library
#===============================================================================

find_package_write_status(fmt)
if (NOT fmt_FOUND)
if(OPENMC_FORCE_VENDORED_LIBS)
set(FMT_INSTALL ON CACHE BOOL "Generate the install target.")
add_subdirectory(vendor/fmt)
else()
find_package_write_status(fmt)
if (NOT fmt_FOUND)
set(FMT_INSTALL ON CACHE BOOL "Generate the install target.")
add_subdirectory(vendor/fmt)
endif()
endif()

#===============================================================================
# xtensor header-only library
#===============================================================================

find_package_write_status(xtensor)
if (NOT xtensor_FOUND)
if(OPENMC_FORCE_VENDORED_LIBS)
add_subdirectory(vendor/xtl)
set(xtl_DIR ${CMAKE_CURRENT_BINARY_DIR}/vendor/xtl)
add_subdirectory(vendor/xtensor)
else()
find_package_write_status(xtensor)
if (NOT xtensor_FOUND)
add_subdirectory(vendor/xtl)
set(xtl_DIR ${CMAKE_CURRENT_BINARY_DIR}/vendor/xtl)
add_subdirectory(vendor/xtensor)
endif()
endif()

#===============================================================================
# Catch2 library
#===============================================================================

if(OPENMC_BUILD_TESTS)
find_package_write_status(Catch2)
if (NOT Catch2_FOUND)
if (OPENMC_FORCE_VENDORED_LIBS)
add_subdirectory(vendor/Catch2)
else()
find_package_write_status(Catch2)
if (NOT Catch2_FOUND)
add_subdirectory(vendor/Catch2)
endif()
endif()
endif()

Expand Down Expand Up @@ -327,6 +338,7 @@ list(APPEND libopenmc_SOURCES
src/cell.cpp
src/chain.cpp
src/cmfd_solver.cpp
src/collision_track.cpp
src/cross_sections.cpp
src/dagmc.cpp
src/distribution.cpp
Expand All @@ -343,6 +355,7 @@ list(APPEND libopenmc_SOURCES
src/geometry.cpp
src/geometry_aux.cpp
src/hdf5_interface.cpp
src/ifp.cpp
src/initialize.cpp
src/lattice.cpp
src/material.cpp
Expand Down Expand Up @@ -406,6 +419,7 @@ list(APPEND libopenmc_SOURCES
src/tallies/filter_materialfrom.cpp
src/tallies/filter_mesh.cpp
src/tallies/filter_meshborn.cpp
src/tallies/filter_meshmaterial.cpp
src/tallies/filter_meshsurface.cpp
src/tallies/filter_mu.cpp
src/tallies/filter_musurface.cpp
Expand All @@ -417,6 +431,7 @@ list(APPEND libopenmc_SOURCES
src/tallies/filter_surface.cpp
src/tallies/filter_time.cpp
src/tallies/filter_universe.cpp
src/tallies/filter_weight.cpp
src/tallies/filter_zernike.cpp
src/tallies/tally.cpp
src/tallies/tally_scoring.cpp
Expand Down Expand Up @@ -489,11 +504,11 @@ else()
endif()

if(OPENMC_USE_DAGMC)
target_compile_definitions(libopenmc PRIVATE DAGMC)
target_compile_definitions(libopenmc PRIVATE OPENMC_DAGMC_ENABLED)
target_link_libraries(libopenmc dagmc-shared)

if(OPENMC_USE_UWUW)
target_compile_definitions(libopenmc PRIVATE OPENMC_UWUW)
target_compile_definitions(libopenmc PRIVATE OPENMC_UWUW_ENABLED)
target_link_libraries(libopenmc uwuw-shared)
endif()
elseif(OPENMC_USE_UWUW)
Expand All @@ -502,7 +517,7 @@ elseif(OPENMC_USE_UWUW)
endif()

if(OPENMC_USE_LIBMESH)
target_compile_definitions(libopenmc PRIVATE LIBMESH)
target_compile_definitions(libopenmc PRIVATE OPENMC_LIBMESH_ENABLED)
target_link_libraries(libopenmc PkgConfig::LIBMESH)
endif()

Expand All @@ -525,11 +540,6 @@ if (OPENMC_BUILD_TESTS)
add_subdirectory(tests/cpp_unit_tests)
endif()

if (OPENMC_USE_MCPL)
target_compile_definitions(libopenmc PUBLIC OPENMC_MCPL)
target_link_libraries(libopenmc MCPL::mcpl)
endif()

#===============================================================================
# Log build info that this executable can report later
#===============================================================================
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ARG compile_cores=1
ARG build_dagmc=off
ARG build_libmesh=off

FROM debian:bookworm-slim AS dependencies
FROM ubuntu:24.04 AS dependencies

ARG compile_cores
ARG build_dagmc
Expand Down Expand Up @@ -96,6 +96,7 @@ RUN if [ "$build_dagmc" = "on" ]; then \
# Install addition packages required for DAGMC
apt-get -y install libeigen3-dev libnetcdf-dev libtbb-dev libglfw3-dev \
&& pip install --upgrade numpy \
&& pip install --no-cache-dir setuptools cython \
# Clone and install EMBREE
&& mkdir -p $HOME/EMBREE && cd $HOME/EMBREE \
&& git clone --single-branch -b ${EMBREE_TAG} --depth 1 ${EMBREE_REPO} \
Expand Down
15 changes: 7 additions & 8 deletions cmake/OpenMCConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
get_filename_component(OpenMC_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY)

find_package(fmt REQUIRED HINTS ${OpenMC_CMAKE_DIR}/../fmt)
find_package(pugixml REQUIRED HINTS ${OpenMC_CMAKE_DIR}/../pugixml)
find_package(xtl REQUIRED HINTS ${OpenMC_CMAKE_DIR}/../xtl)
find_package(xtensor REQUIRED HINTS ${OpenMC_CMAKE_DIR}/../xtensor)
# Compute the install prefix from this file's location
get_filename_component(_OPENMC_PREFIX "${OpenMC_CMAKE_DIR}/../../.." ABSOLUTE)

find_package(fmt CONFIG REQUIRED HINTS ${_OPENMC_PREFIX})
find_package(pugixml CONFIG REQUIRED HINTS ${_OPENMC_PREFIX})
find_package(xtl CONFIG REQUIRED HINTS ${_OPENMC_PREFIX})
find_package(xtensor CONFIG REQUIRED HINTS ${_OPENMC_PREFIX})
if(@OPENMC_USE_DAGMC@)
find_package(DAGMC REQUIRED HINTS @DAGMC_DIR@)
endif()
Expand All @@ -29,10 +32,6 @@ if(@OPENMC_USE_OPENMP@)
find_package(OpenMP REQUIRED)
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 in OpenMC but the DAGMC installation discovered was not configured with UWUW.")
endif()
Binary file added docs/source/_images/sphere-mesh-vtk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 27 additions & 2 deletions docs/source/capi/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,17 @@ Functions
:return: Return status (negative if an error occurred)
:rtype: int

.. c:function:: int openmc_cell_get_density(int32_t index, const int32_t* instance, double* density)

Get the density of a cell

:param int32_t index: Index in the cells array
:param int32_t* instance: Which instance of the cell. If a null pointer is passed, the density
multiplier of the first instance is returned.
:param double* density: Density of the cell in [g/cm3]
:return: Return status (negative if an error occurred)
:rtype: int

.. c:function:: int openmc_cell_set_fill(int32_t index, int type, int32_t n, const int32_t* indices)

Set the fill for a cell
Expand Down Expand Up @@ -113,8 +124,22 @@ Functions
:param double T: Temperature in Kelvin
:param instance: Which instance of the cell. To set the temperature for all
instances, pass a null pointer.
:param set_contained: If the cell is not filled by a material, whether to set the temperatures
of all filled cells
:param bool set_contained: If the cell is not filled by a material, whether
to set the temperatures of all filled cells
:type instance: const int32_t*
:return: Return status (negative if an error occurred)
:rtype: int

.. c:function:: int openmc_cell_set_density(index index, double density, const int32_t* instance, bool set_contained)

Set the density of a cell.

:param int32_t index: Index in the cells array
:param double density: Density of the cell in [g/cm3]
:param instance: Which instance of the cell. To set the density multiplier for all
instances, pass a null pointer.
:param bool set_contained: If the cell is not filled by a material, whether
to set the density multiplier of all filled cells
:type instance: const int32_t*
:return: Return status (negative if an error occurred)
:rtype: int
Expand Down
2 changes: 0 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,7 @@
# -- Options for HTML output ---------------------------------------------------

# The theme to use for HTML and HTML Help pages
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_baseurl = "https://docs.openmc.org/en/stable/"

html_logo = '_images/openmc_logo.png'
Expand Down
Loading
Loading