Make micro_photon_xs available on C++ side

This commit is contained in:
Paul Romano 2019-01-03 13:53:21 -06:00
parent 5e0405ab74
commit dc2f2f8ae0
4 changed files with 49 additions and 14 deletions

View file

@ -22,16 +22,35 @@ public:
int Z_; //! Atomic number
};
//==============================================================================
//! Cached microscopic photon cross sections for a particular element at the
//! current energy
//==============================================================================
struct ElementMicroXS {
int index_grid; //!< index on element energy grid
double last_E {0.0}; //!< last evaluated energy in [eV]
double interp_factor; //!< interpolation factor on energy grid
double total; //!< microscopic total photon xs
double coherent; //!< microscopic coherent xs
double incoherent; //!< microscopic incoherent xs
double photoelectric; //!< microscopic photoelectric xs
double pair_production; //!< microscopic pair production xs
};
//==============================================================================
// Global variables
//==============================================================================
namespace data {
extern std::vector<PhotonInteraction> elements;
} // namespace data
namespace simulation {
extern ElementMicroXS* micro_photon_xs;
#pragma omp threadprivate(micro_photon_xs)
} // namespace simulation
} // namespace openmc
#endif // OPENMC_PHOTON_H