Skip to content

Commit

Permalink
Merge branch 'openmc-dev:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
zoeprieto authored Aug 12, 2023
2 parents 29b8598 + 1d29adc commit b3c23e6
Show file tree
Hide file tree
Showing 429 changed files with 21,441 additions and 13,209 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
QualifierAlignment: Left
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
Expand Down
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug report
about: Report a bug that is preventing proper operation
title: ''
labels: Bugs
assignees: ''

---

<!--
If you are a user of OpenMC and are running into trouble with the code or are
seeking general user support, we highly recommend posting on the OpenMC
discourse forum first. GitHub issues should be used specifically for bug reports
and feature requests.
https://openmc.discourse.group/
-->

## Bug Description
<!--A clear and concise description of the problem (Note: A missing feature is not a bug).-->


## Steps to Reproduce
<!--Steps to reproduce the behavior (input file, or modifications to an existing input file, etc.)-->


## Environment
<!--Operating system, OpenMC version, how OpenMC was installed, nuclear data being used, etc.-->
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Troubleshooting and User Support
url: https://openmc.discourse.group/
about: For user support and troubleshooting, please use our Discourse forum
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Documentation improvement
about: Found something incomplete or incorrect in our documentation?
title: ''
labels: Documentation
assignees: ''

---

<!--Describe the issue with the documentation and include a URL to the corresponding page-->
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest a new feature or enhancement to existing capabilities
title: ''
labels: ''
assignees: ''

---

## Description
<!--What is the feature or enhancement?-->


## Alternatives
<!--If alternative solutions have been considered, describe them here and the reasoning for the chosen solution --->


## Compatibility
<!--Will the enhancement change existing APIs or add something new?-->
24 changes: 24 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!--
If you are a first-time contributor to OpenMC, please have a look at our
contributing guidelines:
https://github.com/openmc-dev/openmc/blob/develop/CONTRIBUTING.md
-->

# Description

Please include a summary of the change and which issue is fixed if applicable. Please also include relevant motivation and context.

Fixes # (issue)

# Checklist

- [ ] I have performed a self-review of my own code
- [ ] I have run [clang-format](https://docs.openmc.org/en/latest/devguide/styleguide.html#automatic-formatting) on any C++ source files (if applicable)
- [ ] I have followed the [style guidelines](https://docs.openmc.org/en/latest/devguide/styleguide.html#python) for Python source files (if applicable)
- [ ] I have made corresponding changes to the documentation (if applicable)
- [ ] I have added tests that prove my fix is effective or that my feature works (if applicable)
<!--
While tests will automatically be checked by CI, it is good practice to
ensure that they pass locally first. See instructions here:
https://docs.openmc.org/en/latest/devguide/tests.html
-->
25 changes: 25 additions & 0 deletions .github/workflows/format-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: C++ Format Check

on: pull_request

jobs:
cpp-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cpp-linter/cpp-linter-action@v2
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: file
files-changed-only: true
tidy-checks: '-*'
version: '15' # clang-format version
file-annotations: true
step-summary: true
extensions: 'cpp,h'

- name: Failure Check
if: steps.linter.outputs.checks-failed > 0
run: echo "Some files failed the formatting check! See job summary and file annotations for more info" && exit 1
17 changes: 9 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ endif()

if(OPENMC_BUILD_TESTS)
find_package_write_status(Catch2)
if (NOT Catch2)
if (NOT Catch2_FOUND)
add_subdirectory(vendor/Catch2)
endif()
endif()
Expand Down Expand Up @@ -334,10 +334,10 @@ list(APPEND libopenmc_SOURCES
src/bank.cpp
src/boundary_condition.cpp
src/bremsstrahlung.cpp
src/dagmc.cpp
src/cell.cpp
src/cmfd_solver.cpp
src/cross_sections.cpp
src/dagmc.cpp
src/distribution.cpp
src/distribution_angle.cpp
src/distribution_energy.cpp
Expand All @@ -347,11 +347,12 @@ list(APPEND libopenmc_SOURCES
src/endf.cpp
src/error.cpp
src/event.cpp
src/initialize.cpp
src/file_utils.cpp
src/finalize.cpp
src/geometry.cpp
src/geometry_aux.cpp
src/hdf5_interface.cpp
src/initialize.cpp
src/lattice.cpp
src/material.cpp
src/math_functions.cpp
Expand Down Expand Up @@ -393,15 +394,15 @@ list(APPEND libopenmc_SOURCES
src/tallies/derivative.cpp
src/tallies/filter.cpp
src/tallies/filter_azimuthal.cpp
src/tallies/filter_cellborn.cpp
src/tallies/filter_cellfrom.cpp
src/tallies/filter_cell.cpp
src/tallies/filter_cell_instance.cpp
src/tallies/filter_cellborn.cpp
src/tallies/filter_cellfrom.cpp
src/tallies/filter_collision.cpp
src/tallies/filter_delayedgroup.cpp
src/tallies/filter_distribcell.cpp
src/tallies/filter_energyfunc.cpp
src/tallies/filter_energy.cpp
src/tallies/filter_collision.cpp
src/tallies/filter_energyfunc.cpp
src/tallies/filter_legendre.cpp
src/tallies/filter_material.cpp
src/tallies/filter_mesh.cpp
Expand All @@ -418,8 +419,8 @@ list(APPEND libopenmc_SOURCES
src/tallies/tally.cpp
src/tallies/tally_scoring.cpp
src/tallies/trigger.cpp
src/timer.cpp
src/thermal.cpp
src/timer.cpp
src/track_output.cpp
src/universe.cpp
src/urr.cpp
Expand Down
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ project started under the Computational Reactor Physics Group at MIT.
Complete documentation on the usage of OpenMC is hosted on Read the Docs (both
for the [latest release](https://docs.openmc.org/en/stable/) and
[developmental](https://docs.openmc.org/en/latest/) version). If you are
interested in the project, or would like to help and contribute, please get in touch on the OpenMC [discussion forum](https://openmc.discourse.group/).
interested in the project, or would like to help and contribute, please get in
touch on the OpenMC [discussion forum](https://openmc.discourse.group/).

## Installation

Expand All @@ -36,20 +37,21 @@ citing the following publication:
## Troubleshooting

If you run into problems compiling, installing, or running OpenMC, first check
the [Troubleshooting section](https://docs.openmc.org/en/stable/usersguide/troubleshoot.html) in
the User's Guide. If you are not able to find a solution to your problem there,
the [Troubleshooting
section](https://docs.openmc.org/en/stable/usersguide/troubleshoot.html) in the
User's Guide. If you are not able to find a solution to your problem there,
please post to the [discussion forum](https://openmc.discourse.group/).

## Reporting Bugs

OpenMC is hosted on GitHub and all bugs are reported and tracked through the
[Issues](https://github.com/openmc-dev/openmc/issues) feature on GitHub. However,
GitHub Issues should not be used for common troubleshooting purposes. If you are
having trouble installing the code or getting your model to run properly, you
should first send a message to the User's Group mailing list. If it turns out
your issue really is a bug in the code, an issue will then be created on
GitHub. If you want to request that a feature be added to the code, you may
create an Issue on github.
[Issues](https://github.com/openmc-dev/openmc/issues) feature on GitHub.
However, GitHub Issues should not be used for common troubleshooting purposes.
If you are having trouble installing the code or getting your model to run
properly, you should first send a message to the [discussion
forum](https://openmc.discourse.group/). If it turns out your issue really is a
bug in the code, an issue will then be created on GitHub. If you want to request
that a feature be added to the code, you may create an Issue on github.

## License

Expand Down
1 change: 1 addition & 0 deletions docs/requirements-rtd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ h5py
pandas
uncertainties
matplotlib
lxml
Binary file added docs/source/_images/hexlat_anim.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 5 additions & 12 deletions docs/source/devguide/docbuild.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,14 @@ Building Sphinx Documentation
=============================

In order to build the documentation in the ``docs`` directory, you will need to
have the `Sphinx <https://www.sphinx-doc.org/en/master/>`_ third-party Python
package. The easiest way to install Sphinx is via pip:
have the several third-party Python packages installed, including `Sphinx
<https://www.sphinx-doc.org/en/master/>`_. To install the necessary
prerequisites, provide the optional "docs" dependencies when installing OpenMC's
Python API. That is, from the root directory of the OpenMC repository:

.. code-block:: sh
pip install sphinx
Additionally, you will need several Sphinx extensions that can be installed
directly with pip:

.. code-block:: sh
pip install sphinx-numfig
pip install sphinxcontrib-katex
pip install sphinxcontrib-svg2pdfconverter
python -m pip install .[docs]
-----------------------------------
Building Documentation as a Webpage
Expand Down
18 changes: 7 additions & 11 deletions docs/source/devguide/tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ Prerequisites
OpenMC in development/editable mode. With setuptools, this is accomplished by
running::

python setup.py develop

or using pip (recommended)::

pip install -e .[test]
python -m pip install -e .[test]

- The test suite requires a specific set of cross section data in order for
tests to pass. A download URL for the data that OpenMC expects can be found
Expand Down Expand Up @@ -83,13 +79,13 @@ does not exist run::

touch test_<name-of-header-file>.cpp

The file must be added to the CMake build system in
``tests/cpp_unit_tests/CMakeLists.txt``. ``test_<name-of-header-file>`` should
be added to ``TEST_NAMES``.
The file must be added to the CMake build system in
``tests/cpp_unit_tests/CMakeLists.txt``. ``test_<name-of-header-file>`` should
be added to ``TEST_NAMES``.

To add a test case to ``test_<name-of-header-file>.cpp`` ensure
``catch2/catch_test_macros.hpp`` is included. A unit test can then be added
using the ``TEST_CASE`` macro and the ``REQUIRE`` assertion from Catch2.
To add a test case to ``test_<name-of-header-file>.cpp`` ensure
``catch2/catch_test_macros.hpp`` is included. A unit test can then be added
using the ``TEST_CASE`` macro and the ``REQUIRE`` assertion from Catch2.

Adding Tests to the Regression Suite
------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/source/devguide/workflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ pip_. From the root directory of the OpenMC repository, run:

.. code-block:: sh
pip install -e .[test]
python -m pip install -e .[test]
This installs the OpenMC Python package in `"editable" mode
<https://pip.pypa.io/en/stable/cli/pip_install/#editable-installs>`_ so that 1)
Expand Down
7 changes: 0 additions & 7 deletions docs/source/io_formats/depletion_results.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,3 @@ The current version of the depletion results file format is 1.1.
**/reactions/<name>/**

:Attributes: - **index** (*int*) -- Index user in results for this reaction

.. note::

The reaction rates for some isotopes not originally present may
be non-zero, but should be negligible compared to other atoms.
This can be controlled by changing the
:class:`openmc.deplete.Operator` ``dilute_initial`` attribute.
1 change: 1 addition & 0 deletions docs/source/io_formats/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ Output Files
track
voxel
volume
weight_windows
2 changes: 2 additions & 0 deletions docs/source/io_formats/particle_restart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ The current version of the particle restart file format is 2.0.
- **run_mode** (*char[]*) -- Run mode used, either 'fixed source',
'eigenvalue', or 'particle restart'.
- **id** (*int8_t*) -- Unique identifier of the particle.
- **type** (*int*) -- Particle type (0=neutron, 1=photon, 2=electron,
3=positron)
- **weight** (*double*) -- Weight of the particle.
- **energy** (*double*) -- Energy of the particle in eV for
continuous-energy mode, or the energy group of the particle for
Expand Down
Loading

0 comments on commit b3c23e6

Please sign in to comment.