mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Introduce data::thermal_scatt, remove Fortran implementation of nuclide xs
This commit is contained in:
parent
8be229ee62
commit
bc13a65711
10 changed files with 68 additions and 430 deletions
|
|
@ -58,7 +58,7 @@ void scatter(Particle*, int i_nuclide, int i_nuc_mat);
|
|||
void elastic_scatter(int i_nuclide, const Reaction* rx, double kT, double* E,
|
||||
double* uvw, double* mu_lab, double* wgt);
|
||||
|
||||
extern "C" void sab_scatter(int i_nuclide, int i_sab, double* E,
|
||||
void sab_scatter(int i_nuclide, int i_sab, double* E,
|
||||
double* uvw, double* mu);
|
||||
|
||||
//! samples the target velocity. The constant cross section free gas model is
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#define OPENMC_THERMAL_H
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
|
@ -27,6 +28,16 @@ constexpr int SAB_SECONDARY_CONT {2}; // Continuous, linear-linear interpolati
|
|||
constexpr int SAB_ELASTIC_INCOHERENT {3}; // Incoherent elastic scattering
|
||||
constexpr int SAB_ELASTIC_COHERENT {4}; // Coherent elastic scattering (Bragg edges)
|
||||
|
||||
//==============================================================================
|
||||
// Global variables
|
||||
//==============================================================================
|
||||
|
||||
class ThermalScattering;
|
||||
|
||||
namespace data {
|
||||
extern std::vector<std::unique_ptr<ThermalScattering>> thermal_scatt;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
//! Secondary angle-energy data for thermal neutron scattering at a single
|
||||
//! temperature
|
||||
|
|
@ -37,7 +48,7 @@ public:
|
|||
ThermalData(hid_t group, int secondary_mode);
|
||||
|
||||
// Sample an outgoing energy and angle
|
||||
void sample(const NuclideMicroXS* micro_xs, double E_in,
|
||||
void sample(const NuclideMicroXS& micro_xs, double E_in,
|
||||
double* E_out, double* mu);
|
||||
private:
|
||||
//! Secondary energy/angle distributions for inelastic thermal scattering
|
||||
|
|
@ -112,7 +123,7 @@ public:
|
|||
bool has_nuclide(const char* name) const;
|
||||
|
||||
// Sample an outgoing energy and angle
|
||||
void sample(const NuclideMicroXS* micro_xs, double E_in,
|
||||
void sample(const NuclideMicroXS& micro_xs, double E_in,
|
||||
double* E_out, double* mu);
|
||||
|
||||
double threshold() const { return data_[0].threshold_inelastic_; }
|
||||
|
|
@ -133,12 +144,8 @@ public:
|
|||
extern "C" {
|
||||
ThermalScattering* sab_from_hdf5(hid_t group, const double* temperature,
|
||||
int n, int method, double tolerance, const double* minmax);
|
||||
void sab_calculate_xs(ThermalScattering* data, double E, double sqrtkT,
|
||||
int* i_temp, double* elastic, double* inelastic);
|
||||
void sab_free(ThermalScattering* data);
|
||||
bool sab_has_nuclide(ThermalScattering* data, const char* name);
|
||||
void sab_sample(ThermalScattering* data, const NuclideMicroXS* micro_xs,
|
||||
double E_in, double* E_out, double* mu);
|
||||
double sab_threshold(ThermalScattering* data);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue