Merge pull request #1406 from nelsonag/mgxs_f_to_c

Mgxs code cleanup
This commit is contained in:
Paul Romano 2019-11-18 07:42:20 -06:00 committed by GitHub
commit 09fbc034d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 524 additions and 348 deletions

View file

@ -11,6 +11,7 @@
#include "openmc/constants.h"
#include "openmc/hdf5_interface.h"
#include "openmc/particle.h"
#include "openmc/xsdata.h"
@ -143,6 +144,11 @@ class Mgxs {
get_xs(int xstype, int gin, const int* gout, const double* mu,
const int* dg);
inline double
get_xs(int xstype, int gin)
{return get_xs(xstype, gin, nullptr, nullptr, nullptr);}
//! \brief Samples the fission neutron energy and if prompt or delayed.
//!
//! @param gin Incoming energy group.
@ -162,15 +168,9 @@ class Mgxs {
//! \brief Calculates cross section quantities needed for tracking.
//!
//! @param gin Incoming energy group.
//! @param sqrtkT Temperature of the material.
//! @param u Incoming particle direction.
//! @param total_xs Resultant total cross section.
//! @param abs_xs Resultant absorption cross section.
//! @param nu_fiss_xs Resultant nu-fission cross section.
//! @param p The particle whose attributes set which MGXS to get.
void
calculate_xs(int gin, double sqrtkT, Direction u,
double& total_xs, double& abs_xs, double& nu_fiss_xs);
calculate_xs(Particle& p);
//! \brief Sets the temperature index in cache given a temperature
//!

View file

@ -78,39 +78,5 @@ void set_mg_interface_nuclides_and_temps();
// After macro XS have been read, materials can be marked as fissionable
void mark_fissionable_mgxs_materials();
//==============================================================================
// Mgxs tracking/transport/tallying interface methods
//==============================================================================
extern "C" void
calculate_xs_c(int i_mat, int gin, double sqrtkT, Direction u,
double& total_xs, double& abs_xs, double& nu_fiss_xs);
double
get_nuclide_xs(int index, int xstype, int gin, const int* gout,
const double* mu, const int* dg);
inline double
get_nuclide_xs(int index, int xstype, int gin)
{return get_nuclide_xs(index, xstype, gin, nullptr, nullptr, nullptr);}
double
get_macro_xs(int index, int xstype, int gin, const int* gout,
const double* mu, const int* dg);
inline double
get_macro_xs(int index, int xstype, int gin)
{return get_macro_xs(index, xstype, gin, nullptr, nullptr, nullptr);}
//==============================================================================
// General Mgxs methods
//==============================================================================
extern "C" void
get_name_c(int index, int name_len, char* name);
extern "C" double
get_awr_c(int index);
} // namespace openmc
#endif // OPENMC_MGXS_INTERFACE_H