mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Using a Boolean type instead of the object pointer to dectect the surface type.
This commit is contained in:
parent
49e22c9091
commit
41c462a0b1
1 changed files with 6 additions and 8 deletions
|
|
@ -389,8 +389,8 @@ Particle::cross_surface()
|
|||
// ==========================================================================
|
||||
// SEARCH NEIGHBOR LISTS FOR NEXT CELL
|
||||
|
||||
|
||||
#ifdef DAGMC
|
||||
// in DAGMC, we know what the next cell should be
|
||||
auto surfp = dynamic_cast<DAGSurface*>(model::surfaces[std::abs(surface_) - 1].get());
|
||||
if (surfp) {
|
||||
auto cellp = dynamic_cast<DAGCell*>(model::cells[cell_last_[n_coord_ - 1]].get());
|
||||
|
|
@ -512,13 +512,11 @@ Particle::cross_reflective_bc(const Surface& surf, Direction new_u)
|
|||
// boundary, it is necessary to redetermine the particle's coordinates in
|
||||
// the lower universes.
|
||||
// (unless we're using a dagmc model, which has exactly one universe)
|
||||
if (!settings::dagmc) {
|
||||
n_coord() = 1;
|
||||
if (!neighbor_list_find_cell(*this)) {
|
||||
mark_as_lost("Couldn't find particle after reflecting from surface " +
|
||||
std::to_string(surf.id_) + ".");
|
||||
return;
|
||||
}
|
||||
n_coord() = 1;
|
||||
if (surf->geom_type_ != GeometryType::DAGMC && !neighbor_list_find_cell(*this, true)) {
|
||||
this->mark_as_lost("Couldn't find particle after reflecting from surface "
|
||||
+ std::to_string(surf.id_) + ".");
|
||||
return;
|
||||
}
|
||||
|
||||
// Set previous coordinate going slightly past surface crossing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue