mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Merge pull request #2381 from paulromano/anisotropic-fission
Use correct direction for anisotropic fission and update numpy version for tests
This commit is contained in:
commit
a528de2976
117 changed files with 13655 additions and 35684 deletions
|
|
@ -87,8 +87,8 @@ Direction sample_target_velocity(const Nuclide& nuc, double E, Direction u,
|
|||
Direction sample_cxs_target_velocity(
|
||||
double awr, double E, Direction u, double kT, uint64_t* seed);
|
||||
|
||||
void sample_fission_neutron(int i_nuclide, const Reaction& rx, double E_in,
|
||||
SourceSite* site, uint64_t* seed);
|
||||
void sample_fission_neutron(
|
||||
int i_nuclide, const Reaction& rx, SourceSite* site, Particle& p);
|
||||
|
||||
//! handles all reactions with a single secondary neutron (other than fission),
|
||||
//! i.e. level scattering, (n,np), (n,na), etc.
|
||||
|
|
|
|||
|
|
@ -157,5 +157,24 @@ extern vector<unique_ptr<Filter>> tally_filters;
|
|||
//! Make sure index corresponds to a valid filter
|
||||
int verify_filter(int32_t index);
|
||||
|
||||
//==============================================================================
|
||||
// Filter implementation
|
||||
//==============================================================================
|
||||
|
||||
template<typename T>
|
||||
T* Filter::create(int32_t id)
|
||||
{
|
||||
static_assert(std::is_base_of<Filter, T>::value,
|
||||
"Type specified is not derived from openmc::Filter");
|
||||
// Create filter and add to filters vector
|
||||
auto filter = make_unique<T>();
|
||||
auto ptr_out = filter.get();
|
||||
model::tally_filters.emplace_back(std::move(filter));
|
||||
// Assign ID
|
||||
model::tally_filters.back()->set_id(id);
|
||||
|
||||
return ptr_out;
|
||||
}
|
||||
|
||||
} // namespace openmc
|
||||
#endif // OPENMC_TALLIES_FILTER_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue