mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Remove resonance reconstruction and Cython dependency (#3111)
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
ae245e0fb7
commit
9483cce0bc
11 changed files with 33 additions and 669 deletions
|
|
@ -708,28 +708,6 @@ class ResonancesWithBackground(EqualityMixin):
|
|||
self.background = background
|
||||
self.mt = mt
|
||||
|
||||
def __call__(self, x):
|
||||
# Get background cross section
|
||||
xs = self.background(x)
|
||||
|
||||
for r in self.resonances:
|
||||
if not isinstance(r, openmc.data.resonance._RESOLVED):
|
||||
continue
|
||||
|
||||
if isinstance(x, Iterable):
|
||||
# Determine which energies are within resolved resonance range
|
||||
within = (r.energy_min <= x) & (x <= r.energy_max)
|
||||
|
||||
# Get resonance cross sections and add to background
|
||||
resonant_xs = r.reconstruct(x[within])
|
||||
xs[within] += resonant_xs[self.mt]
|
||||
else:
|
||||
if r.energy_min <= x <= r.energy_max:
|
||||
resonant_xs = r.reconstruct(x)
|
||||
xs += resonant_xs[self.mt]
|
||||
|
||||
return xs
|
||||
|
||||
@property
|
||||
def background(self):
|
||||
return self._background
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue