Fix documentation build (deplete module was causing issues)

This commit is contained in:
Paul Romano 2019-10-04 12:48:23 -05:00
parent d32c2175ba
commit e869d8eef1
5 changed files with 17 additions and 18 deletions

View file

@ -27,7 +27,7 @@ MOCK_MODULES = [
'scipy.interpolate', 'scipy.integrate', 'scipy.optimize', 'scipy.special',
'scipy.stats', 'scipy.spatial', 'h5py', 'pandas', 'uncertainties',
'matplotlib', 'matplotlib.pyplot', 'openmoc',
'openmc.data.reconstruct'
'openmc.data.reconstruct', 'openmc.checkvalue'
]
sys.modules.update((mod_name, MagicMock()) for mod_name in MOCK_MODULES)

View file

@ -126,8 +126,15 @@ data, such as number densities and reaction rates for each material.
Results
ResultsList
The following functions are used to solve the depletion equations, with
:func:`cram.CRAM48` being the default.
The following class and functions are used to solve the depletion equations,
with :func:`cram.CRAM48` being the default.
.. autosummary::
:toctree: generated
:nosignatures:
:template: myintegrator.rst
cram.IPFCramSolver
.. autosummary::
:toctree: generated
@ -196,4 +203,3 @@ the following abstract base classes:
abc.Integrator
abc.SIIntegrator
abc.DepSystemSolver
abc.IPFCramSolver

View file

@ -4,12 +4,11 @@ openmc.deplete
A depletion front-end tool.
"""
from sys import exit
import sys
from unittest.mock import Mock
from h5py import get_config
from unittest.mock import Mock
from .dummy_comm import DummyCommunicator
try:
@ -22,7 +21,7 @@ try:
if not get_config().mpi and comm.size > 1:
# Raise exception only on process 0
if comm.rank:
exit()
sys.exit()
raise RuntimeError(
"Need parallel HDF5 installed to perform depletion with MPI"
)

View file

@ -28,7 +28,7 @@ from .results_list import ResultsList
__all__ = [
"OperatorResult", "TransportOperator", "ReactionRateHelper",
"EnergyHelper", "FissionYieldHelper", "TalliedFissionYieldHelper",
"Integrator", "SIIntegrator"]
"Integrator", "SIIntegrator", "DepSystemSolver"]
OperatorResult = namedtuple('OperatorResult', ['k', 'rates'])

View file

@ -17,7 +17,7 @@ from .abc import DepSystemSolver
__all__ = [
"deplete", "timed_deplete", "CRAM16", "CRAM48",
"Cram16Solver", "Cram48Solver"]
"Cram16Solver", "Cram48Solver", "IPFCramSolver"]
def deplete(chain, x, rates, dt, matrix_func=None):
@ -88,16 +88,11 @@ def timed_deplete(*args, **kwargs):
class IPFCramSolver(DepSystemSolver):
r"""Class for solving depletion systems with IPF Cram
r"""CRAM depletion solver that uses incomplete partial factorization
Provides a :meth:`__call__` that utilizes an incomplete
partial factorization (IPF) for the Chebyshev Rational Approximation
Method (CRAM)
M. Pusa, "Higher-Order Chebyshev Rational Approximation
Method and Application to Burnup Equations," Nuclear Science And
Engineering, 182:3,297-318
`DOI: 10.13182/NSE15-26 <https://doi.org/10.13182/NSE15-26>`_
Method (CRAM), as described in the following paper: M. Pusa, "`Higher-Order Chebyshev Rational Approximation Method and Application to Burnup Equations <https://doi.org/10.13182/NSE15-26>`_," Nucl. Sci. Eng., 182:3, 297-318.
Parameters
----------
@ -256,4 +251,3 @@ Cram48Solver = IPFCramSolver(c48_alpha, c48_theta, c48_alpha0)
del c48_alpha, c48_alpha0, c48_theta, alpha_r, alpha_i, theta_r, theta_i
CRAM48 = Cram48Solver.__call__