@@ -182,10 +182,11 @@ void DAGUniverse::init_geometry()
182182 model::cell_map[c->id_ ] = model::cells.size ();
183183 } else {
184184 warning (fmt::format (" DAGMC Cell IDs: {}" , dagmc_ids_for_dim (3 )));
185- fatal_error (fmt::format (" DAGMC Universe {} contains a cell with ID {}, which "
186- " already exists elsewhere in the geometry. Setting auto_geom_ids "
187- " to True when initiating the DAGMC Universe may "
188- " resolve this issue" ,
185+ fatal_error (fmt::format (
186+ " DAGMC Universe {} contains a cell with ID {}, which "
187+ " already exists elsewhere in the geometry. Setting auto_geom_ids "
188+ " to True when initiating the DAGMC Universe may "
189+ " resolve this issue" ,
189190 this ->id_ , c->id_ ));
190191 }
191192
@@ -395,7 +396,7 @@ bool DAGUniverse::find_cell(Particle& p) const
395396 // cells, place it in the implicit complement
396397 bool found = Universe::find_cell (p);
397398 if (!found && model::universe_map[this ->id_ ] != model::root_universe) {
398- p.coord (p. n_coord () - 1 ).cell = implicit_complement_idx ();
399+ p.lowest_coord ( ).cell = implicit_complement_idx ();
399400 found = true ;
400401 }
401402 return found;
@@ -581,7 +582,7 @@ std::pair<double, int32_t> DAGCell::distance(
581582 p->history ().reset ();
582583 }
583584
584- const auto & univ = model::universes[p->coord (p-> n_coord () - 1 ).universe ];
585+ const auto & univ = model::universes[p->lowest_coord ( ).universe ];
585586
586587 DAGUniverse* dag_univ = static_cast <DAGUniverse*>(univ.get ());
587588 if (!dag_univ)
@@ -609,7 +610,8 @@ std::pair<double, int32_t> DAGCell::distance(
609610 // into the implicit complement on the other side where no intersection will
610611 // be found. Treating this as a lost particle is problematic when plotting.
611612 // Instead, the infinite distance and invalid surface index are returned.
612- if (settings::run_mode == RunMode::PLOTTING ) return {INFTY , -1 };
613+ if (settings::run_mode == RunMode::PLOTTING )
614+ return {INFTY , -1 };
613615
614616 // the particle should be marked as lost immediately if an intersection
615617 // isn't found in a volume that is not the implicit complement. In the case
@@ -739,7 +741,8 @@ void check_dagmc_root_univ()
739741 }
740742}
741743
742- int32_t next_cell (int32_t surf, int32_t curr_cell, int32_t univ) {
744+ int32_t next_cell (int32_t surf, int32_t curr_cell, int32_t univ)
745+ {
743746 auto surfp = dynamic_cast <DAGSurface*>(model::surfaces[surf - 1 ].get ());
744747 auto cellp = dynamic_cast <DAGCell*>(model::cells[curr_cell].get ());
745748 auto univp = static_cast <DAGUniverse*>(model::universes[univ].get ());
@@ -750,11 +753,12 @@ int32_t next_cell(int32_t surf, int32_t curr_cell, int32_t univ) {
750753 cellp->dagmc_ptr ()->entity_by_index (3 , cellp->dag_index ());
751754
752755 moab::EntityHandle new_vol;
753- moab::ErrorCode rval = cellp->dagmc_ptr ()->next_vol (surf_handle, curr_vol, new_vol);
754- if (rval != moab::MB_SUCCESS ) return -1 ;
756+ moab::ErrorCode rval =
757+ cellp->dagmc_ptr ()->next_vol (surf_handle, curr_vol, new_vol);
758+ if (rval != moab::MB_SUCCESS )
759+ return -1 ;
755760
756- return cellp->dagmc_ptr ()->index_by_handle (new_vol) +
757- univp->cell_idx_offset_ ;
761+ return cellp->dagmc_ptr ()->index_by_handle (new_vol) + univp->cell_idx_offset_ ;
758762}
759763
760764} // namespace openmc
0 commit comments