mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Several small documentation updates (#2558)
This commit is contained in:
parent
6693ff3229
commit
98c4eb2a2c
8 changed files with 33 additions and 53 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
------------------------------------
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
State Point File Format
|
||||
=======================
|
||||
|
||||
The current version of the statepoint file format is 17.0.
|
||||
The current version of the statepoint file format is 18.1.
|
||||
|
||||
**/**
|
||||
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ distribution/repository, run:
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
pip install .
|
||||
python -m pip install .
|
||||
|
||||
If you want to build a parallel version of OpenMC (using OpenMP or MPI),
|
||||
directions can be found in the :ref:`detailed installation instructions
|
||||
|
|
|
|||
|
|
@ -83,12 +83,12 @@ Creating Input Files
|
|||
.. currentmodule:: openmc
|
||||
|
||||
The most rudimentary option for creating input files is to simply write them
|
||||
from scratch using the :ref:`XML format specifications
|
||||
<io_file_formats_input>`. This approach will feel familiar to users of other
|
||||
Monte Carlo codes such as MCNP and Serpent, with the added bonus that the XML
|
||||
formats feel much more "readable". Alternatively, input files can be generated
|
||||
using OpenMC's :ref:`Python API <pythonapi>`, which is introduced in the
|
||||
following section.
|
||||
from scratch using the :ref:`XML format specifications <io_file_formats_input>`.
|
||||
This approach will feel familiar to users of other Monte Carlo codes such as
|
||||
MCNP and Serpent, with the added bonus that the XML formats feel much more
|
||||
"readable". However, it is strongly recommended to generate input files using
|
||||
OpenMC's :ref:`Python API <pythonapi>`, which is introduced in the following
|
||||
section.
|
||||
|
||||
----------
|
||||
Python API
|
||||
|
|
@ -178,14 +178,3 @@ energy electronvolt eV
|
|||
time second s
|
||||
======= ============ ======
|
||||
|
||||
------------------------------------
|
||||
ERSN-OpenMC Graphical User Interface
|
||||
------------------------------------
|
||||
|
||||
A third-party Java-based user-friendly graphical user interface for creating XML
|
||||
input files called ERSN-OpenMC_ is developed and maintained by members of the
|
||||
Radiation and Nuclear Systems Group at the Faculty of Sciences Tetouan, Morocco.
|
||||
The GUI also allows one to automatically download prerequisites for installing and
|
||||
running OpenMC.
|
||||
|
||||
.. _ERSN-OpenMC: https://github.com/EL-Bakkali-Jaafar/ERSN-OpenMC
|
||||
|
|
|
|||
|
|
@ -488,13 +488,13 @@ OpenMC locally by specifying an install prefix when running cmake:
|
|||
The ``CMAKE_INSTALL_PREFIX`` variable can be changed to any path for which you
|
||||
have write-access.
|
||||
|
||||
Compiling on Windows 10
|
||||
-----------------------
|
||||
Compiling on Windows
|
||||
--------------------
|
||||
|
||||
Recent versions of Windows 10 include a subsystem for Linux that allows one to
|
||||
run Bash within Ubuntu running in Windows. First, follow the installation guide
|
||||
`here <https://docs.microsoft.com/en-us/windows/wsl/install-win10>`_ to get Bash
|
||||
on Ubuntu on Windows setup. Once you are within bash, obtain the necessary
|
||||
Recent versions of Windows include a subsystem for Linux that allows one to run
|
||||
Bash within Ubuntu running in Windows. First, follow the installation guide
|
||||
`here <https://learn.microsoft.com/en-us/windows/wsl/install>`_ to get Bash on
|
||||
Ubuntu on Windows set up. Once you are within bash, obtain the necessary
|
||||
:ref:`prerequisites <prerequisites>` via ``apt``. Finally, follow the
|
||||
:ref:`instructions for compiling on linux <compile_linux>`.
|
||||
|
||||
|
|
@ -522,7 +522,7 @@ distribution/repository, run:
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
pip install .
|
||||
python -m pip install .
|
||||
|
||||
pip will first check that all :ref:`required third-party packages
|
||||
<usersguide_python_prereqs>` have been installed, and if they are not present,
|
||||
|
|
@ -608,15 +608,15 @@ for OpenMC. Thus, the install process would proceed as follows:
|
|||
make install
|
||||
|
||||
cd ..
|
||||
MPICC=<path to mpicc> pip install mpi4py
|
||||
HDF5_DIR=<path to HDF5> pip install --no-binary=h5py h5py
|
||||
MPICC=<path to mpicc> python -m pip install mpi4py
|
||||
HDF5_DIR=<path to HDF5> python -m pip install --no-binary=h5py h5py
|
||||
|
||||
If you are using parallel HDF5, you'll also need to make sure the right MPI
|
||||
wrapper is used when installing h5py:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
CC=<path to mpicc> HDF5_MPI=ON HDF5_DIR=<path to HDF5> pip install --no-binary=h5py h5py
|
||||
CC=<path to mpicc> HDF5_MPI=ON HDF5_DIR=<path to HDF5> python -m pip install --no-binary=h5py h5py
|
||||
|
||||
.. _Conda: https://conda.io/en/latest/
|
||||
.. _pip: https://pip.pypa.io/en/stable/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue