Skip to content

Commit

Permalink
added missing functions and classes to openmc.lib docs (#2847)
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
  • Loading branch information
shimwell and paulromano committed Apr 7, 2024
1 parent 704cfbf commit db3b6f3
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 10 deletions.
76 changes: 73 additions & 3 deletions docs/source/pythonapi/capi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Functions
current_batch
export_properties
export_weight_windows
import_weight_windows
finalize
find_cell
find_material
Expand All @@ -25,6 +24,7 @@ Functions
hard_reset
id_map
import_properties
import_weight_windows
init
is_statepoint_batch
iter_batches
Expand All @@ -40,8 +40,8 @@ Functions
run
run_in_memory
sample_external_source
simulation_init
simulation_finalize
simulation_init
source_bank
statepoint_write

Expand All @@ -53,16 +53,86 @@ Classes
:nosignatures:
:template: myclass.rst

AzimuthalFilter
Cell
CellFilter
CellInstanceFilter
CellbornFilter
CellfromFilter
CollisionFilter
CylindricalMesh
DelayedGroupFilter
DistribcellFilter
EnergyFilter
MaterialFilter
EnergyFunctionFilter
EnergyoutFilter
Filter
LegendreFilter
Material
MaterialFilter
MaterialFromFilter
Mesh
MeshFilter
MeshBornFilter
MeshSurfaceFilter
MuFilter
Nuclide
ParticleFilter
PolarFilter
RectilinearMesh
RegularMesh
SpatialLegendreFilter
SphericalHarmonicsFilter
SphericalMesh
SurfaceFilter
Tally
UniverseFilter
UnstructuredMesh
WeightWindows
ZernikeFilter
ZernikeRadialFilter

Data
----

.. data:: cells

Mapping of cell ID to :class:`openmc.lib.Cell` instances.

:type: dict

.. data:: filters

Mapping of filter ID to :class:`openmc.lib.Filter` instances.

:type: dict

.. data:: materials

Mapping of material ID to :class:`openmc.lib.Material` instances.

:type: dict

.. data:: meshes

Mapping of mesh ID to :class:`openmc.lib.Mesh` instances.

:type: dict

.. data:: nuclides

Mapping of nuclide name to :class:`openmc.lib.Nuclide` instances.

:type: dict

.. data:: tallies

Mapping of tally ID to :class:`openmc.lib.Tally` instances.

:type: dict

.. data:: weight_windows

Mapping of weight window ID to :class:`openmc.lib.WeightWindows` instances.

:type: dict
12 changes: 6 additions & 6 deletions openmc/arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ class CrossFilter:
Parameters
----------
left_filter : Filter or CrossFilter
left_filter : openmc.Filter or CrossFilter
The left filter in the outer product
right_filter : Filter or CrossFilter
right_filter : openmc.Filter or CrossFilter
The right filter in the outer product
binary_op : str
The tally arithmetic binary operator (e.g., '+', '-', etc.) used to
Expand All @@ -200,9 +200,9 @@ class CrossFilter:
----------
type : str
The type of the crossfilter (e.g., 'energy / energy')
left_filter : Filter or CrossFilter
left_filter : openmc.Filter or CrossFilter
The left filter in the outer product
right_filter : Filter or CrossFilter
right_filter : openmc.Filter or CrossFilter
The right filter in the outer product
binary_op : str
The tally arithmetic binary operator (e.g., '+', '-', etc.) used to
Expand Down Expand Up @@ -517,7 +517,7 @@ class AggregateFilter:
Parameters
----------
aggregate_filter : Filter or CrossFilter
aggregate_filter : openmc.Filter or CrossFilter
The filter included in the aggregation
bins : Iterable of tuple
The filter bins included in the aggregation
Expand All @@ -529,7 +529,7 @@ class AggregateFilter:
----------
type : str
The type of the aggregatefilter (e.g., 'sum(energy)', 'sum(cell)')
aggregate_filter : filter
aggregate_filter : openmc.Filter
The filter included in the aggregation
aggregate_op : str
The tally aggregation operator (e.g., 'sum', 'avg', etc.) used
Expand Down
6 changes: 5 additions & 1 deletion openmc/lib/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
from .material import Material
from .plot import _Position

__all__ = ['RegularMesh', 'RectilinearMesh', 'CylindricalMesh', 'SphericalMesh', 'UnstructuredMesh', 'meshes']
__all__ = [
'Mesh', 'RegularMesh', 'RectilinearMesh', 'CylindricalMesh',
'SphericalMesh', 'UnstructuredMesh', 'meshes'
]


class _MaterialVolume(Structure):
Expand Down Expand Up @@ -553,6 +556,7 @@ def set_grid(self, r_grid, phi_grid, z_grid):
_dll.openmc_cylindrical_mesh_set_grid(self._index, r_grid, nr, phi_grid,
nphi, z_grid, nz)


class SphericalMesh(Mesh):
"""SphericalMesh stored internally.
Expand Down

0 comments on commit db3b6f3

Please sign in to comment.