diff --git a/src/cell.cpp b/src/cell.cpp index b85e4fd569..c58fb17679 100644 --- a/src/cell.cpp +++ b/src/cell.cpp @@ -223,15 +223,15 @@ Universe::find_cell(Particle& p) const { for (auto it = cells.begin(); it != cells.end(); it++) { int32_t i_cell = *it; - int32_t i_univ = p.coord_[p.n_coord_-1].universe; + int32_t i_univ = p.coord(p.n_coord()-1).universe; if (model::cells[i_cell]->universe_ != i_univ) continue; // Check if this cell contains the particle; Position r {p.r_local()}; Direction u {p.u_local()}; - auto surf = p.surface_; + auto surf = p.surface(); if (model::cells[i_cell]->contains(r, u, surf)) { - p.coord_[p.n_coord_-1].cell = i_cell; + p.coord(p.n_coord()-1).cell = i_cell; return true; } } diff --git a/src/dagmc.cpp b/src/dagmc.cpp index 5254035794..5932e04a12 100644 --- a/src/dagmc.cpp +++ b/src/dagmc.cpp @@ -355,7 +355,7 @@ DAGUniverse::find_cell(Particle &p) const { // cells, place it in the implicit complement bool found = Universe::find_cell(p); if (!found && model::universe_map[this->id_] != model::root_universe) { - p.coord_[p.n_coord_ - 1].cell = implicit_complement_idx(); + p.coord(p.n_coord() - 1).cell = implicit_complement_idx(); found = true; } return found; @@ -504,10 +504,10 @@ DAGCell::distance(Position r, Direction u, int32_t on_surface, Particle* p) cons Expects(p); // if we've changed direction or we're not on a surface, // reset the history and update last direction - if (u != p->last_dir_) { p->last_dir_ = u; p->history_.reset(); } - if (on_surface == 0) { p->history_.reset(); } + if (u != p->last_dir()) { p->last_dir() = u; p->history().reset(); } + if (on_surface == 0) { p->history().reset(); } - const auto& univ = model::universes[p->coord_[p->n_coord_ - 1].universe]; + const auto& univ = model::universes[p->coord(p->n_coord() - 1).universe]; DAGUniverse* dag_univ = static_cast(univ.get()); if (!dag_univ) fatal_error("DAGMC call made for particle in a non-DAGMC universe"); @@ -518,7 +518,7 @@ DAGCell::distance(Position r, Direction u, int32_t on_surface, Particle* p) cons double dist; double pnt[3] = {r.x, r.y, r.z}; double dir[3] = {u.x, u.y, u.z}; - rval = dagmc_ptr_->ray_fire(vol, pnt, dir, hit_surf, dist, &p->history_); + rval = dagmc_ptr_->ray_fire(vol, pnt, dir, hit_surf, dist, &p->history()); MB_CHK_ERR_CONT(rval); int surf_idx; if (hit_surf != 0) { @@ -610,15 +610,15 @@ Direction DAGSurface::reflect(Position r, Direction u, Particle* p) const { Expects(p); - p->history_.reset_to_last_intersection(); + p->history().reset_to_last_intersection(); moab::ErrorCode rval; moab::EntityHandle surf = dagmc_ptr_->entity_by_index(2, dag_index_); double pnt[3] = {r.x, r.y, r.z}; double dir[3]; - rval = dagmc_ptr_->get_angle(surf, pnt, dir, &p->history_); + rval = dagmc_ptr_->get_angle(surf, pnt, dir, &p->history()); MB_CHK_ERR_CONT(rval); - p->last_dir_ = u.reflect(dir); - return p->last_dir_; + p->last_dir() = u.reflect(dir); + return p->last_dir(); } //============================================================================== diff --git a/src/geometry.cpp b/src/geometry.cpp index efa993b061..c93e1940b6 100644 --- a/src/geometry.cpp +++ b/src/geometry.cpp @@ -117,7 +117,7 @@ find_cell_inner(Particle& p, const NeighborList* neighbor_list) } if (!found) { return found; } - i_cell = p.coord_[p.n_coord_ - 1].cell; + i_cell = p.coord(p.n_coord() - 1).cell; // Announce the cell that the particle is entering. if (found && (settings::verbosity >= 10 || p.trace())) { diff --git a/src/particle.cpp b/src/particle.cpp index 2f0f52e63d..de1b2431fe 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -288,7 +288,7 @@ Particle::event_collide() if (!model::active_tallies.empty()) score_collision_derivative(*this); #ifdef DAGMC - history_.reset(); + history().reset(); #endif } @@ -323,7 +323,7 @@ void Particle::event_death() { #ifdef DAGMC - history_.reset(); + history().reset(); #endif // Finish particle track output. @@ -394,18 +394,18 @@ Particle::cross_surface() // in DAGMC, we know what the next cell should be if (surf->geom_type_ == GeometryType::DAG) { auto surfp = dynamic_cast(surf); - auto cellp = dynamic_cast(model::cells[cell_last_[n_coord_ - 1]].get()); - auto univp = static_cast(model::universes[coord_[n_coord_ - 1].universe].get()); + auto cellp = dynamic_cast(model::cells[cell_last(n_coord() - 1)].get()); + auto univp = static_cast(model::universes[coord(n_coord() - 1).universe].get()); // determine the next cell for this crossing int32_t i_cell = next_cell(univp, cellp, surfp) - 1; // save material and temp - material_last_ = material_; - sqrtkT_last_ = sqrtkT_; + material_last() = material(); + sqrtkT_last() = sqrtkT(); // set new cell value - coord_[n_coord_ - 1].cell = i_cell; - cell_instance_ = 0; - material_ = model::cells[i_cell]->material_[0]; - sqrtkT_ = model::cells[i_cell]->sqrtkT_[0]; + coord(n_coord() - 1).cell = i_cell; + cell_instance() = 0; + material() = model::cells[i_cell]->material_[0]; + sqrtkT() = model::cells[i_cell]->sqrtkT_[0]; return; } #endif @@ -506,7 +506,7 @@ Particle::cross_reflective_bc(const Surface& surf, Direction new_u) // if we're crossing a CSG surface, make sure the DAG history is reset #ifdef DAGMC - if (surf.geom_type_ != GeometryType::DAG) history_.reset(); + if (surf.geom_type_ != GeometryType::DAG) history().reset(); #endif // If a reflective surface is coincident with a lattice or universe