mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Document special and abstract methods for Integrators
This commit is contained in:
parent
18c4d5f432
commit
5adc3b5816
3 changed files with 25 additions and 3 deletions
9
docs/source/_templates/myintegrator.rst
Normal file
9
docs/source/_templates/myintegrator.rst
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{{ fullname }}
|
||||
{{ underline }}
|
||||
|
||||
.. currentmodule:: {{ module }}
|
||||
|
||||
.. autoclass:: {{ objname }}
|
||||
:members:
|
||||
:inherited-members:
|
||||
:special-members: __call__, __len__, __iter__
|
||||
|
|
@ -14,7 +14,7 @@ transport-depletion coupling algorithms <http://hdl.handle.net/1721.1/113721>`_.
|
|||
.. autosummary::
|
||||
:toctree: generated
|
||||
:nosignatures:
|
||||
:template: myclassinherit.rst
|
||||
:template: myintegrator.rst
|
||||
|
||||
integrator.PredictorIntegrator
|
||||
integrator.CECMIntegrator
|
||||
|
|
@ -95,7 +95,18 @@ The following classes are abstract classes that can be used to extend the
|
|||
EnergyHelper
|
||||
TransportOperator
|
||||
|
||||
Each of the integrator functions also relies on a number of "helper" functions
|
||||
Custom integrators can be developed by subclassing from the following abstract
|
||||
base classes:
|
||||
|
||||
.. autosummary::
|
||||
:toctree: generated
|
||||
:nosignatures:
|
||||
:template: myintegrator.rst
|
||||
|
||||
Integrator
|
||||
SIIntegrator
|
||||
|
||||
Each of the integrator classes also relies on a number of "helper" functions
|
||||
as follows:
|
||||
|
||||
.. autosummary::
|
||||
|
|
|
|||
|
|
@ -118,9 +118,11 @@ class Integrator(ABC):
|
|||
"""
|
||||
|
||||
def __iter__(self):
|
||||
"""Return pairs of time steps in [s] and powers in [W]"""
|
||||
return zip(self.timesteps, self.power)
|
||||
|
||||
def __len__(self):
|
||||
"""Return integer number of depletion intervals"""
|
||||
return len(self.timesteps)
|
||||
|
||||
def _get_bos_data_from_operator(self, step_index, step_power, bos_conc):
|
||||
|
|
@ -180,7 +182,7 @@ class Integrator(ABC):
|
|||
|
||||
|
||||
class SIIntegrator(Integrator):
|
||||
"""Abstract for the Stochastic Implicit Euler integrators
|
||||
"""Abstract class for the Stochastic Implicit Euler integrators
|
||||
|
||||
Does not provide a ``__call__`` method, but scales and resets
|
||||
the number of particles used in initial transport calculation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue