mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 13:15:39 -04:00
Fix DAGMC builds
This commit is contained in:
parent
cd0ca81914
commit
3ad2caa0ac
2 changed files with 4 additions and 4 deletions
|
|
@ -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_;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue