mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
vectfit package is not always required
This commit is contained in:
parent
fe0221445e
commit
52516663c6
2 changed files with 8 additions and 1 deletions
|
|
@ -175,6 +175,9 @@ def _vectfit_xs(energy, ce_xs, mts, rtol=1e-3, atol=1e-5, orders=None,
|
|||
|
||||
"""
|
||||
|
||||
# import vectfit package: https://github.com/mit-crpg/vectfit
|
||||
import vectfit as vf
|
||||
|
||||
ne = energy.size
|
||||
nmt = len(mts)
|
||||
if ce_xs.shape != (nmt, ne):
|
||||
|
|
@ -569,6 +572,9 @@ def _windowing(mp_data, rtol=1e-3, atol=1e-5, n_win=None, n_cf=None,
|
|||
|
||||
"""
|
||||
|
||||
# import vectfit package: https://github.com/mit-crpg/vectfit
|
||||
import vectfit as vf
|
||||
|
||||
# unpack multipole data
|
||||
name = mp_data["name"]
|
||||
awr = mp_data["AWR"]
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include <fmt/core.h>
|
||||
|
||||
#include <cmath>
|
||||
#include <algorithm> // for min
|
||||
|
||||
namespace openmc {
|
||||
|
||||
|
|
@ -71,7 +72,7 @@ WindowedMultipole::evaluate(double E, double sqrtkT)
|
|||
|
||||
// Locate window containing energy
|
||||
int i_window = std::min(windows_.shape()[0] - 1,
|
||||
(sqrtE - std::sqrt(E_min_)) / spacing_);
|
||||
static_cast<unsigned long>((sqrtE - std::sqrt(E_min_)) / spacing_));
|
||||
int startw = windows_(i_window, 0) - 1;
|
||||
int endw = windows_(i_window, 1) - 1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue