std::make_unique -> make_unique

This commit is contained in:
Gavin Ridley 2021-05-04 15:55:08 -04:00
parent 898165b720
commit 50d0430496
20 changed files with 87 additions and 99 deletions

View file

@ -370,11 +370,8 @@ public:
vector<int>& bins,
vector<double>& lengths) const override;
void
surface_bins_crossed(Position r0,
Position r1,
const Direction& u,
std::vector<int>& bins) const override;
void surface_bins_crossed(Position r0, Position r1, const Direction& u,
vector<int>& bins) const override;
int get_bin(Position r) const;
@ -522,11 +519,8 @@ public:
vector<int>& bins,
vector<double>& lengths) const override;
void
surface_bins_crossed(Position r0,
Position r1,
const Direction& u,
std::vector<int>& bins) const override;
void surface_bins_crossed(Position r0, Position r1, const Direction& u,
vector<int>& bins) const override;
int get_bin(Position r) const override;

View file

@ -999,7 +999,7 @@ void read_cells(pugi::xml_node node)
// Loop over XML cell elements and populate the array.
model::cells.reserve(n_cells);
for (pugi::xml_node cell_node : node.children("cell")) {
model::cells.push_back(std::make_unique<CSGCell>(cell_node));
model::cells.push_back(make_unique<CSGCell>(cell_node));
}
// Fill the cell map.
@ -1018,7 +1018,7 @@ void read_cells(pugi::xml_node node)
int32_t uid = model::cells[i]->universe_;
auto it = model::universe_map.find(uid);
if (it == model::universe_map.end()) {
model::universes.push_back(std::make_unique<Universe>());
model::universes.push_back(make_unique<Universe>());
model::universes.back()->id_ = uid;
model::universes.back()->cells_.push_back(i);
model::universe_map[uid] = model::universes.size() - 1;
@ -1285,7 +1285,7 @@ openmc_extend_cells(int32_t n, int32_t* index_start, int32_t* index_end)
if (index_start) *index_start = model::cells.size();
if (index_end) *index_end = model::cells.size() + n - 1;
for (int32_t i = 0; i < n; i++) {
model::cells.push_back(std::make_unique<CSGCell>());
model::cells.push_back(make_unique<CSGCell>());
}
return 0;
}

View file

@ -236,8 +236,8 @@ void read_ce_cross_sections(const vector<vector<double>>& nuc_temps,
// Read thermal scattering data from HDF5
hid_t group = open_group(file_id, name.c_str());
data::thermal_scatt.push_back(std::make_unique<ThermalScattering>(
group, thermal_temps[i_table]));
data::thermal_scatt.push_back(
make_unique<ThermalScattering>(group, thermal_temps[i_table]));
close_group(group);
file_close(file_id);

View file

@ -211,7 +211,7 @@ void load_dagmc_geometry()
// Populate the Universe vector and dict
auto it = model::universe_map.find(dagmc_univ_id);
if (it == model::universe_map.end()) {
model::universes.push_back(std::make_unique<Universe>());
model::universes.push_back(make_unique<Universe>());
model::universes.back()->id_ = dagmc_univ_id;
model::universes.back()->cells_.push_back(i);
model::universe_map[dagmc_univ_id] = model::universes.size() - 1;

View file

@ -65,7 +65,7 @@ CylindricalIndependent::CylindricalIndependent(pugi::xml_node node)
// If no distribution was specified, default to a single point at r=0
double x[] {0.0};
double p[] {1.0};
r_ = std::make_unique<Discrete>(x, p, 1);
r_ = make_unique<Discrete>(x, p, 1);
}
// Read distribution for phi-coordinate
@ -76,7 +76,7 @@ CylindricalIndependent::CylindricalIndependent(pugi::xml_node node)
// If no distribution was specified, default to a single point at phi=0
double x[] {0.0};
double p[] {1.0};
phi_ = std::make_unique<Discrete>(x, p, 1);
phi_ = make_unique<Discrete>(x, p, 1);
}
// Read distribution for z-coordinate
@ -87,7 +87,7 @@ CylindricalIndependent::CylindricalIndependent(pugi::xml_node node)
// If no distribution was specified, default to a single point at z=0
double x[] {0.0};
double p[] {1.0};
z_ = std::make_unique<Discrete>(x, p, 1);
z_ = make_unique<Discrete>(x, p, 1);
}
// Read cylinder center coordinates
@ -129,7 +129,7 @@ SphericalIndependent::SphericalIndependent(pugi::xml_node node)
// If no distribution was specified, default to a single point at r=0
double x[] {0.0};
double p[] {1.0};
r_ = std::make_unique<Discrete>(x, p, 1);
r_ = make_unique<Discrete>(x, p, 1);
}
// Read distribution for theta-coordinate
@ -140,7 +140,7 @@ SphericalIndependent::SphericalIndependent(pugi::xml_node node)
// If no distribution was specified, default to a single point at theta=0
double x[] {0.0};
double p[] {1.0};
theta_ = std::make_unique<Discrete>(x, p, 1);
theta_ = make_unique<Discrete>(x, p, 1);
}
// Read distribution for phi-coordinate
@ -151,7 +151,7 @@ SphericalIndependent::SphericalIndependent(pugi::xml_node node)
// If no distribution was specified, default to a single point at phi=0
double x[] {0.0};
double p[] {1.0};
phi_ = std::make_unique<Discrete>(x, p, 1);
phi_ = make_unique<Discrete>(x, p, 1);
}
// Read sphere center coordinates

View file

@ -84,13 +84,13 @@ unique_ptr<Function1D> read_function(hid_t group, const char* name)
read_attribute(dset, "type", func_type);
unique_ptr<Function1D> func;
if (func_type == "Tabulated1D") {
func = std::make_unique<Tabulated1D>(dset);
func = make_unique<Tabulated1D>(dset);
} else if (func_type == "Polynomial") {
func = std::make_unique<Polynomial>(dset);
func = make_unique<Polynomial>(dset);
} else if (func_type == "CoherentElastic") {
func = std::make_unique<CoherentElasticXS>(dset);
func = make_unique<CoherentElasticXS>(dset);
} else if (func_type == "IncoherentElastic") {
func = std::make_unique<IncoherentElasticXS>(dset);
func = make_unique<IncoherentElasticXS>(dset);
} else {
throw std::runtime_error{"Unknown function type " + func_type +
" for dataset " + object_name(dset)};

View file

@ -157,7 +157,7 @@ partition_universes()
if (dynamic_cast<const SurfaceZPlane*>(model::surfaces[i_surf].get())) {
++n_zplanes;
if (n_zplanes > 5) {
univ->partitioner_ = std::make_unique<UniversePartitioner>(*univ);
univ->partitioner_ = make_unique<UniversePartitioner>(*univ);
break;
}
}

View file

@ -74,10 +74,12 @@ if (!settings::libmesh_init && !libMesh::initialized()) {
// pass command line args, empty MPI communicator, and number of threads.
// Because libMesh was not initialized, we assume that OpenMC is the primary
// application and that its main MPI comm should be used.
settings::libmesh_init = std::make_unique<libMesh::LibMeshInit>(argc, argv, comm, n_threads);
settings::libmesh_init =
make_unique<libMesh::LibMeshInit>(argc, argv, comm, n_threads);
#else
// pass command line args, empty MPI communicator, and number of threads
settings::libmesh_init = std::make_unique<libMesh::LibMeshInit>(argc, argv, 0, n_threads);
settings::libmesh_init =
make_unique<libMesh::LibMeshInit>(argc, argv, 0, n_threads);
#endif
settings::libmesh_comm = &(settings::libmesh_init->comm());

View file

@ -1055,10 +1055,10 @@ HexLattice::to_hdf5_inner(hid_t lat_group) const
void read_lattices(pugi::xml_node node)
{
for (pugi::xml_node lat_node : node.children("lattice")) {
model::lattices.push_back(std::make_unique<RectLattice>(lat_node));
model::lattices.push_back(make_unique<RectLattice>(lat_node));
}
for (pugi::xml_node lat_node : node.children("hex_lattice")) {
model::lattices.push_back(std::make_unique<HexLattice>(lat_node));
model::lattices.push_back(make_unique<HexLattice>(lat_node));
}
// Fill the lattice map.

View file

@ -565,7 +565,7 @@ void Material::collision_stopping_power(double* s_col, bool positron)
void Material::init_bremsstrahlung()
{
// Create new object
ttb_ = std::make_unique<Bremsstrahlung>();
ttb_ = make_unique<Bremsstrahlung>();
// Get the size of the energy grids
auto n_k = data::ttb_k_grid.size();
@ -1245,7 +1245,7 @@ void read_materials_xml()
// Loop over XML material elements and populate the array.
pugi::xml_node root = doc.document_element();
for (pugi::xml_node material_node : root.children("material")) {
model::materials.push_back(std::make_unique<Material>(material_node));
model::materials.push_back(make_unique<Material>(material_node));
}
model::materials.shrink_to_fit();
}
@ -1475,7 +1475,7 @@ openmc_extend_materials(int32_t n, int32_t* index_start, int32_t* index_end)
if (index_start) *index_start = model::materials.size();
if (index_end) *index_end = model::materials.size() + n - 1;
for (int32_t i = 0; i < n; i++) {
model::materials.push_back(std::make_unique<Material>());
model::materials.push_back(make_unique<Material>());
}
return 0;
}

View file

@ -1366,9 +1366,9 @@ openmc_extend_meshes(int32_t n, const char* type, int32_t* index_start,
for (int i = 0; i < n; ++i) {
if (std::strcmp(type, "regular") == 0) {
model::meshes.push_back(std::make_unique<RegularMesh>());
model::meshes.push_back(make_unique<RegularMesh>());
} else if (std::strcmp(type, "rectilinear") == 0) {
model::meshes.push_back(std::make_unique<RectilinearMesh>());
model::meshes.push_back(make_unique<RectilinearMesh>());
} else {
throw std::runtime_error{"Unknown mesh type: " + std::string(type)};
}
@ -1389,14 +1389,14 @@ extern "C" int openmc_add_unstructured_mesh(const char filename[],
#ifdef DAGMC
if (lib_name == "moab") {
model::meshes.push_back(std::move(std::make_unique<MOABMesh>(mesh_file)));
model::meshes.push_back(std::move(make_unique<MOABMesh>(mesh_file)));
valid_lib = true;
}
#endif
#ifdef LIBMESH
if (lib_name == "libmesh") {
model::meshes.push_back(std::move(std::make_unique<LibMesh>(mesh_file)));
model::meshes.push_back(std::move(make_unique<LibMesh>(mesh_file)));
valid_lib = true;
}
#endif
@ -1583,7 +1583,7 @@ MOABMesh::MOABMesh(const std::string& filename) {
void MOABMesh::initialize() {
// create MOAB instance
mbi_ = std::make_unique<moab::Core>();
mbi_ = make_unique<moab::Core>();
// load unstructured mesh file
moab::ErrorCode rval = mbi_->load_file(filename_.c_str());
if (rval != moab::MB_SUCCESS) {
@ -1643,7 +1643,7 @@ MOABMesh::build_kdtree(const moab::Range& all_tets)
all_tets_and_tris.merge(all_tris);
// create a kd-tree instance
kdtree_ = std::make_unique<moab::AdaptiveKDTree>(mbi_.get());
kdtree_ = make_unique<moab::AdaptiveKDTree>(mbi_.get());
// build the tree
rval = kdtree_->build_tree(all_tets_and_tris, &kdtree_root_);
@ -1813,10 +1813,8 @@ double MOABMesh::tet_volume(moab::EntityHandle tet) const
return 1.0 / 6.0 * (((p[1] - p[0]) * (p[2] - p[0])) % (p[3] - p[0]));
}
void MOABMesh::surface_bins_crossed(Position r0,
Position r1,
const Direction& u,
std::vector<int>& bins) const
void MOABMesh::surface_bins_crossed(
Position r0, Position r1, const Direction& u, vector<int>& bins) const
{
// TODO: Implement triangle crossings here
@ -2148,7 +2146,7 @@ void LibMesh::initialize()
// assuming that unstructured meshes used in OpenMC are 3D
n_dimension_ = 3;
m_ = std::make_unique<libMesh::Mesh>(*settings::libmesh_comm, n_dimension_);
m_ = make_unique<libMesh::Mesh>(*settings::libmesh_comm, n_dimension_);
m_->read(filename_);
m_->prepare_for_use();
@ -2160,7 +2158,7 @@ void LibMesh::initialize()
// create an equation system for storing values
eq_system_name_ = fmt::format("mesh_{}_system", id_);
equation_systems_ = std::make_unique<libMesh::EquationSystems>(*m_);
equation_systems_ = make_unique<libMesh::EquationSystems>(*m_);
libMesh::ExplicitSystem& eq_sys =
equation_systems_->add_system<libMesh::ExplicitSystem>(eq_system_name_);
@ -2200,11 +2198,8 @@ int LibMesh::n_bins() const
return m_->n_elem();
}
void
LibMesh::surface_bins_crossed(Position r0,
Position r1,
const Direction& u,
std::vector<int>& bins) const
void LibMesh::surface_bins_crossed(
Position r0, Position r1, const Direction& u, vector<int>& bins) const
{
// TODO: Implement triangle crossings here
throw std::runtime_error{"Unstructured mesh surface tallies are not implemented."};
@ -2378,16 +2373,16 @@ void read_meshes(pugi::xml_node root)
// Read mesh and add to vector
if (mesh_type == "regular") {
model::meshes.push_back(std::make_unique<RegularMesh>(node));
model::meshes.push_back(make_unique<RegularMesh>(node));
} else if (mesh_type == "rectilinear") {
model::meshes.push_back(std::make_unique<RectilinearMesh>(node));
model::meshes.push_back(make_unique<RectilinearMesh>(node));
#ifdef DAGMC
} else if (mesh_type == "unstructured" && mesh_lib == "moab") {
model::meshes.push_back(std::make_unique<MOABMesh>(node));
model::meshes.push_back(make_unique<MOABMesh>(node));
#endif
#ifdef LIBMESH
} else if (mesh_type == "unstructured" && mesh_lib == "libmesh") {
model::meshes.push_back(std::make_unique<LibMesh>(node));
model::meshes.push_back(make_unique<LibMesh>(node));
#endif
} else if (mesh_type == "unstructured") {
fatal_error("Unstructured mesh support is not enabled or the mesh library is invalid.");

View file

@ -200,7 +200,7 @@ Nuclide::Nuclide(hid_t group, const vector<double>& temperature)
for (auto name : group_names(rxs_group)) {
if (starts_with(name, "reaction_")) {
hid_t rx_group = open_group(rxs_group, name.c_str());
reactions_.push_back(std::make_unique<Reaction>(rx_group, temps_to_read));
reactions_.push_back(make_unique<Reaction>(rx_group, temps_to_read));
// Check for 0K elastic scattering
const auto& rx = reactions_.back();
@ -1047,7 +1047,7 @@ extern "C" int openmc_load_nuclide(const char* name, const double* temps, int n)
// Read nuclide data from HDF5
hid_t group = open_group(file_id, name);
vector<double> temperature {temps, temps + n};
data::nuclides.push_back(std::make_unique<Nuclide>(group, temperature));
data::nuclides.push_back(make_unique<Nuclide>(group, temperature));
close_group(group);
file_close(file_id);
@ -1079,7 +1079,7 @@ extern "C" int openmc_load_nuclide(const char* name, const double* temps, int n)
// Read element data from HDF5
hid_t group = open_group(file_id, element.c_str());
data::elements.push_back(std::make_unique<PhotonInteraction>(group));
data::elements.push_back(make_unique<PhotonInteraction>(group));
close_group(group);
file_close(file_id);

View file

@ -69,13 +69,13 @@ ReactionProduct::ReactionProduct(hid_t group)
// Determine distribution type and read data
read_attribute(dgroup, "type", temp);
if (temp == "uncorrelated") {
distribution_.push_back(std::make_unique<UncorrelatedAngleEnergy>(dgroup));
distribution_.push_back(make_unique<UncorrelatedAngleEnergy>(dgroup));
} else if (temp == "correlated") {
distribution_.push_back(std::make_unique<CorrelatedAngleEnergy>(dgroup));
distribution_.push_back(make_unique<CorrelatedAngleEnergy>(dgroup));
} else if (temp == "nbody") {
distribution_.push_back(std::make_unique<NBodyPhaseSpace>(dgroup));
distribution_.push_back(make_unique<NBodyPhaseSpace>(dgroup));
} else if (temp == "kalbach-mann") {
distribution_.push_back(std::make_unique<KalbachMann>(dgroup));
distribution_.push_back(make_unique<KalbachMann>(dgroup));
}
close_group(dgroup);

View file

@ -425,7 +425,7 @@ void read_settings_xml()
for (pugi::xml_node node : root.children("source")) {
if (check_for_node(node, "file")) {
auto path = get_node_value(node, "file", false, true);
model::external_sources.push_back(std::make_unique<FileSource>(path));
model::external_sources.push_back(make_unique<FileSource>(path));
} else if (check_for_node(node, "library")) {
// Get shared library path and parameters
auto path = get_node_value(node, "library", false, true);
@ -435,9 +435,10 @@ void read_settings_xml()
}
// Create custom source
model::external_sources.push_back(std::make_unique<CustomSourceWrapper>(path, parameters));
model::external_sources.push_back(
make_unique<CustomSourceWrapper>(path, parameters));
} else {
model::external_sources.push_back(std::make_unique<IndependentSource>(node));
model::external_sources.push_back(make_unique<IndependentSource>(node));
}
}
@ -452,16 +453,14 @@ void read_settings_xml()
if (check_for_node(node_ssr, "path")) {
path = get_node_value(node_ssr, "path", false, true);
}
model::external_sources.push_back(std::make_unique<FileSource>(path));
model::external_sources.push_back(make_unique<FileSource>(path));
}
// If no source specified, default to isotropic point source at origin with Watt spectrum
if (model::external_sources.empty()) {
model::external_sources.push_back(std::make_unique<IndependentSource>(
UPtrSpace{new SpatialPoint({0.0, 0.0, 0.0})},
UPtrAngle{new Isotropic()},
UPtrDist{new Watt(0.988e6, 2.249e-6)}
));
model::external_sources.push_back(make_unique<IndependentSource>(
UPtrSpace {new SpatialPoint({0.0, 0.0, 0.0})},
UPtrAngle {new Isotropic()}, UPtrDist {new Watt(0.988e6, 2.249e-6)}));
}
// Check if we want to write out source

View file

@ -1054,40 +1054,40 @@ void read_surfaces(pugi::xml_node node)
// Allocate and initialize the new surface
if (surf_type == "x-plane") {
model::surfaces.push_back(std::make_unique<SurfaceXPlane>(surf_node));
model::surfaces.push_back(make_unique<SurfaceXPlane>(surf_node));
} else if (surf_type == "y-plane") {
model::surfaces.push_back(std::make_unique<SurfaceYPlane>(surf_node));
model::surfaces.push_back(make_unique<SurfaceYPlane>(surf_node));
} else if (surf_type == "z-plane") {
model::surfaces.push_back(std::make_unique<SurfaceZPlane>(surf_node));
model::surfaces.push_back(make_unique<SurfaceZPlane>(surf_node));
} else if (surf_type == "plane") {
model::surfaces.push_back(std::make_unique<SurfacePlane>(surf_node));
model::surfaces.push_back(make_unique<SurfacePlane>(surf_node));
} else if (surf_type == "x-cylinder") {
model::surfaces.push_back(std::make_unique<SurfaceXCylinder>(surf_node));
model::surfaces.push_back(make_unique<SurfaceXCylinder>(surf_node));
} else if (surf_type == "y-cylinder") {
model::surfaces.push_back(std::make_unique<SurfaceYCylinder>(surf_node));
model::surfaces.push_back(make_unique<SurfaceYCylinder>(surf_node));
} else if (surf_type == "z-cylinder") {
model::surfaces.push_back(std::make_unique<SurfaceZCylinder>(surf_node));
model::surfaces.push_back(make_unique<SurfaceZCylinder>(surf_node));
} else if (surf_type == "sphere") {
model::surfaces.push_back(std::make_unique<SurfaceSphere>(surf_node));
model::surfaces.push_back(make_unique<SurfaceSphere>(surf_node));
} else if (surf_type == "x-cone") {
model::surfaces.push_back(std::make_unique<SurfaceXCone>(surf_node));
model::surfaces.push_back(make_unique<SurfaceXCone>(surf_node));
} else if (surf_type == "y-cone") {
model::surfaces.push_back(std::make_unique<SurfaceYCone>(surf_node));
model::surfaces.push_back(make_unique<SurfaceYCone>(surf_node));
} else if (surf_type == "z-cone") {
model::surfaces.push_back(std::make_unique<SurfaceZCone>(surf_node));
model::surfaces.push_back(make_unique<SurfaceZCone>(surf_node));
} else if (surf_type == "quadric") {
model::surfaces.push_back(std::make_unique<SurfaceQuadric>(surf_node));
model::surfaces.push_back(make_unique<SurfaceQuadric>(surf_node));
} else {
fatal_error(fmt::format("Invalid surface type, \"{}\"", surf_type));

View file

@ -75,7 +75,7 @@ T* Filter::create(int32_t id) {
static_assert(std::is_base_of<Filter, T>::value,
"Type specified is not derived from openmc::Filter");
// Create filter and add to filters vector
auto filter = std::make_unique<T>();
auto filter = make_unique<T>();
auto ptr_out = filter.get();
model::tally_filters.emplace_back(std::move(filter));
// Assign ID

View file

@ -308,7 +308,7 @@ Tally::~Tally()
Tally*
Tally::create(int32_t id)
{
model::tallies.push_back(std::make_unique<Tally>(id));
model::tallies.push_back(make_unique<Tally>(id));
return model::tallies.back().get();
}
@ -737,7 +737,7 @@ void read_tallies_xml()
}
for (auto node_tal : root.children("tally")) {
model::tallies.push_back(std::make_unique<Tally>(node_tal));
model::tallies.push_back(make_unique<Tally>(node_tal));
}
}
@ -916,7 +916,7 @@ openmc_extend_tallies(int32_t n, int32_t* index_start, int32_t* index_end)
if (index_start) *index_start = model::tallies.size();
if (index_end) *index_end = model::tallies.size() + n - 1;
for (int i = 0; i < n; ++i) {
model::tallies.push_back(std::make_unique<Tally>(-1));
model::tallies.push_back(make_unique<Tally>(-1));
}
return 0;
}

View file

@ -204,15 +204,14 @@ ThermalData::ThermalData(hid_t group)
read_attribute(dgroup, "type", temp);
if (temp == "coherent_elastic") {
auto xs = dynamic_cast<CoherentElasticXS*>(elastic_.xs.get());
elastic_.distribution = std::make_unique<CoherentElasticAE>(*xs);
elastic_.distribution = make_unique<CoherentElasticAE>(*xs);
} else {
if (temp == "incoherent_elastic") {
elastic_.distribution = std::make_unique<IncoherentElasticAE>(dgroup);
elastic_.distribution = make_unique<IncoherentElasticAE>(dgroup);
} else if (temp == "incoherent_elastic_discrete") {
auto xs = dynamic_cast<Tabulated1D*>(elastic_.xs.get());
elastic_.distribution = std::make_unique<IncoherentElasticAEDiscrete>(
dgroup, xs->x()
);
elastic_.distribution =
make_unique<IncoherentElasticAEDiscrete>(dgroup, xs->x());
}
}
@ -232,12 +231,11 @@ ThermalData::ThermalData(hid_t group)
std::string temp;
read_attribute(dgroup, "type", temp);
if (temp == "incoherent_inelastic") {
inelastic_.distribution = std::make_unique<IncoherentInelasticAE>(dgroup);
inelastic_.distribution = make_unique<IncoherentInelasticAE>(dgroup);
} else if (temp == "incoherent_inelastic_discrete") {
auto xs = dynamic_cast<Tabulated1D*>(inelastic_.xs.get());
inelastic_.distribution = std::make_unique<IncoherentInelasticAEDiscrete>(
dgroup, xs->x()
);
inelastic_.distribution =
make_unique<IncoherentInelasticAEDiscrete>(dgroup, xs->x());
}
close_group(inelastic_group);

View file

@ -242,7 +242,7 @@ vector<VolumeCalculation::Result> VolumeCalculation::execute() const
for (int j = 1; j < mpi::n_procs; j++) {
int q;
MPI_Recv(&q, 1, MPI_INTEGER, j, 2*j, mpi::intracomm, MPI_STATUS_IGNORE);
std::vector<int> buffer(2*q);
vector<int> buffer(2 * q);
MPI_Recv(buffer.data(), 2*q, MPI_INTEGER, j, 2*j + 1, mpi::intracomm, MPI_STATUS_IGNORE);
for (int k = 0; k < q; ++k) {
bool already_added = false;
@ -261,7 +261,7 @@ vector<VolumeCalculation::Result> VolumeCalculation::execute() const
}
} else {
int q = master_indices[i_domain].size();
std::vector<int> buffer(2*q);
vector<int> buffer(2 * q);
for (int k = 0; k < q; ++k) {
buffer[2*k] = master_indices[i_domain][k];
buffer[2*k + 1] = master_hits[i_domain][k];

View file

@ -252,7 +252,7 @@ void read_multipole_data(int i_nuclide)
// Read nuclide data from HDF5
hid_t group = open_group(file, nuc->name_.c_str());
nuc->multipole_ = std::make_unique<WindowedMultipole>(group);
nuc->multipole_ = make_unique<WindowedMultipole>(group);
close_group(group);
file_close(file);
}