Modified the C API to support setting material temperatures and to support setting the event based flag. Fixed failing MPI test.

This commit is contained in:
agnelson 2021-09-30 16:34:58 -05:00
parent 20c8043c1c
commit e8081207d7
11 changed files with 100 additions and 67 deletions

View file

@ -88,6 +88,7 @@ int openmc_material_set_densities(
int openmc_material_set_id(int32_t index, int32_t id);
int openmc_material_get_name(int32_t index, const char** name);
int openmc_material_set_name(int32_t index, const char* name);
int openmc_material_set_temperature(int32_t index, double temperature);
int openmc_material_set_volume(int32_t index, double volume);
int openmc_material_filter_get_bins(
int32_t index, const int32_t** bins, size_t* n);

View file

@ -158,6 +158,10 @@ public:
double density_; //!< Total atom density in [atom/b-cm]
double density_gpcc_; //!< Total atom density in [g/cm^3]
double volume_ {-1.0}; //!< Volume in [cm^3]
double temperature_ {-1}; //!< Default temperature for material
//!< A negative indicates no default
//!< temperature was specified.
bool fissionable_ {
false}; //!< Does this material contain fissionable nuclides
bool depletable_ {false}; //!< Is the material depletable?
@ -195,10 +199,6 @@ private:
// Private data members
gsl::index index_;
//! \brief Default temperature for cells containing this material.
//!
//! A negative value indicates no default temperature was specified.
double temperature_ {-1};
};
//==============================================================================

View file

@ -32,7 +32,7 @@ extern "C" bool cmfd_run; //!< is a CMFD run?
extern bool
delayed_photon_scaling; //!< Scale fission photon yield to include delayed
extern "C" bool entropy_on; //!< calculate Shannon entropy?
extern bool event_based; //!< use event-based mode (instead of history-based)
extern "C" bool event_based; //!< use event-based mode (instead of history-based)
extern bool legendre_to_tabular; //!< convert Legendre distributions to tabular?
extern bool material_cell_offsets; //!< create material cells offsets?
extern "C" bool output_summary; //!< write summary.h5?