mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 13:15:39 -04:00
Start adding C API documentation
This commit is contained in:
parent
cb6b5bea4a
commit
e2b8a6c264
3 changed files with 38 additions and 2 deletions
34
docs/source/capi/index.rst
Normal file
34
docs/source/capi/index.rst
Normal 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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue