added log=True in multipole generation tests

This commit is contained in:
Jingang Liang 2020-10-14 11:09:33 +08:00
parent 30557b5c83
commit 5357bdabbb
2 changed files with 5 additions and 7 deletions

View file

@ -455,10 +455,7 @@ def vectfit_nuclide(endf_file, njoy_error=5e-4, vf_pieces=None,
E_min, E_max = energy[0], energy[-1]
n_points = energy.size
total_xs = nuc_ce[1].xs['0K'](energy)
try:
elastic_xs = nuc_ce[2].xs['0K'](energy)
except KeyError:
elastic_xs = np.zeros_like(total_xs)
elastic_xs = nuc_ce[2].xs['0K'](energy)
try:
absorption_xs = nuc_ce[27].xs['0K'](energy)
@ -1067,7 +1064,8 @@ class WindowedMultipole(EqualityMixin):
mp_data : dictionary or str
Dictionary or Path to the multipole data stored in a pickle file
search : bool, optional
Whether to search for optimal window size and curvefit order
Whether to search for optimal window size and curvefit order.
Defaults to True if no windowing parameters are specified.
log : bool or int, optional
Whether to print running logs (use int for verbosity control)
**kwargs

View file

@ -53,7 +53,7 @@ def test_from_endf():
endf_data = os.environ['OPENMC_ENDF_DATA']
endf_file = os.path.join(endf_data, 'neutrons', 'n-001_H_001.endf')
return openmc.data.WindowedMultipole.from_endf(
endf_file, wmp_options={"n_win": 400, "n_cf": 3})
endf_file, log=True, wmp_options={"n_win": 400, "n_cf": 3})
def test_from_endf_search():
@ -61,4 +61,4 @@ def test_from_endf_search():
endf_data = os.environ['OPENMC_ENDF_DATA']
endf_file = os.path.join(endf_data, 'neutrons', 'n-095_Am_244.endf')
return openmc.data.WindowedMultipole.from_endf(
endf_file, wmp_options={"search": True, 'rtol':1e-2})
endf_file, log=True, wmp_options={"search": True, 'rtol':1e-2})