Skip to content

Commit

Permalink
Small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
paulromano committed Jan 24, 2025
1 parent bddc770 commit bb776a8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/source/usersguide/variance_reduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ random ray mode can be found in the :ref:`Random Ray User Guide <random_ray>`.
2. Make a copy of your continuous energy Python input file. You'll edit the new
file to work in multigroup mode with random ray for producing weight windows.

3. Adjust the material definitions in your new multigroup python file to utilize
3. Adjust the material definitions in your new multigroup Python file to utilize
the multigroup cross sections instead of nuclide-wise continuous energy data.
There is a specific example of making this conversion in the :ref:`random ray
MGXS guide <mgxs_gen>`.
Expand Down
3 changes: 2 additions & 1 deletion tests/regression_tests/weightwindows_fw_cadis/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def test_random_ray_adjoint_fixed_source():
ww_mesh.lower_left = (0.0, 0.0, 0.0)
ww_mesh.upper_right = (width, width, width)

wwg = openmc.WeightWindowGenerator(method="fw_cadis", mesh=ww_mesh, max_realizations=model.settings.batches)
wwg = openmc.WeightWindowGenerator(
method="fw_cadis", mesh=ww_mesh, max_realizations=model.settings.batches)
model.settings.weight_window_generators = wwg
model.settings.random_ray['volume_estimator'] = 'naive'

Expand Down
9 changes: 4 additions & 5 deletions tests/testing_harness.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,16 +459,15 @@ def _get_results(self):
formatted_upper_bound = [f'{x:.2e}' for x in flattened_upper_bound]

# Concatenate the formatted arrays
concatenated_strings = [
"Lower Bounds"] + formatted_lower_bound + ["Upper Bounds"] + formatted_upper_bound
concatenated_strings = ["Lower Bounds"] + formatted_lower_bound + \
["Upper Bounds"] + formatted_upper_bound

# Join the concatenated strings into a single string with newline characters
final_string = '\n'.join(concatenated_strings)

# Prepend the mesh text description and return final string
final_string = str(ww.mesh) + final_string
return final_string

return str(ww.mesh) + final_string

def _cleanup(self):
super()._cleanup()
f = 'weight_windows.h5'
Expand Down

0 comments on commit bb776a8

Please sign in to comment.