mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
separate find_cell into two functions
This commit is contained in:
parent
a90a3fbcba
commit
1fa2c0e889
5 changed files with 40 additions and 48 deletions
|
|
@ -43,14 +43,11 @@ bool check_cell_overlap(Particle& p, bool error=true);
|
|||
//!
|
||||
//! \param p A particle to be located. This function will populate the
|
||||
//! geometry-dependent data fields of the particle.
|
||||
//! \param use_neighbor_lists If true, neighbor lists will be used to accelerate
|
||||
//! the geometry search, but this only works if the cell attribute of the
|
||||
//! particle's lowest coordinate level is valid and meaningful.
|
||||
//! \return True if the particle's location could be found and ascribed to a
|
||||
//! valid geometry coordinate stack.
|
||||
//==============================================================================
|
||||
|
||||
bool find_cell(Particle& p, bool use_neighbor_lists);
|
||||
bool brute_force_find_cell(Particle& p);
|
||||
bool neighbor_list_find_cell(Particle& p); // Only usable on surface crossings
|
||||
|
||||
//==============================================================================
|
||||
//! Move a particle into a new lattice tile.
|
||||
|
|
|
|||
|
|
@ -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 = find_cell(p, 0);
|
||||
bool found_cell = brute_force_find_cell(p);
|
||||
j = p.n_coord_ - 1;
|
||||
if (level >= 0) { j = level; }
|
||||
if (found_cell) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue