mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Make micro_photon_xs available on C++ side
This commit is contained in:
parent
5e0405ab74
commit
dc2f2f8ae0
4 changed files with 49 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue