mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Merge remote-tracking branch 'upstream/develop' into squash-distribcells
This commit is contained in:
commit
24d7502af8
37 changed files with 152 additions and 2935 deletions
64
docs/source/devguide/docbuild.rst
Normal file
64
docs/source/devguide/docbuild.rst
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
.. _devguide_docbuild:
|
||||
|
||||
=============================
|
||||
Building Sphinx Documentation
|
||||
=============================
|
||||
|
||||
In order to build the documentation in the ``docs`` directory, you will need to
|
||||
have the Sphinx_ third-party Python package. The easiest way to install Sphinx
|
||||
is via pip:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo pip install sphinx
|
||||
|
||||
Additionally, you will also need two Sphinx extensions for TikZ support and
|
||||
numbering figures. The sphinxcontrib-tikz_ package should be installed directly
|
||||
from the git repository as such:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
git clone https://bitbucket.org/philexander/tikz.git
|
||||
cd tikz
|
||||
sudo python setup.py install
|
||||
|
||||
The Numfig_ package can be installed directly with pip:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo pip install sphinx-numfig
|
||||
|
||||
-----------------------------------
|
||||
Building Documentation as a Webpage
|
||||
-----------------------------------
|
||||
|
||||
To build the documentation as a webpage (what appears at
|
||||
http://mit-crpg.github.io/openmc), simply go to the ``docs`` directory and run:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
make html
|
||||
|
||||
-------------------------------
|
||||
Building Documentation as a PDF
|
||||
-------------------------------
|
||||
|
||||
To build PDF documentation, you will need to have a LaTeX distribution installed
|
||||
on your computer as well as Inkscape_, which is used to convert .svg files to
|
||||
.pdf files. Inkscape can be installed in a Debian-derivative with:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo apt-get install inkscape
|
||||
|
||||
One the pre-requisites are installed, simply go to the ``docs`` directory and
|
||||
run:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
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
|
||||
|
|
@ -18,3 +18,4 @@ as debugging.
|
|||
xml-parsing
|
||||
statepoint
|
||||
voxel
|
||||
docbuild
|
||||
|
|
|
|||
|
|
@ -153,10 +153,6 @@ variables should be set if the default paths are incorrect:
|
|||
|
||||
* Default - */opt/phdf5/1.8.14-gnu*
|
||||
|
||||
* **PETSC_DIR** - The path to the PETSc directory.
|
||||
|
||||
* Default - */opt/petsc/3.5.2-gnu*
|
||||
|
||||
To run the full test suite, the following command can be executed in the
|
||||
tests directory:
|
||||
|
||||
|
|
|
|||
|
|
@ -22,14 +22,13 @@ package manager`_. Simply enter the following commands into the terminal:
|
|||
sudo apt-get update
|
||||
sudo apt-get install openmc
|
||||
|
||||
Currently, the binary package does not allow for parallel simulations, HDF5_, or
|
||||
CMFD acceleration through PETSc_. Users who need such capabilities should build
|
||||
OpenMC from source as is described in :ref:`usersguide_install`.
|
||||
Currently, the binary package does not allow for parallel simulations or use of
|
||||
HDF5_. Users who need such capabilities should build OpenMC from source as is
|
||||
described in :ref:`usersguide_install`.
|
||||
|
||||
.. _Personal Package Archive: https://launchpad.net/~paulromano/+archive/staging
|
||||
.. _APT package manager: https://help.ubuntu.com/community/AptGet/Howto
|
||||
.. _HDF5: http://www.hdfgroup.org/HDF5/
|
||||
.. _PETSc: http://www.mcs.anl.gov/petsc/
|
||||
|
||||
-------------------------------------------
|
||||
Installing from Source on Linux or Mac OS X
|
||||
|
|
|
|||
|
|
@ -1061,7 +1061,7 @@ Here is an example of a properly defined 2d hexagonal lattice:
|
|||
<pitch> 1.0 </pitch>
|
||||
<universes>
|
||||
202
|
||||
202 202
|
||||
202 202
|
||||
202 202 202
|
||||
202 202
|
||||
202 101 202
|
||||
|
|
@ -1718,20 +1718,10 @@ It can be turned on with "true" and off with "false".
|
|||
The ``<gauss_seidel_tolerance>`` element specifies two parameters. The first is
|
||||
the absolute inner tolerance for Gauss-Seidel iterations when performing CMFD
|
||||
and the second is the relative inner tolerance for Gauss-Seidel iterations
|
||||
for CMFD calculations. It is only used in the standalone CMFD power iteration
|
||||
solver and not when PETSc is active.
|
||||
for CMFD calculations.
|
||||
|
||||
*Default*: 1.e-10 1.e-5
|
||||
|
||||
``<ksp_monitor>`` Element
|
||||
-------------------------
|
||||
|
||||
The ``<ksp_monitor>`` element is used to view the convergence of linear GMRES
|
||||
iterations in PETSc. This option can be turned on with "true" and turned off
|
||||
with "false".
|
||||
|
||||
*Default*: false
|
||||
|
||||
``<ktol>`` Element
|
||||
--------------------
|
||||
|
||||
|
|
@ -1820,26 +1810,16 @@ iteration. This option can be turned on with "true" and turned off with "false".
|
|||
-------------------------
|
||||
|
||||
The ``<run_adjoint>`` element can be turned on with "true" to have an adjoint
|
||||
calculation be performed on the last batch when CMFD is active. OpenMC should be
|
||||
compiled with PETSc when using this option.
|
||||
calculation be performed on the last batch when CMFD is active.
|
||||
|
||||
*Default*: false
|
||||
|
||||
``<solver>`` Element
|
||||
--------------------
|
||||
|
||||
The ``<solver>`` element controls whether the CMFD eigenproblem is solved with
|
||||
standard power iteration or nonlinear Jacobian-free Newton Krylov (JFNK).
|
||||
By setting "power", power iteration is used and by setting "jfnk", JFNK is used.
|
||||
|
||||
*Default*: power
|
||||
|
||||
``<shift>`` Element
|
||||
--------------------
|
||||
|
||||
The ``<shfit>`` element specifies an optional Wielandt shift parameter for
|
||||
accelerating power iterations. It can only be used when PETSc is not active.
|
||||
It is by default very large so the impact of the shift is effectively zero.
|
||||
The ``<shift>`` element specifies an optional Wielandt shift parameter for
|
||||
accelerating power iterations. It is by default very large so the impact of the
|
||||
shift is effectively zero.
|
||||
|
||||
*Default*: 1e6
|
||||
|
||||
|
|
@ -1848,10 +1828,9 @@ It is by default very large so the impact of the shift is effectively zero.
|
|||
|
||||
The ``<spectral>`` element specifies an optional spectral radius that can be set to
|
||||
accelerate the convergence of Gauss-Seidel iterations during CMFD power iteration
|
||||
solve. Note this is only used in the standalone CMFD solver and does not affect
|
||||
the calculation when PETSc is active.
|
||||
solve.
|
||||
|
||||
*Default*: power
|
||||
*Default*: 0.0
|
||||
|
||||
``<stol>`` Element
|
||||
------------------
|
||||
|
|
@ -1872,10 +1851,9 @@ should be reset.
|
|||
``<write_matrices>`` Element
|
||||
----------------------------
|
||||
|
||||
The ``<write_matrices>`` element is used to view the PETSc sparse matrices
|
||||
created when solving CMFD equations. These binary output files can be imported
|
||||
into MATLAB using PETSc-MATLAB utilities. This option can be
|
||||
turned on with "true" and off with "false".
|
||||
The ``<write_matrices>`` element is used to write the sparse matrices created
|
||||
when solving CMFD equations. This option can be turned on with "true" and off
|
||||
with "false".
|
||||
|
||||
*Default*: false
|
||||
|
||||
|
|
|
|||
|
|
@ -86,21 +86,6 @@ Prerequisites
|
|||
|
||||
You may omit ``--enable-parallel`` if you want to compile HDF5_ in serial.
|
||||
|
||||
* PETSc_ for CMFD acceleration
|
||||
|
||||
To enable some features of CMFD acceleration, you will need to have
|
||||
PETSc_ (3.4.2 or higher) installed on your computer. The installed version
|
||||
will need to have been compiled with the same compiler you intend to
|
||||
compile OpenMC with. OpenMC requires PETSc_ to be configured with Fortran
|
||||
datatypes. An example of configuring PETSc_ is listed below::
|
||||
|
||||
./configure --prefix=/opt/petsc/3.4.4 --download-f-blas-lapack \
|
||||
--with-mpi-dir=/opt/mpich/3.1 --with-shared-libraries \
|
||||
--with-fortran-datatypes
|
||||
|
||||
The BLAS/LAPACK library is not required to be downloaded and can be linked
|
||||
explicitly (e.g., Intel MKL library).
|
||||
|
||||
* git_ version control software for obtaining source code
|
||||
|
||||
.. _gfortran: http://gcc.gnu.org/wiki/GFortran
|
||||
|
|
@ -108,7 +93,6 @@ Prerequisites
|
|||
.. _OpenMPI: http://www.open-mpi.org
|
||||
.. _MPICH: http://www.mpich.org
|
||||
.. _HDF5: http://www.hdfgroup.org/HDF5/
|
||||
.. _PETSc: http://www.mcs.anl.gov/petsc/
|
||||
|
||||
Obtaining the Source
|
||||
--------------------
|
||||
|
|
@ -139,10 +123,10 @@ Build Configuration
|
|||
-------------------
|
||||
|
||||
Compiling OpenMC with CMake is carried out in two steps. First, ``cmake`` is run
|
||||
to determine the compiler, whether optional packages (MPI, HDF5, PETSc) are
|
||||
available, to generate a list of dependencies between source files so that they
|
||||
may be compiled in the correct order, and to generate a normal Makefile. The
|
||||
Makefile is then used by ``make`` to actually carry out the compile and linking
|
||||
to determine the compiler, whether optional packages (MPI, HDF5) are available,
|
||||
to generate a list of dependencies between source files so that they may be
|
||||
compiled in the correct order, and to generate a normal Makefile. The Makefile
|
||||
is then used by ``make`` to actually carry out the compile and linking
|
||||
commands. A typical out-of-source build would thus look something like the
|
||||
following
|
||||
|
||||
|
|
@ -177,10 +161,6 @@ openmp
|
|||
Enables shared-memory parallelism using the OpenMP API. The Fortran compiler
|
||||
being used must support OpenMP.
|
||||
|
||||
petsc
|
||||
Enables PETSc for use in CMFD acceleration. The PETSC_DIR variable should be
|
||||
set to the base directory of the PETSc installation.
|
||||
|
||||
To set any of these options (e.g. turning on debug mode), the following form
|
||||
should be used:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue