mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 13:15:39 -04:00
Various fixes/updates in documentation
This commit is contained in:
parent
8f95199fa1
commit
98b2bcb275
5 changed files with 40 additions and 55 deletions
|
|
@ -40,7 +40,7 @@ on your computer as well as Inkscape_, which is used to convert .svg files to
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo apt-get install inkscape
|
||||
sudo apt install inkscape
|
||||
|
||||
One the pre-requisites are installed, simply go to the ``docs`` directory and
|
||||
run:
|
||||
|
|
@ -50,6 +50,5 @@ run:
|
|||
make latexpdf
|
||||
|
||||
.. _Sphinx: http://sphinx-doc.org
|
||||
.. _sphinxcontrib-tikz: https://bitbucket.org/philexander/tikz
|
||||
.. _Numfig: https://pypi.python.org/pypi/sphinx_numfig
|
||||
.. _Inkscape: https://inkscape.org
|
||||
|
|
|
|||
|
|
@ -44,13 +44,13 @@ Next, resynchronize the package index files:
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt update
|
||||
|
||||
Now OpenMC should be recognized within the repository and can be installed:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo apt-get install openmc
|
||||
sudo apt install openmc
|
||||
|
||||
Binary packages from this PPA may exist for earlier versions of Ubuntu, but they
|
||||
are no longer supported.
|
||||
|
|
@ -69,9 +69,7 @@ installed directly from the package manager.
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo apt-get install gfortran
|
||||
sudo apt-get install cmake
|
||||
sudo apt-get install libhdf5-dev
|
||||
sudo apt install gfortran g++ cmake libhdf5-dev
|
||||
|
||||
After the packages have been installed, follow the instructions below for
|
||||
building and installing OpenMC from source.
|
||||
|
|
|
|||
|
|
@ -222,6 +222,13 @@ named ``njoy`` available on your path. If you want to explicitly name the
|
|||
executable, the ``njoy_exec`` optional argument can be used. Additionally, the
|
||||
``stdout`` argument can be used to show the progress of the NJOY run.
|
||||
|
||||
To generate a thermal scattering file, you need to specify both an ENDF incident
|
||||
neutron sub-library file as well as a thermal neutron scattering sub-library
|
||||
file; for example::
|
||||
|
||||
light_water = openmc.data.ThermalScattering.from_njoy(
|
||||
'neutrons/n-001_H_001.endf', 'thermal_scatt/tsl-HinH2O.endf')
|
||||
|
||||
Once you have instances of :class:`IncidentNeutron` and
|
||||
:class:`ThermalScattering`, a library can be created by using the
|
||||
``export_to_hdf5()`` methods and the :class:`DataLibrary` class as described in
|
||||
|
|
|
|||
|
|
@ -95,10 +95,10 @@ Prerequisites
|
|||
|
||||
* A C/C++ compiler such as gcc_
|
||||
|
||||
OpenMC includes two libraries written in C and C++, respectively. These
|
||||
libraries have been tested to work with a wide variety of compilers. If
|
||||
you are using a Debian-based distribution, you can install the g++
|
||||
compiler using the following command::
|
||||
OpenMC includes various source files written in C and C++,
|
||||
respectively. These source files have been tested to work with a wide
|
||||
variety of compilers. If you are using a Debian-based distribution, you
|
||||
can install the g++ compiler using the following command::
|
||||
|
||||
sudo apt install g++
|
||||
|
||||
|
|
@ -113,34 +113,32 @@ Prerequisites
|
|||
|
||||
* HDF5_ Library for portable binary output format
|
||||
|
||||
OpenMC uses HDF5 for binary output files. As such, you will need to have
|
||||
HDF5 installed on your computer. The installed version will need to have
|
||||
been compiled with the same compiler you intend to compile OpenMC with. If
|
||||
you are using HDF5 in conjunction with MPI, we recommend that your HDF5
|
||||
installation be built with parallel I/O features. An example of
|
||||
configuring HDF5_ is listed below::
|
||||
OpenMC uses HDF5 for many input/output files. As such, you will need to
|
||||
have HDF5 installed on your computer. The installed version will need to
|
||||
have been compiled with the same compiler you intend to compile OpenMC
|
||||
with. On Debian derivatives, HDF5 and/or parallel HDF5 can be installed
|
||||
through the APT package manager:
|
||||
|
||||
FC=/opt/mpich/3.1/bin/mpif90 CC=/opt/mpich/3.1/bin/mpicc \
|
||||
./configure --prefix=/opt/hdf5/1.8.12 --enable-fortran \
|
||||
--enable-fortran2003 --enable-parallel
|
||||
.. code-block:: sh
|
||||
|
||||
sudo apt install libhdf5-dev
|
||||
|
||||
Note that the exact package names may vary depending on your particular
|
||||
distribution and version. If you are using HDF5 in conjunction with MPI,
|
||||
we recommend that your HDF5 installation be built with parallel I/O
|
||||
features. An example of configuring HDF5_ is listed below::
|
||||
|
||||
FC=/opt/mpich/3.2/bin/mpif90 CC=/opt/mpich/3.2/bin/mpicc \
|
||||
./configure --prefix=/opt/hdf5/1.10.1 --enable-fortran \
|
||||
--enable-parallel
|
||||
|
||||
You may omit ``--enable-parallel`` if you want to compile HDF5_ in serial.
|
||||
|
||||
.. important::
|
||||
|
||||
OpenMC uses various parts of the HDF5 Fortran 2003 API; as such you
|
||||
must include ``--enable-fortran2003`` or else OpenMC will not be able
|
||||
to compile.
|
||||
|
||||
On Debian derivatives, HDF5 and/or parallel HDF5 can be installed through
|
||||
the APT package manager:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo apt install libhdf5-dev hdf5-helpers
|
||||
|
||||
Note that the exact package names may vary depending on your particular
|
||||
distribution and version.
|
||||
If you are building HDF5 version 1.8.x or earlier, you must include
|
||||
``--enable-fortran2003`` when configuring HDF5 or else OpenMC will not
|
||||
be able to compile.
|
||||
|
||||
.. admonition:: Optional
|
||||
:class: note
|
||||
|
|
@ -163,7 +161,7 @@ Prerequisites
|
|||
.. _CMake: http://www.cmake.org
|
||||
.. _OpenMPI: http://www.open-mpi.org
|
||||
.. _MPICH: http://www.mpich.org
|
||||
.. _HDF5: http://www.hdfgroup.org/HDF5/
|
||||
.. _HDF5: https://www.hdfgroup.org/solutions/hdf5/
|
||||
|
||||
Obtaining the Source
|
||||
--------------------
|
||||
|
|
@ -358,26 +356,9 @@ workarounds.
|
|||
Testing Build
|
||||
-------------
|
||||
|
||||
If you have ENDF/B-VII.1 cross sections from NNDC_ you can test your build.
|
||||
Make sure the **OPENMC_CROSS_SECTIONS** environmental variable is set to the
|
||||
*cross_sections.xml* file in the *data/nndc* directory.
|
||||
There are two ways to run tests. The first is to use the Makefile present in
|
||||
the source directory and run the following:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
make test
|
||||
|
||||
If you want more options for testing you can use ctest_ command. For example,
|
||||
if we wanted to run only the plot tests with 4 processors, we run:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
cd build
|
||||
ctest -j 4 -R plot
|
||||
|
||||
If you want to run the full test suite with different build options please
|
||||
refer to our :ref:`test suite` documentation.
|
||||
To run the test suite, you will first need to download a pre-generated cross
|
||||
section library along with windowed multipole data. Please refer to our
|
||||
:ref:`test suite` documentation for further details.
|
||||
|
||||
--------------------
|
||||
Python Prerequisites
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ be specified:
|
|||
'plot'
|
||||
Generates slice or voxel plots (see :ref:`usersguide_plots`).
|
||||
|
||||
'particle_restart'
|
||||
'particle restart'
|
||||
Simulate a single source particle using a particle restart file.
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue