mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
few more changes to make the develop merge work
This commit is contained in:
parent
40885be7aa
commit
b9bf4fc65b
5 changed files with 17 additions and 16 deletions
|
|
@ -146,7 +146,7 @@ Particle::event_calculate_xs()
|
|||
r_last_ = this->r();
|
||||
|
||||
// Reset event variables
|
||||
event_ = EVENT_KILL;
|
||||
event_ = TallyEvent::KILL;
|
||||
event_nuclide_ = NUCLIDE_NONE;
|
||||
event_mt_ = REACTION_NONE;
|
||||
|
||||
|
|
@ -225,7 +225,7 @@ Particle::event_advance()
|
|||
}
|
||||
|
||||
// Score track-length estimate of k-eff
|
||||
if (settings::run_mode == RUN_MODE_EIGENVALUE &&
|
||||
if (settings::run_mode == RunMode::EIGENVALUE &&
|
||||
type_ == Particle::Type::neutron) {
|
||||
keff_tally_tracklength_ += wgt_ * distance * macro_xs_.nu_fission;
|
||||
}
|
||||
|
|
@ -254,11 +254,11 @@ Particle::event_cross_surface()
|
|||
boundary_.lattice_translation[2] != 0) {
|
||||
// Particle crosses lattice boundary
|
||||
cross_lattice(this, boundary_);
|
||||
event_ = EVENT_LATTICE;
|
||||
event_ = TallyEvent::LATTICE;
|
||||
} else {
|
||||
// Particle crosses surface
|
||||
this->cross_surface();
|
||||
event_ = EVENT_SURFACE;
|
||||
event_ = TallyEvent::SURFACE;
|
||||
}
|
||||
// Score cell to cell partial currents
|
||||
if (!model::active_surface_tallies.empty()) {
|
||||
|
|
@ -270,7 +270,7 @@ void
|
|||
Particle::event_collide()
|
||||
{
|
||||
// Score collision estimate of keff
|
||||
if (settings::run_mode == RUN_MODE_EIGENVALUE &&
|
||||
if (settings::run_mode == RunMode::EIGENVALUE &&
|
||||
type_ == Particle::Type::neutron) {
|
||||
keff_tally_collision_ += wgt_ * macro_xs_.nu_fission
|
||||
/ macro_xs_.total;
|
||||
|
|
@ -394,7 +394,7 @@ Particle::event_death()
|
|||
|
||||
// Record the number of progeny created by this particle.
|
||||
// This data will be used to efficiently sort the fission bank.
|
||||
if (settings::run_mode == RUN_MODE_EIGENVALUE) {
|
||||
if (settings::run_mode == RunMode::EIGENVALUE) {
|
||||
int64_t offset = id_ - 1 - simulation::work_index[mpi::rank];
|
||||
simulation::progeny_per_particle[offset] = n_progeny_;
|
||||
}
|
||||
|
|
@ -439,8 +439,9 @@ Particle::cross_surface()
|
|||
}
|
||||
return;
|
||||
|
||||
} else if ((surf->bc_ == Surface::BoundaryType::REFLECT || surf->bc_ == Surface::Bc::WHITE)
|
||||
&& (settings::run_mode != RunMode::PLOTTING)) {
|
||||
} else if ((surf->bc_ == Surface::BoundaryType::REFLECT ||
|
||||
surf->bc_ == Surface::BoundaryType::WHITE)
|
||||
&& (settings::run_mode != RunMode::PLOTTING)) {
|
||||
// =======================================================================
|
||||
// PARTICLE REFLECTS FROM SURFACE
|
||||
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ create_fission_sites(Particle* p, int i_nuclide, const Reaction* rx)
|
|||
|
||||
// Determine whether to place fission sites into the shared fission bank
|
||||
// or the secondary particle bank.
|
||||
bool use_fission_bank = (settings::run_mode == RUN_MODE_EIGENVALUE);
|
||||
bool use_fission_bank = (settings::run_mode == RunMode::EIGENVALUE);
|
||||
|
||||
for (int i = 0; i < nu; ++i) {
|
||||
Particle::Bank* site;
|
||||
|
|
@ -593,7 +593,7 @@ void absorption(Particle* p, int i_nuclide)
|
|||
|
||||
// Score implicit absorption estimate of keff
|
||||
if (settings::run_mode == RunMode::EIGENVALUE) {
|
||||
p->keff_tally_absorption += p->wgt_absorb_ * p->neutron_xs_[
|
||||
p->keff_tally_absorption_ += p->wgt_absorb_ * p->neutron_xs_[
|
||||
i_nuclide].nu_fission / p->neutron_xs_[i_nuclide].absorption;
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ create_fission_sites(Particle* p)
|
|||
|
||||
// Determine whether to place fission sites into the shared fission bank
|
||||
// or the secondary particle bank.
|
||||
bool use_fission_bank = (settings::run_mode == RUN_MODE_EIGENVALUE);
|
||||
bool use_fission_bank = (settings::run_mode == RunMode::EIGENVALUE);
|
||||
|
||||
for (int i = 0; i < nu; ++i) {
|
||||
Particle::Bank* site;
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ std::vector<std::string> res_scat_nuclides;
|
|||
RunMode run_mode {RunMode::UNSET};
|
||||
std::unordered_set<int> sourcepoint_batch;
|
||||
std::unordered_set<int> statepoint_batch;
|
||||
TemperatureMethod temperature_method {TemperatureInterpolationType::NEAREST};
|
||||
TemperatureMethod temperature_method {TemperatureMethod::NEAREST};
|
||||
double temperature_tolerance {10.0};
|
||||
double temperature_default {293.6};
|
||||
std::array<double, 2> temperature_range {0.0, 0.0};
|
||||
|
|
|
|||
|
|
@ -380,11 +380,11 @@ void finalize_generation()
|
|||
|
||||
// Update global tallies with the accumulation variables
|
||||
if (settings::run_mode == RunMode::EIGENVALUE) {
|
||||
gt(K_COLLISION, RESULT_VALUE) += global_tally_collision;
|
||||
gt(K_ABSORPTION, RESULT_VALUE) += global_tally_absorption;
|
||||
gt(K_TRACKLENGTH, RESULT_VALUE) += global_tally_tracklength;
|
||||
gt(GlobalTally::K_COLLISION, TallyResult::VALUE) += global_tally_collision;
|
||||
gt(GlobalTally::K_ABSORPTION, TallyResult::VALUE) += global_tally_absorption;
|
||||
gt(GlobalTally::K_TRACKLENGTH, TallyResult::VALUE) += global_tally_tracklength;
|
||||
}
|
||||
gt(LEAKAGE, RESULT_VALUE) += global_tally_leakage;
|
||||
gt(GlobalTally::LEAKAGE, TallyResult::VALUE) += global_tally_leakage;
|
||||
|
||||
// reset tallies
|
||||
if (settings::run_mode == RunMode::EIGENVALUE) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue