diff --git a/include/openmc/geometry.h b/include/openmc/geometry.h index 258153502e..0681952ad1 100644 --- a/include/openmc/geometry.h +++ b/include/openmc/geometry.h @@ -46,7 +46,7 @@ bool check_cell_overlap(Particle& p, bool error=true); //! \return True if the particle's location could be found and ascribed to a //! valid geometry coordinate stack. //============================================================================== -bool brute_force_find_cell(Particle& p); +bool exhaustive_find_cell(Particle& p); bool neighbor_list_find_cell(Particle& p); // Only usable on surface crossings //============================================================================== diff --git a/include/openmc/plot.h b/include/openmc/plot.h index 295a7b8747..7b66c66965 100644 --- a/include/openmc/plot.h +++ b/include/openmc/plot.h @@ -182,7 +182,7 @@ T PlotBase::get_map() const { p.r()[in_i] = xyz[in_i] + in_pixel * x; p.n_coord_ = 1; // local variables - bool found_cell = brute_force_find_cell(p); + bool found_cell = exhaustive_find_cell(p); j = p.n_coord_ - 1; if (level >= 0) { j = level; } if (found_cell) { diff --git a/src/geometry.cpp b/src/geometry.cpp index 84b37dc1a9..8e6519fa86 100644 --- a/src/geometry.cpp +++ b/src/geometry.cpp @@ -95,7 +95,7 @@ find_cell_inner(Particle& p, const NeighborList* neighbor_list) // Check successively lower coordinate levels until finding material fill for (;;++p.n_coord_) { - // If neighbor lists did not find a cell, must do brute force search + // If neighbor lists did not find a cell, must do exhaustive search if (i_cell == C_NONE) { int i_universe = p.coord_[p.n_coord_-1].universe; const auto& univ {*model::universes[i_universe]}; @@ -267,7 +267,7 @@ bool neighbor_list_find_cell(Particle& p) return found; } -bool brute_force_find_cell(Particle& p) +bool exhaustive_find_cell(Particle& p) { int i_universe = p.coord_[p.n_coord_-1].universe; if (i_universe == C_NONE) { @@ -315,7 +315,7 @@ cross_lattice(Particle& p, const BoundaryInfo& boundary) if (!lat.are_valid_indices(i_xyz)) { // The particle is outside the lattice. Search for it from the base coords. p.n_coord_ = 1; - bool found = brute_force_find_cell(p); + bool found = exhaustive_find_cell(p); if (!found && p.alive_) { p.mark_as_lost(fmt::format("Could not locate particle {} after " "crossing a lattice boundary", p.id_)); @@ -324,13 +324,13 @@ cross_lattice(Particle& p, const BoundaryInfo& boundary) } else { // Find cell in next lattice element. p.coord_[p.n_coord_-1].universe = lat[i_xyz]; - bool found = brute_force_find_cell(p); + bool found = exhaustive_find_cell(p); if (!found) { // A particle crossing the corner of a lattice tile may not be found. In // this case, search for it from the base coords. p.n_coord_ = 1; - bool found = brute_force_find_cell(p); + bool found = exhaustive_find_cell(p); if (!found && p.alive_) { p.mark_as_lost(fmt::format("Could not locate particle {} after " "crossing a lattice boundary", p.id_)); @@ -446,7 +446,7 @@ openmc_find_cell(const double* xyz, int32_t* index, int32_t* instance) p.r() = Position{xyz}; p.u() = {0.0, 0.0, 1.0}; - if (!brute_force_find_cell(p)) { + if (!exhaustive_find_cell(p)) { set_errmsg(fmt::format("Could not find cell at position {}.", p.r())); return OPENMC_E_GEOMETRY; } diff --git a/src/particle.cpp b/src/particle.cpp index 3273ef4ccc..2e24131742 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -156,7 +156,7 @@ Particle::event_calculate_xs() // initiate a search for the current cell. This generally happens at the // beginning of the history and again for any secondary particles if (coord_[n_coord_ - 1].cell == C_NONE) { - if (!brute_force_find_cell(*this)) { + if (!exhaustive_find_cell(*this)) { this->mark_as_lost("Could not find the cell containing particle " + std::to_string(id_)); return; @@ -463,7 +463,7 @@ Particle::cross_surface() // Remove lower coordinate levels and assignment of surface surface_ = 0; n_coord_ = 1; - bool found = brute_force_find_cell(*this); + bool found = exhaustive_find_cell(*this); if (settings::run_mode != RunMode::PLOTTING && (!found)) { // If a cell is still not found, there are two possible causes: 1) there is @@ -477,7 +477,7 @@ Particle::cross_surface() // Couldn't find next cell anywhere! This probably means there is an actual // undefined region in the geometry. - if (!brute_force_find_cell(*this)) { + if (!exhaustive_find_cell(*this)) { this->mark_as_lost("After particle " + std::to_string(id_) + " crossed surface " + std::to_string(surf->id_) + " it could not be located in any cell and it did not leak."); diff --git a/src/volume_calc.cpp b/src/volume_calc.cpp index 46fc8352a2..7d6739bc0b 100644 --- a/src/volume_calc.cpp +++ b/src/volume_calc.cpp @@ -135,7 +135,7 @@ std::vector VolumeCalculation::execute() const p.u() = {0.5, 0.5, 0.5}; // If this location is not in the geometry at all, move on to next block - if (!brute_force_find_cell(p)) + if (!exhaustive_find_cell(p)) continue; if (domain_type_ == TallyDomain::MATERIAL) {