mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-21 14:35:27 -04:00
changing the description of tracks arg
This commit is contained in:
parent
bdb6d38bfd
commit
476feab519
3 changed files with 42 additions and 4 deletions
|
|
@ -31,7 +31,9 @@ def _process_CLI_arguments(volume=False, geometry_debug=False, particles=None,
|
|||
to the number of hardware threads available (or a value set by the
|
||||
:envvar:`OMP_NUM_THREADS` environment variable).
|
||||
tracks : bool, optional
|
||||
Write tracks for all particles. Defaults to False.
|
||||
Enables the writing of particles tracks. The number of particle
|
||||
tracks written to tracks.h5 is limited to 1000 unless
|
||||
Settings.max_tracks is set. Defaults to False.
|
||||
event_based : None or bool, optional
|
||||
Turns on event-based parallelism if True. If None, the value in
|
||||
the Settings will be used.
|
||||
|
|
@ -245,7 +247,9 @@ def run(particles=None, threads=None, geometry_debug=False,
|
|||
restart_file : str, optional
|
||||
Path to restart file to use
|
||||
tracks : bool, optional
|
||||
Write tracks for all particles. Defaults to False.
|
||||
Enables the writing of particles tracks. The number of particle
|
||||
tracks written to tracks.h5 is limited to 1000 unless
|
||||
Settings.max_tracks is set. Defaults to False.
|
||||
output : bool
|
||||
Capture OpenMC output from standard out
|
||||
cwd : str, optional
|
||||
|
|
|
|||
|
|
@ -458,6 +458,36 @@ class RegularMesh(StructuredMesh):
|
|||
string += '{0: <16}{1}{2}\n'.format('\tWidth', '=\t', self._width)
|
||||
return string
|
||||
|
||||
@classmethod
|
||||
def from_universe(cls, universe, dimension=[10, 10, 10], mesh_id=None, name=''):
|
||||
"""Create mesh from an existing openmc universe
|
||||
|
||||
Parameters
|
||||
----------
|
||||
universe : openmc.Universe
|
||||
Open used as a template for this mesh
|
||||
dimension : Iterable of int
|
||||
The number of mesh cells in each direction.
|
||||
mesh_id : int
|
||||
Unique identifier for the mesh
|
||||
name : str
|
||||
Name of the mesh
|
||||
|
||||
Returns
|
||||
-------
|
||||
openmc.RegularMesh
|
||||
RegularMesh instance
|
||||
|
||||
"""
|
||||
cv.check_type('rectangular lattice', universe, openmc.Universe)
|
||||
|
||||
mesh = cls(mesh_id, name)
|
||||
mesh.lower_left = universe.bounding_box[0]
|
||||
mesh.upper_right = universe.bounding_box[1]
|
||||
mesh.dimension = dimension
|
||||
|
||||
return mesh
|
||||
|
||||
@classmethod
|
||||
def from_hdf5(cls, group):
|
||||
mesh_id = int(group.name.split('/')[-1].lstrip('mesh '))
|
||||
|
|
|
|||
|
|
@ -256,7 +256,9 @@ class Model:
|
|||
restart_file : str, optional
|
||||
Path to restart file to use
|
||||
tracks : bool, optional
|
||||
Write tracks for all particles. Defaults to False.
|
||||
Enables the writing of particles tracks. The number of particle
|
||||
tracks written to tracks.h5 is limited to 1000 unless
|
||||
Settings.max_tracks is set. Defaults to False.
|
||||
output : bool
|
||||
Capture OpenMC output from standard out
|
||||
event_based : None or bool, optional
|
||||
|
|
@ -517,7 +519,9 @@ class Model:
|
|||
restart_file : str, optional
|
||||
Path to restart file to use
|
||||
tracks : bool, optional
|
||||
Write tracks for all particles. Defaults to False.
|
||||
Enables the writing of particles tracks. The number of particle
|
||||
tracks written to tracks.h5 is limited to 1000 unless
|
||||
Settings.max_tracks is set. Defaults to False.
|
||||
output : bool, optional
|
||||
Capture OpenMC output from standard out
|
||||
cwd : str, optional
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue