mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Get rid of ERROR_INT and use 0 for "no surface"
This commit is contained in:
parent
492d984525
commit
0fbe024e11
3 changed files with 4 additions and 6 deletions
|
|
@ -403,8 +403,6 @@ constexpr int LEAKAGE {3};
|
|||
// Miscellaneous
|
||||
constexpr int C_NONE {-1};
|
||||
constexpr int F90_NONE {0}; //TODO: replace usage of this with C_NONE
|
||||
constexpr int ERROR_INT {-2147483647}; // TODO: use <numeric_limits> when F90
|
||||
// interop is gone
|
||||
|
||||
// Interpolation rules
|
||||
enum class Interpolation {
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ extern "C" void print_particle(Particle* p)
|
|||
}
|
||||
|
||||
// Display miscellaneous info.
|
||||
if (p->surface_ != ERROR_INT) {
|
||||
if (p->surface_ != 0) {
|
||||
const Surface& surf {*model::surfaces[std::abs(p->surface_)-1]};
|
||||
std::cout << " Surface = " << std::copysign(surf.id_, p->surface_) << "\n";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ Particle::transport()
|
|||
if (lattice_translation[0] != 0 || lattice_translation[1] != 0 ||
|
||||
lattice_translation[2] != 0) {
|
||||
// Particle crosses lattice boundary
|
||||
surface_ = ERROR_INT;
|
||||
surface_ = 0;
|
||||
cross_lattice(this, lattice_translation);
|
||||
event_ = EVENT_LATTICE;
|
||||
} else {
|
||||
|
|
@ -291,7 +291,7 @@ Particle::transport()
|
|||
score_surface_tally(this, model::active_meshsurf_tallies);
|
||||
|
||||
// Clear surface component
|
||||
surface_ = ERROR_INT;
|
||||
surface_ = 0;
|
||||
|
||||
if (settings::run_CE) {
|
||||
collision(this);
|
||||
|
|
@ -556,7 +556,7 @@ Particle::cross_surface()
|
|||
// COULDN'T FIND PARTICLE IN NEIGHBORING CELLS, SEARCH ALL CELLS
|
||||
|
||||
// Remove lower coordinate levels and assignment of surface
|
||||
surface_ = ERROR_INT;
|
||||
surface_ = 0;
|
||||
n_coord_ = 1;
|
||||
bool found = find_cell(this, false);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue