Wrapping more umesh stuff into ifdefs. Moving pointers into vector during initialization.

This commit is contained in:
Patrick Shriwise 2019-05-10 11:29:20 -05:00
parent a10429f7fa
commit b42bcc2760
2 changed files with 3 additions and 2 deletions

View file

@ -79,7 +79,7 @@ public:
virtual xt::xarray<double>
count_sites(const std::vector<Particle::Bank>& bank, bool* outside) const = 0;
virtual double get_volume_frac(int bin = -1) = 0;
virtual double get_volume_frac(int bin = -1) const = 0;
int id_ {-1}; //!< User-specified ID
int n_dimension_; //!< Number of dimensions

View file

@ -1408,7 +1408,7 @@ openmc_extend_meshes(int32_t n, int32_t* index_start, int32_t* index_end)
{
if (index_start) *index_start = model::meshes.size();
for (int i = 0; i < n; ++i) {
model::meshes.push_back(std::make_unique<RegularMesh>());
model::meshes.push_back(std::move(std::make_unique<RegularMesh>()));
}
if (index_end) *index_end = model::meshes.size() - 1;
@ -1780,6 +1780,7 @@ void read_meshes(pugi::xml_node root)
{
for (auto node : root.children("mesh")) {
std::string mesh_type;
if (check_for_node(node, "type")) {
mesh_type = get_node_value(node, "type", true, true);