mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
fixed broken stuff from prn interface changes
This commit is contained in:
parent
0c1299fbe0
commit
796844fd0b
5 changed files with 27 additions and 13 deletions
|
|
@ -24,17 +24,6 @@ extern std::vector<int64_t> overlap_check_count;
|
|||
|
||||
} // namespace model
|
||||
|
||||
//==============================================================================
|
||||
// Information about nearest boundary crossing
|
||||
//==============================================================================
|
||||
|
||||
struct BoundaryInfo {
|
||||
double distance {INFINITY}; //!< distance to nearest boundary
|
||||
int surface_index {0}; //!< if boundary is surface, index in surfaces vector
|
||||
int coord_level; //!< coordinate level after crossing boundary
|
||||
std::array<int, 3> lattice_translation {}; //!< which way lattice indices will change
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
//! Check two distances by coincidence tolerance
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -131,6 +131,17 @@ struct MacroXS {
|
|||
double pair_production; //!< macroscopic pair production xs
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
// Information about nearest boundary crossing
|
||||
//==============================================================================
|
||||
|
||||
struct BoundaryInfo {
|
||||
double distance {INFINITY}; //!< distance to nearest boundary
|
||||
int surface_index {0}; //!< if boundary is surface, index in surfaces vector
|
||||
int coord_level; //!< coordinate level after crossing boundary
|
||||
std::array<int, 3> lattice_translation {}; //!< which way lattice indices will change
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
//! State of a particle being transported through geometry
|
||||
//============================================================================
|
||||
|
|
@ -279,6 +290,7 @@ public:
|
|||
|
||||
// Indices for various arrays
|
||||
int surface_ {0}; //!< index for surface particle is on
|
||||
BoundaryInfo boundary_;
|
||||
int cell_born_ {-1}; //!< index for cell particle was born in
|
||||
int material_ {-1}; //!< index for current material
|
||||
int material_last_ {-1}; //!< index for last material
|
||||
|
|
|
|||
|
|
@ -16,6 +16,10 @@ constexpr int STATUS_EXIT_NORMAL {0};
|
|||
constexpr int STATUS_EXIT_MAX_BATCH {1};
|
||||
constexpr int STATUS_EXIT_ON_TRIGGER {2};
|
||||
|
||||
extern Particle::Bank * shared_fission_bank;
|
||||
extern int shared_fission_bank_length;
|
||||
extern int shared_fission_bank_max;
|
||||
|
||||
//==============================================================================
|
||||
// Global variable declarations
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ create_fission_sites(Particle* p, int i_nuclide, const Reaction* rx,
|
|||
sample_fission_neutron(i_nuclide, rx, p->E_, &site, p->current_seed());
|
||||
|
||||
// Set the delayed group on the particle as well
|
||||
p->delayed_group_ = site.delayed_group;
|
||||
p->delayed_group_ = site->delayed_group;
|
||||
|
||||
// Increment the number of neutrons born delayed
|
||||
if (p->delayed_group_ > 0) {
|
||||
|
|
|
|||
|
|
@ -2,23 +2,32 @@
|
|||
|
||||
#include "openmc/bank.h"
|
||||
#include "openmc/capi.h"
|
||||
#include "openmc/cell.h"
|
||||
#include "openmc/container_util.h"
|
||||
#include "openmc/eigenvalue.h"
|
||||
#include "openmc/error.h"
|
||||
#include "openmc/geometry.h"
|
||||
#include "openmc/material.h"
|
||||
#include "openmc/message_passing.h"
|
||||
#include "openmc/mgxs_interface.h"
|
||||
#include "openmc/nuclide.h"
|
||||
#include "openmc/output.h"
|
||||
#include "openmc/particle.h"
|
||||
#include "openmc/photon.h"
|
||||
#include "openmc/physics.h"
|
||||
#include "openmc/physics_mg.h"
|
||||
#include "openmc/random_lcg.h"
|
||||
#include "openmc/settings.h"
|
||||
#include "openmc/source.h"
|
||||
#include "openmc/state_point.h"
|
||||
#include "openmc/thermal.h"
|
||||
#include "openmc/timer.h"
|
||||
#include "openmc/tallies/derivative.h"
|
||||
#include "openmc/tallies/filter.h"
|
||||
#include "openmc/tallies/tally.h"
|
||||
#include "openmc/tallies/tally_scoring.h"
|
||||
#include "openmc/tallies/trigger.h"
|
||||
#include "openmc/track_output.h"
|
||||
|
||||
#ifdef _OPENMP
|
||||
#include <omp.h>
|
||||
|
|
@ -348,7 +357,7 @@ void process_advance_particle_events()
|
|||
} else if (p->macro_xs_.total == 0.0) {
|
||||
d_collision = INFINITY;
|
||||
} else {
|
||||
d_collision = -std::log(prn(p->prn_seeds_, p->stream_)) / p->macro_xs_.total;
|
||||
d_collision = -std::log(prn(p->prn_seeds_ + p->stream_)) / p->macro_xs_.total;
|
||||
}
|
||||
|
||||
// -------------- break here? -------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue