mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
match openmc style
This commit is contained in:
parent
bdea083a0a
commit
8e1de2a577
4 changed files with 19 additions and 19 deletions
|
|
@ -45,8 +45,8 @@ struct MgxsInterface
|
|||
MgxsInterface(const std::string& path_cross_sections,
|
||||
const std::vector<std::string> xs_to_read,
|
||||
const std::vector<std::vector<double>> xs_temps);
|
||||
void setNuclidesToRead(std::vector<std::string> arg_xs_to_read);
|
||||
void setNuclideTemperaturesToRead(std::vector<std::vector<double>> xs_temps);
|
||||
void set_nuclides_to_read(std::vector<std::string> arg_xs_to_read);
|
||||
void set_nuclide_temperatures_to_read(std::vector<std::vector<double>> xs_temps);
|
||||
|
||||
void init();
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ struct MgxsInterface
|
|||
|
||||
// Reads just the header of the cross sections file, to find
|
||||
// min & max energies as well as the available XS
|
||||
void readHeader(const std::string& path_cross_sections);
|
||||
void read_header(const std::string& path_cross_sections);
|
||||
};
|
||||
|
||||
namespace data {
|
||||
|
|
@ -69,14 +69,14 @@ namespace data {
|
|||
// Puts available XS in MGXS file to globals so that when
|
||||
// materials are read, the MGXS specified in a material can
|
||||
// be ensured to be present in the available data.
|
||||
void putMgxsHeaderDataToGlobals();
|
||||
void put_mgxs_header_data_to_globals();
|
||||
|
||||
// Set which nuclides and temperatures are to be read on
|
||||
// mgInterface through global data
|
||||
void setMgInterfaceNuclidesAndTemps();
|
||||
void set_mg_interface_nuclides_and_temps();
|
||||
|
||||
// After macro XS have been read, materials can be marked as fissionable
|
||||
void markFissionableMgxsMaterials();
|
||||
void mark_fissionable_mgxs_materials();
|
||||
|
||||
//==============================================================================
|
||||
// Mgxs tracking/transport/tallying interface methods
|
||||
|
|
|
|||
|
|
@ -155,8 +155,8 @@ void read_cross_sections_xml()
|
|||
if (settings::run_CE) {
|
||||
read_ce_cross_sections_xml();
|
||||
} else {
|
||||
data::mgInterface.readHeader(settings::path_cross_sections);
|
||||
putMgxsHeaderDataToGlobals();
|
||||
data::mgInterface.read_header(settings::path_cross_sections);
|
||||
put_mgxs_header_data_to_globals();
|
||||
}
|
||||
|
||||
// Establish mapping between (type, material) and index in libraries
|
||||
|
|
|
|||
|
|
@ -260,9 +260,9 @@ void read_input_xml()
|
|||
read_ce_cross_sections(nuc_temps, thermal_temps);
|
||||
} else {
|
||||
// Create material macroscopic data for MGXS
|
||||
setMgInterfaceNuclidesAndTemps();
|
||||
set_mg_interface_nuclides_and_temps();
|
||||
data::mgInterface.init();
|
||||
markFissionableMgxsMaterials();
|
||||
mark_fissionable_mgxs_materials();
|
||||
}
|
||||
simulation::time_read_xs.stop();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,19 +30,19 @@ MgxsInterface::MgxsInterface(const std::string& path_cross_sections,
|
|||
const std::vector<std::string> xs_to_read,
|
||||
const std::vector<std::vector<double>> xs_temps)
|
||||
{
|
||||
readHeader(path_cross_sections);
|
||||
setNuclidesToRead(xs_to_read);
|
||||
setNuclideTemperaturesToRead(xs_temps);
|
||||
read_header(path_cross_sections);
|
||||
set_nuclides_to_read(xs_to_read);
|
||||
set_nuclide_temperatures_to_read(xs_temps);
|
||||
init();
|
||||
}
|
||||
|
||||
// Should these perhaps unnecessary setters be lumped into one?
|
||||
void MgxsInterface::setNuclidesToRead(std::vector<std::string> arg_xs_to_read)
|
||||
void MgxsInterface::set_nuclides_to_read(std::vector<std::string> arg_xs_to_read)
|
||||
{
|
||||
// Check to remove all duplicates
|
||||
xs_to_read = arg_xs_to_read;
|
||||
}
|
||||
void MgxsInterface::setNuclideTemperaturesToRead(std::vector<std::vector<double>> xs_temps)
|
||||
void MgxsInterface::set_nuclide_temperatures_to_read(std::vector<std::vector<double>> xs_temps)
|
||||
{
|
||||
xs_temps_to_read = xs_temps;
|
||||
if (xs_to_read.size() != xs_temps.size())
|
||||
|
|
@ -182,7 +182,7 @@ std::vector<std::vector<double>> MgxsInterface::get_mat_kTs()
|
|||
|
||||
//==============================================================================
|
||||
|
||||
void MgxsInterface::readHeader(const std::string& path_cross_sections)
|
||||
void MgxsInterface::read_header(const std::string& path_cross_sections)
|
||||
{
|
||||
// Save name of HDF5 file to be read to struct data
|
||||
cross_sections_path = path_cross_sections;
|
||||
|
|
@ -231,7 +231,7 @@ void MgxsInterface::readHeader(const std::string& path_cross_sections)
|
|||
file_close(file_id);
|
||||
}
|
||||
|
||||
void putMgxsHeaderDataToGlobals()
|
||||
void put_mgxs_header_data_to_globals()
|
||||
{
|
||||
// Get the minimum and maximum energies
|
||||
int neutron = static_cast<int>(Particle::Type::neutron);
|
||||
|
|
@ -249,7 +249,7 @@ void putMgxsHeaderDataToGlobals()
|
|||
}
|
||||
}
|
||||
|
||||
void setMgInterfaceNuclidesAndTemps()
|
||||
void set_mg_interface_nuclides_and_temps()
|
||||
{
|
||||
// Get temperatures from global data
|
||||
std::vector<std::vector<double>> these_nuc_temps(data::nuclide_map.size());
|
||||
|
|
@ -280,7 +280,7 @@ void setMgInterfaceNuclidesAndTemps()
|
|||
}
|
||||
}
|
||||
|
||||
void markFissionableMgxsMaterials()
|
||||
void mark_fissionable_mgxs_materials()
|
||||
{
|
||||
// Loop over all files
|
||||
for (const auto& mat : model::materials) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue