Skip to content

Commit 2d01789

Browse files
committed
various fixes
1 parent fff4522 commit 2d01789

11 files changed

Lines changed: 7 additions & 34 deletions

include/openmc/constants.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,10 @@ enum class TallyType {
301301
MESH_SURFACE,
302302
SURFACE,
303303
PULSE_HEIGHT,
304-
NEXT_EVENT
304+
POINT
305305
};
306306

307-
enum class TallyEstimator { ANALOG, TRACKLENGTH, COLLISION, POINT };
307+
enum class TallyEstimator { ANALOG, TRACKLENGTH, COLLISION, NEXT_EVENT };
308308

309309
enum class TallyEvent { SURFACE, LATTICE, KILL, SCATTER, ABSORB };
310310

include/openmc/particle.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,10 @@ class Particle : public ParticleData {
6666
//! \param src Source site data
6767
void from_source(const SourceSite* src);
6868

69-
void initialize_pseudoparticle(Particle& p, Direction u, double E);
70-
7169
// Coarse-grained particle events
72-
void event_calculate_xs(bool is_pseudo = false);
70+
void event_calculate_xs();
7371
void event_advance();
74-
void event_cross_surface(bool is_pseudo = false);
72+
void event_cross_surface();
7573
void event_collide();
7674
void event_revive_from_secondary();
7775
void event_death();

include/openmc/random_lcg.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@ namespace openmc {
99
// Module constants.
1010
//==============================================================================
1111

12-
constexpr int N_STREAMS {5};
12+
constexpr int N_STREAMS {4};
1313
constexpr int STREAM_TRACKING {0};
1414
constexpr int STREAM_SOURCE {1};
1515
constexpr int STREAM_URR_PTABLE {2};
1616
constexpr int STREAM_VOLUME {3};
17-
constexpr int STREAM_NEXT_EVENT {4};
1817
constexpr int64_t DEFAULT_SEED {1};
1918
constexpr uint64_t DEFAULT_STRIDE {152917ULL};
2019

include/openmc/secondary_correlated.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ class CorrelatedAngleEnergy : public AngleEnergy {
4040
//! \param[inout] seed Pseudorandom seed pointer
4141
void sample(
4242
double E_in, double& E_out, double& mu, uint64_t* seed) const override;
43-
Distribution& sample_dist(double E_in, double& E_out, uint64_t* seed) const;
44-
double sample_energy_and_pdf(
45-
double E_in, double mu, double& E_out, uint64_t* seed) const override;
4643

4744
//! Sample the outgoing energy and return the angular distribution
4845
//! \param[in] E_in Incoming energy in [eV]

include/openmc/secondary_kalbach.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ class KalbachMann : public AngleEnergy {
3131
//! \param[inout] seed Pseudorandom seed pointer
3232
void sample(
3333
double E_in, double& E_out, double& mu, uint64_t* seed) const override;
34-
void sample_params(double E_in, double& E_out, double& km_a, double& km_r,
35-
uint64_t* seed) const;
36-
double sample_energy_and_pdf(
37-
double E_in, double mu, double& E_out, uint64_t* seed) const override;
3834

3935
//! Sample outgoing energy and Kalbach-Mann parameters
4036
//! \param[in] E_in Incoming energy in [eV]

include/openmc/secondary_nbody.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ class NBodyPhaseSpace : public AngleEnergy {
2727
//! \param[inout] seed Pseudorandom seed pointer
2828
void sample(
2929
double E_in, double& E_out, double& mu, uint64_t* seed) const override;
30-
double sample_energy(double E_in, uint64_t* seed) const;
31-
double sample_energy_and_pdf(
32-
double E_in, double mu, double& E_out, uint64_t* seed) const override;
3330

3431
//! Sample an outgoing energy from the N-body phase space distribution
3532
//! \param[in] E_in Incoming energy in [eV]

include/openmc/secondary_uncorrelated.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ class UncorrelatedAngleEnergy : public AngleEnergy {
3131
//! \param[inout] seed Pseudorandom seed pointer
3232
void sample(
3333
double E_in, double& E_out, double& mu, uint64_t* seed) const override;
34-
double sample_energy_and_pdf(
35-
double E_in, double mu, double& E_out, uint64_t* seed) const override;
3634

3735
//! Sample an outgoing energy and evaluate the angular PDF
3836
//! \param[in] E_in Incoming energy in [eV]

include/openmc/simulation.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,6 @@ void broadcast_results();
9494

9595
void free_memory_simulation();
9696

97-
//! Simulate a single pseudoparticle history
98-
double transport_pseudoparticle(Particle& p, double total_distance);
99-
10097
//! Simulate a single particle history (and all generated secondary particles,
10198
//! if enabled), from birth to death
10299
void transport_history_based_single_particle(Particle& p);

include/openmc/tallies/tally_scoring.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@
99

1010
namespace openmc {
1111

12-
namespace simulation {
13-
extern thread_local Particle pseudoparticle;
14-
extern thread_local int i_det;
15-
} // namespace simulation
16-
1712
//==============================================================================
1813
//! An iterator over all combinations of a tally's matching filter bins.
1914
//

src/physics.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,12 +838,13 @@ void sab_scatter(int i_nuclide, int i_sab, Particle& p)
838838
// Sample energy and angle
839839
double E_out;
840840
auto& sab = data::thermal_scatt[i_sab]->data_[i_temp];
841-
sab.sample(micro, p.E(), &E_out, &p.mu(), p.current_seed());
842841

843842
if (!model::active_point_tallies.empty()) {
844843
score_point_tally(p, i_nuclide, sab, micro);
845844
}
846845

846+
sab.sample(micro, p.E(), &E_out, &p.mu(), p.current_seed());
847+
847848
// Set energy to outgoing, change direction of particle
848849
p.E() = E_out;
849850
p.u() = rotate_angle(p.u(), p.mu(), nullptr, p.current_seed());

0 commit comments

Comments
 (0)