Fix DAGMC builds

This commit is contained in:
Paul Romano 2019-03-02 14:27:25 -06:00
parent cd0ca81914
commit 3ad2caa0ac
2 changed files with 4 additions and 4 deletions

View file

@ -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_;
}

View file

@ -533,9 +533,9 @@ Particle::cross_surface()
#ifdef DAGMC
if (settings::dagmc) {
auto cellp = dynamic_cast<DAGCell*>(model::cells[cell_last_[0]]);
auto cellp = dynamic_cast<DAGCell*>(model::cells[cell_last_[0]].get());
// TODO: off-by-one
auto surfp = dynamic_cast<DAGSurface*>(model::surfaces[std::abs(surface_) - 1]);
auto surfp = dynamic_cast<DAGSurface*>(model::surfaces[std::abs(surface_) - 1].get());
int32_t i_cell = next_cell(cellp, surfp) - 1;
// save material and temp
material_last_ = material_;