From 3ad2caa0ac0358bb5ae36fef3a464fbe9f0adfa3 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Sat, 2 Mar 2019 14:27:25 -0600 Subject: [PATCH] Fix DAGMC builds --- src/dagmc.cpp | 4 ++-- src/particle.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dagmc.cpp b/src/dagmc.cpp index e87752261..0f1814fc6 100644 --- a/src/dagmc.cpp +++ b/src/dagmc.cpp @@ -143,7 +143,7 @@ void load_dagmc_geometry() c->universe_ = dagmc_univ_id; // set to zero for now c->fill_ = C_NONE; // no fill, single universe - model::cells.push_back(c); + model::cells.emplace_back(c); model::cell_map[c->id_] = i; // Populate the Universe vector and dict @@ -302,7 +302,7 @@ void load_dagmc_geometry() } // add to global array and map - model::surfaces.push_back(s); + model::surfaces.emplace_back(s); model::surface_map[s->id_] = s->id_; } diff --git a/src/particle.cpp b/src/particle.cpp index fbdee2e56..ca7fccfe7 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -533,9 +533,9 @@ Particle::cross_surface() #ifdef DAGMC if (settings::dagmc) { - auto cellp = dynamic_cast(model::cells[cell_last_[0]]); + auto cellp = dynamic_cast(model::cells[cell_last_[0]].get()); // TODO: off-by-one - auto surfp = dynamic_cast(model::surfaces[std::abs(surface_) - 1]); + auto surfp = dynamic_cast(model::surfaces[std::abs(surface_) - 1].get()); int32_t i_cell = next_cell(cellp, surfp) - 1; // save material and temp material_last_ = material_;