From 98b2bcb275136d460aa10939b95ec0efbd4c2479 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Sun, 24 Dec 2017 22:04:27 +0700 Subject: [PATCH] Various fixes/updates in documentation --- docs/source/devguide/docbuild.rst | 3 +- docs/source/quickinstall.rst | 8 +-- docs/source/usersguide/cross_sections.rst | 7 +++ docs/source/usersguide/install.rst | 75 +++++++++-------------- docs/source/usersguide/settings.rst | 2 +- 5 files changed, 40 insertions(+), 55 deletions(-) diff --git a/docs/source/devguide/docbuild.rst b/docs/source/devguide/docbuild.rst index 079a69a2c..be4607cc6 100644 --- a/docs/source/devguide/docbuild.rst +++ b/docs/source/devguide/docbuild.rst @@ -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 diff --git a/docs/source/quickinstall.rst b/docs/source/quickinstall.rst index 6bc09c044..97980037c 100644 --- a/docs/source/quickinstall.rst +++ b/docs/source/quickinstall.rst @@ -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. diff --git a/docs/source/usersguide/cross_sections.rst b/docs/source/usersguide/cross_sections.rst index 48cccfb67..058daf23a 100644 --- a/docs/source/usersguide/cross_sections.rst +++ b/docs/source/usersguide/cross_sections.rst @@ -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 diff --git a/docs/source/usersguide/install.rst b/docs/source/usersguide/install.rst index 09fc4520c..1fee22e71 100644 --- a/docs/source/usersguide/install.rst +++ b/docs/source/usersguide/install.rst @@ -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 diff --git a/docs/source/usersguide/settings.rst b/docs/source/usersguide/settings.rst index 6e49777f0..978649a2f 100644 --- a/docs/source/usersguide/settings.rst +++ b/docs/source/usersguide/settings.rst @@ -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.