mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Fixes to documentation
This commit is contained in:
parent
efb3ca0406
commit
dab1c2aef3
6 changed files with 52 additions and 2391 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -8,7 +8,10 @@ In order to keep the OpenMC code base consistent in style, this guide specifies
|
|||
a number of rules which should be adhered to when modified existing code or
|
||||
adding new code in OpenMC.
|
||||
|
||||
-------------
|
||||
-------
|
||||
Fortran
|
||||
-------
|
||||
|
||||
General Rules
|
||||
-------------
|
||||
|
||||
|
|
@ -35,7 +38,6 @@ Don't use ``print *`` or ``write(*,*)``. If writing to a file, use a specific
|
|||
unit. Writing to standard output or standard error should be handled by the
|
||||
``write_message`` subroutine or functionality in the error module.
|
||||
|
||||
----------
|
||||
Procedures
|
||||
----------
|
||||
|
||||
|
|
@ -47,7 +49,6 @@ intent(in), intent(out), or intent(inout).
|
|||
|
||||
Include a comment describing what each argument to a procedure is.
|
||||
|
||||
---------
|
||||
Variables
|
||||
---------
|
||||
|
||||
|
|
@ -91,7 +92,7 @@ allocation instead. Use allocatable variables instead of pointer variables when
|
|||
possible.
|
||||
|
||||
Shared/Module Variables
|
||||
-----------------------
|
||||
+++++++++++++++++++++++
|
||||
|
||||
Always put shared variables in modules. Access module variables through a
|
||||
``use`` statement. Always use the ``only`` specifier on the ``use`` statement
|
||||
|
|
@ -99,14 +100,12 @@ except for variables from the global, constants, and various header modules.
|
|||
|
||||
Never use ``equivalence`` statements, ``common`` blocks, or ``data`` statements.
|
||||
|
||||
-------------------------
|
||||
Derived Types and Classes
|
||||
-------------------------
|
||||
|
||||
Derived types and classes should have CamelCase names with words not separated
|
||||
by underscores or hyphens.
|
||||
|
||||
-----------
|
||||
Indentation
|
||||
-----------
|
||||
|
||||
|
|
@ -129,11 +128,10 @@ f90-type-indent, f90-associate-indent, and f90-program indent to 2.
|
|||
Continuation lines should be indented by an extra 5 spaces. This is the default
|
||||
value of f90-continuation-indent in Emacs.
|
||||
|
||||
-------------------------
|
||||
Whitespace in Expressions
|
||||
-------------------------
|
||||
|
||||
Use a single space between arguments to procedures.
|
||||
Use a single space between arguments to procedures.
|
||||
|
||||
Avoid extraneous whitespace in the following situations:
|
||||
|
||||
|
|
@ -146,3 +144,23 @@ Avoid extraneous whitespace in the following situations:
|
|||
|
||||
Yes: if (variable == 2) then
|
||||
No: if ( variable==2 ) then
|
||||
|
||||
------
|
||||
Python
|
||||
------
|
||||
|
||||
Style for Python code should follow PEP8_.
|
||||
|
||||
Docstrings for functions and methods should follow nummpydoc_ style.
|
||||
|
||||
Python code should work with both Python 2.7+ and Python 3.0+.
|
||||
|
||||
Use of third-party Python packages should be limited to numpy_, scipy_, and
|
||||
h5py_. Use of other third-party packages must be implemented as optional
|
||||
dependencies rather than required dependencies.
|
||||
|
||||
.. _PEP8:
|
||||
.. _numpydoc:
|
||||
.. _numpy:
|
||||
.. _scipy:
|
||||
.. _h5py:
|
||||
|
|
|
|||
|
|
@ -4,9 +4,7 @@
|
|||
Voxel Plot Binary File Specifications
|
||||
=====================================
|
||||
|
||||
----------
|
||||
Revision 1
|
||||
----------
|
||||
The current revision of the voxel plot binary file is 1.
|
||||
|
||||
**integer(4) n_voxels_x**
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ Development Workflow
|
|||
Anyone wishing to make contributions to OpenMC should be fully acquianted and
|
||||
comfortable working with git_ and GitHub_. We assume here that you have git
|
||||
installed on your system, have a GitHub account, and have setup SSH keys to be
|
||||
able to create/push to repositories on GitHub.
|
||||
able to create/push to repositories on GitHub.
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
|
@ -71,7 +71,7 @@ features and bug fixes. The general steps for contributing are as follows:
|
|||
git checkout -b newbranch develop
|
||||
|
||||
3. Make your changes on the new branch that you intend to have included in
|
||||
*develop*. If you have made other changes that should not be merged back,
|
||||
*develop*. If you have made other changes that should not be merged back,
|
||||
ensure that those changes are made on a different branch.
|
||||
|
||||
4. Issue a pull request from GitHub and select the *develop* branch of
|
||||
|
|
@ -98,7 +98,7 @@ OpenMC Test Suite
|
|||
|
||||
The purpose of this test suite is to ensure that OpenMC compiles using various
|
||||
combinations of compiler flags and options, and that all user input options can
|
||||
be used successfully without breaking the code. The test suite is comprised of
|
||||
be used successfully without breaking the code. The test suite is comprised of
|
||||
regression tests where different types of input files are configured and the
|
||||
full OpenMC code is executed. Results from simulations are compared with
|
||||
expected results. The test suite is comprised of many build configurations
|
||||
|
|
@ -114,7 +114,7 @@ download these cross sections please do the following:
|
|||
.. code-block:: sh
|
||||
|
||||
cd ../data
|
||||
python get_nndc.py
|
||||
python get_nndc_data.py
|
||||
export CROSS_SECTIONS=<path_to_data_folder>/nndc/cross_sections.xml
|
||||
|
||||
The test suite can be run on an already existing build using:
|
||||
|
|
@ -151,7 +151,7 @@ variables should be set if the default paths are incorrect:
|
|||
|
||||
* **PHDF5_DIR** - The path to the parallel HDF5 directory.
|
||||
|
||||
* Default - */opt/phdf5/1.8.12-gnu*
|
||||
* Default - */opt/phdf5/1.8.12-gnu*
|
||||
|
||||
* **PETSC_DIR** - The path to the PETSc directory.
|
||||
|
||||
|
|
@ -192,7 +192,7 @@ Adding tests to test suite
|
|||
|
||||
To add a new test to the test suite, create a sub-directory in the tests
|
||||
directory that conforms to the regular expression *test_*. To configure
|
||||
a test you need to add the following files to your new test directory,
|
||||
a test you need to add the following files to your new test directory,
|
||||
*test_name* for example:
|
||||
|
||||
* OpenMC input XML files
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue