diff --git a/docs/source/conf.py b/docs/source/conf.py index 55776b8f4..f46b11334 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -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) diff --git a/docs/source/pythonapi/deplete.rst b/docs/source/pythonapi/deplete.rst index 48cb3f1cb..b864529d1 100644 --- a/docs/source/pythonapi/deplete.rst +++ b/docs/source/pythonapi/deplete.rst @@ -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 diff --git a/openmc/deplete/__init__.py b/openmc/deplete/__init__.py index f0b04c3de..b54d7f11d 100644 --- a/openmc/deplete/__init__.py +++ b/openmc/deplete/__init__.py @@ -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" ) diff --git a/openmc/deplete/abc.py b/openmc/deplete/abc.py index 0bcd1eb2c..462d0f346 100644 --- a/openmc/deplete/abc.py +++ b/openmc/deplete/abc.py @@ -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']) diff --git a/openmc/deplete/cram.py b/openmc/deplete/cram.py index f4a847907..c684b3394 100644 --- a/openmc/deplete/cram.py +++ b/openmc/deplete/cram.py @@ -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 `_ + Method (CRAM), as described in the following paper: M. Pusa, "`Higher-Order Chebyshev Rational Approximation Method and Application to Burnup Equations `_," 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__ -