Start adding C API documentation

This commit is contained in:
Paul Romano 2017-06-14 20:58:04 -05:00
parent cb6b5bea4a
commit e2b8a6c264
3 changed files with 38 additions and 2 deletions

View file

@ -0,0 +1,34 @@
.. _capi:
=====
C API
=====
.. c:function:: int openmc_find(double* xyz, int rtype)
Return the ID of the cell/material containing a given point
:param xyz: Cartesian coordinates
:type xyz: double[3]
:param rtype: Which ID to return (1=cell, 2=material)
:type rtype: int
:rtype: int
.. c:function:: void openmc_init(int intracomm)
Initialize OpenMC
:param intracomm: MPI intracommunicator
:type intracomm: int
.. c:function:: void openmc_finalize()
Finalize a simulation
.. c:function:: void openmc_reset()
Resets all tally scores
.. c:function:: void openmc_run()
Run a simulation

View file

@ -25,8 +25,9 @@ except ImportError:
MOCK_MODULES = ['numpy', 'numpy.polynomial', 'numpy.polynomial.polynomial',
'h5py', 'pandas', 'uncertainties', 'openmoc',
'openmc.data.reconstruct']
'numpy.ctypeslib', 'scipy', 'scipy.sparse', 'scipy.interpolate',
'scipy.integrate', 'scipy.optimize', 'scipy.special', 'h5py',
'pandas', 'uncertainties', 'openmoc', 'openmc.data.reconstruct']
sys.modules.update((mod_name, MagicMock()) for mod_name in MOCK_MODULES)
import numpy as np

View file

@ -36,6 +36,7 @@ free to send a message to the User's Group `mailing list`_.
usersguide/index
devguide/index
pythonapi/index
capi/index
io_formats/index
publications
license