Move read_ce_cross_sections to C++

This commit is contained in:
Paul Romano 2019-01-23 10:35:28 -06:00
parent fe9f774d31
commit 9a2298f66d
27 changed files with 454 additions and 497 deletions

View file

@ -57,7 +57,7 @@ extern std::map<LibraryKey, std::size_t> library_map;
//! Read cross sections file (either XML or multigroup H5) and populate data
//! libraries
extern "C" void read_cross_sections_xml();
void read_cross_sections_xml();
//! Read cross_sections.xml and populate data libraries
void read_ce_cross_sections_xml();

View file

@ -6,7 +6,7 @@
#include <cstdint>
#include <string>
#include <vector>
namespace openmc {
@ -14,13 +14,38 @@ namespace openmc {
//! Replace Universe, Lattice, and Material IDs with indices.
//==============================================================================
extern "C" void adjust_indices();
void adjust_indices();
//==============================================================================
//! Assign defaults to cells with undefined temperatures.
//==============================================================================
extern "C" void assign_temperatures();
void assign_temperatures();
//==============================================================================
//! \brief Obtain a list of temperatures that each nuclide/thermal scattering
//! table appears at in the model. Later, this list is used to determine the
//! actual temperatures to read (which may be different if interpolation is
//! used)
//!
//! \param[out] nuc_temps Vector of temperatures for each nuclide
//! \param[out] thermal_temps Vector of tempratures for each thermal scattering
//! table
//==============================================================================
void get_temperatures(std::vector<std::vector<double>>& nuc_temps,
std::vector<std::vector<double>>& thermal_temps);
//==============================================================================
//! \brief Perform final setup for geometry
//!
//! \param[out] nuc_temps Vector of temperatures for each nuclide
//! \param[out] thermal_temps Vector of tempratures for each thermal scattering
//! table
//==============================================================================
void finalize_geometry(std::vector<std::vector<double>>& nuc_temps,
std::vector<std::vector<double>>& thermal_temps);
//==============================================================================
//! Figure out which Universe is the root universe.
@ -36,7 +61,7 @@ extern "C" int32_t find_root_universe();
//! Populate all data structures needed for distribcells.
//==============================================================================
extern "C" void prepare_distribcell();
void prepare_distribcell();
//==============================================================================
//! Recursively search through the geometry and count cell instances.

View file

@ -11,6 +11,7 @@ int parse_command_line(int argc, char* argv[]);
#ifdef OPENMC_MPI
void initialize_mpi(MPI_Comm intracomm);
#endif
void read_input_xml();
}

View file

@ -93,6 +93,9 @@ private:
void calculate_photon_xs(const Particle& p) const;
};
void read_ce_cross_sections(const std::vector<std::vector<double>>& nuc_temps,
const std::vector<std::vector<double>>& thermal_temps);
//==============================================================================
// Fortran compatibility
//==============================================================================

View file

@ -169,6 +169,12 @@ private:
static int XS_PHOTON_PROD;
};
//==============================================================================
// Non-member functions
//==============================================================================
void check_data_version(hid_t file_id);
//==============================================================================
// Global variables
//==============================================================================

View file

@ -37,7 +37,7 @@ extern "C" void print_particle(Particle* p);
//! Display plot information.
//==============================================================================
extern "C" void print_plot();
void print_plot();
//==============================================================================
//! Display information regarding cell overlap checking.

View file

@ -97,7 +97,7 @@ extern double weight_survive; //!< Survival weight after Russian roulette
//! Read settings from XML file
//! \param[in] root XML node for <settings>
extern "C" void read_settings_xml();
void read_settings_xml();
extern "C" void read_settings_xml_f(pugi::xml_node_struct* root_ptr);

View file

@ -20,6 +20,7 @@ extern Timer time_bank_sendrecv;
extern Timer time_finalize;
extern Timer time_inactive;
extern Timer time_initialize;
extern Timer time_read_xs;
extern Timer time_tallies;
extern Timer time_total;
extern Timer time_transport;