Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
06ae298
Implement get_pdf functionality
Aug 27, 2025
78d841e
Update include/openmc/distribution.h
itay-space Aug 28, 2025
33a27a9
Update include/openmc/particle_data.h
itay-space Aug 28, 2025
d968875
Update include/openmc/particle_data.h
itay-space Aug 28, 2025
3b896c0
Update src/physics.cpp
itay-space Aug 28, 2025
c034bff
Update src/physics.cpp
itay-space Aug 28, 2025
a5d2f4c
Update src/physics.cpp
itay-space Aug 28, 2025
ca5b44e
Cleaning some code
Aug 31, 2025
eed8b1c
Resolving conversations
Aug 31, 2025
f2ecdd4
cosmetic fixes
GuySten Aug 31, 2025
71d5fa2
Merge branch 'develop' into get_pdf
GuySten Aug 31, 2025
c3b4d82
simplified code significantly
GuySten Aug 31, 2025
78a33cc
Update src/distribution_angle.cpp
itay-space Aug 31, 2025
6d70d39
ran clang format
GuySten Aug 31, 2025
acfd402
fixes
GuySten Aug 31, 2025
98ca32e
cosmetics
GuySten Aug 31, 2025
26d2a56
using openmc's fatal_error
Sep 1, 2025
7abe69c
Use accessors in powerlaw
Sep 1, 2025
d183cce
clausing error for different distributions
Sep 1, 2025
37b41c4
fixing function signature
Sep 1, 2025
007dcf5
Update include/openmc/angle_energy.h
Eliezer214 Sep 2, 2025
ebebb7a
Update include/openmc/distribution_angle.h
Eliezer214 Sep 2, 2025
0239c1f
Update include/openmc/secondary_thermal.h
Eliezer214 Sep 2, 2025
225f837
Update include/openmc/angle_energy.h
Eliezer214 Sep 2, 2025
fa22e14
Update include/openmc/reaction_product.h
Eliezer214 Sep 2, 2025
a0678c9
Update src/reaction_product.cpp
itay-space Sep 2, 2025
e590d82
Update src/thermal.cpp
itay-space Sep 2, 2025
1b1134e
Update include/openmc/secondary_thermal.h
itay-space Sep 2, 2025
5c348f1
Update src/secondary_uncorrelated.cpp
itay-space Sep 2, 2025
203a191
Update src/secondary_thermal.cpp
itay-space Sep 2, 2025
c4d8aa6
Update include/openmc/secondary_thermal.h
itay-space Sep 2, 2025
e9b6860
Update src/reaction_product.cpp
itay-space Sep 2, 2025
ee1f2c5
Apply suggestion from @GuySten
itay-space Sep 2, 2025
e07e312
Apply suggestion from @GuySten
itay-space Sep 2, 2025
1ab0da1
Update src/thermal.cpp
itay-space Sep 2, 2025
c98566a
Update src/thermal.cpp
itay-space Sep 2, 2025
de3fc79
Update include/openmc/reaction_product.h
itay-space Sep 2, 2025
978bf74
remove gsl-lite
GuySten Sep 2, 2025
eb8389d
few fixes to signature
Sep 2, 2025
220f099
more signature fixes
Sep 2, 2025
d9a2b53
more signature fixes
Sep 2, 2025
8271e15
ran clang format
GuySten Sep 2, 2025
d0d8494
Restore PDF calculation block in secondary_kalbach.cpp after accident…
Sep 2, 2025
f2418d2
cleaning
Sep 2, 2025
9a5d701
remove gsl-lite
GuySten Sep 2, 2025
3f91b0d
clean
Sep 2, 2025
e1d069c
Update src/secondary_correlated.cpp
itay-space Sep 2, 2025
f9e4693
Update include/openmc/secondary_thermal.h
GuySten Sep 2, 2025
b45dcfd
ran clang format
GuySten Sep 2, 2025
a85365c
Update src/secondary_kalbach.cpp
GuySten Sep 2, 2025
d782013
returning pdf assuming data in lab
Sep 2, 2025
c72bb02
cleaning
Sep 2, 2025
3cb6821
remove gsl-lite
GuySten Sep 2, 2025
47e96a6
Apply suggestions from code review
GuySten Sep 2, 2025
f97f4ad
Update secondary_nbody.cpp
GuySten Sep 2, 2025
1e4b763
ran clang format
GuySten Sep 2, 2025
3bc4698
Update src/secondary_kalbach.cpp
itay-space Sep 3, 2025
4e85033
returning pdf
Sep 3, 2025
6727a03
Update src/secondary_nbody.cpp
itay-space Sep 3, 2025
c5a737b
isotropic and no lab yet
Sep 3, 2025
186ad34
Update src/distribution_angle.cpp
itay-space Sep 3, 2025
108fa52
remove gsl-lite
GuySten Sep 2, 2025
0f40022
ran clang format
GuySten Sep 3, 2025
4bf8f23
Update include/openmc/distribution_angle.h
GuySten Sep 3, 2025
ca7cd85
returning pdf in uncorrelated
Sep 3, 2025
d7b1621
fix access to get_pdf
GuySten Sep 3, 2025
7cb99e8
ran clang format
GuySten Sep 3, 2025
e2de1c4
cosmetics
GuySten Sep 3, 2025
d5ea1c0
WIP: trying new approach until reaction_product.cpp
GuySten Sep 4, 2025
dc87a7f
fix additional signatures
GuySten Sep 4, 2025
ad86823
wip
GuySten Sep 4, 2025
4500491
reverted most of the changes in the new approach
GuySten Sep 4, 2025
7a1b5cc
bugfix
GuySten Sep 4, 2025
ae2a0fb
bugfix
GuySten Sep 4, 2025
f3aa6dc
bugfix
GuySten Sep 4, 2025
52feef7
another fix for mixed elastic
GuySten Sep 4, 2025
12d5372
guarantee every AngleEnergy has sample_energy_and_pdf
GuySten Sep 4, 2025
ff83fc4
fix for decay photons
GuySten Sep 4, 2025
f859882
replace pdf->evaluate
GuySten Sep 6, 2025
df0ec91
wip
GuySten Sep 22, 2025
babeed5
Merge branch 'openmc-dev:develop' into point-detector
GuySten Oct 16, 2025
b0613dc
Merge branch 'develop' into get_pdf
GuySten Nov 3, 2025
8bb4356
Merge branch 'develop' into get_pdf
GuySten Nov 3, 2025
cc7c3a5
added evaluate for SphericalUnitDistribution
GuySten Nov 3, 2025
758a01f
Merge branch 'develop' into get_pdf
GuySten Dec 3, 2025
481901e
simplify PR significantly
GuySten Dec 3, 2025
82fe36f
Merge branch 'openmc-dev:develop' into point-detector
GuySten Dec 3, 2025
b067e7f
Merge branch 'develop' into get_pdf
GuySten Dec 23, 2025
43a6fbb
some fixes
GuySten Jan 12, 2026
c52ad4f
further simplification
GuySten Jan 16, 2026
f9d6d0f
further simplification
GuySten Jan 16, 2026
dc38dc5
further simplification
GuySten Jan 16, 2026
02aea31
reserve vector sizes
GuySten Jan 16, 2026
f14005a
Fix mu_vector reservation size in secondary_thermal.cpp
GuySten Jan 17, 2026
903af78
clang format
GuySten Jan 17, 2026
2037cba
Merge branch 'develop' into point-detector
GuySten Jan 29, 2026
20ec56b
Merge branch 'develop' into get_pdf
GuySten Jan 29, 2026
312f327
merge get_pdf updates
GuySten Jan 29, 2026
93d905c
wip
GuySten Jan 29, 2026
04c9797
wip
GuySten Jan 29, 2026
8afed32
wip
GuySten Jan 29, 2026
a277387
wip
GuySten Jan 29, 2026
dd49099
wip
GuySten Jan 29, 2026
9710d59
wip
GuySten Jan 29, 2026
e800c47
wip
GuySten Jan 29, 2026
a5f4809
wip
GuySten Jan 29, 2026
753b849
wip
GuySten Jan 29, 2026
9d16542
wip
GuySten Jan 29, 2026
64e23e3
fix for invalid energy distribution in elastic scattering case
GuySten Jan 29, 2026
1982782
try to use another stream for next event tracking
GuySten Jan 29, 2026
d086260
try to use another stream for next event tracking
GuySten Jan 29, 2026
1524e64
wip edit
GuySten Jan 29, 2026
1f36c89
Refactor probability sampling logic in reaction_product
GuySten Jan 29, 2026
84ebc85
still works
GuySten Jan 29, 2026
3e2a26b
still works
GuySten Jan 29, 2026
0099550
fix typo
GuySten Jan 29, 2026
8ee06a6
Merge branch 'develop' into get_pdf
GuySten Mar 2, 2026
d11f2e5
decrease dynamic allocations
GuySten Mar 2, 2026
321d188
decrease dynamic allocations further
GuySten Mar 2, 2026
7b9777e
decrease dynamic allocations further
GuySten Mar 2, 2026
1f5e24e
decrease
GuySten Mar 2, 2026
4209573
Merge branch 'develop' into point-detector
GuySten Mar 2, 2026
b60cd20
Merge branch 'get_pdf' into point-detector
GuySten Mar 2, 2026
7a89ea0
ran clang format
GuySten Mar 2, 2026
85654ef
fixed leftover merge conflict
GuySten Mar 2, 2026
d60b97b
fixed a bug
GuySten Mar 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ list(APPEND libopenmc_SOURCES
src/tallies/filter_musurface.cpp
src/tallies/filter_parent_nuclide.cpp
src/tallies/filter_particle.cpp
src/tallies/filter_point.cpp
src/tallies/filter_particle_production.cpp
src/tallies/filter_polar.cpp
src/tallies/filter_reaction.cpp
Expand Down
2 changes: 2 additions & 0 deletions include/openmc/angle_energy.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class AngleEnergy {
public:
virtual void sample(
double E_in, double& E_out, double& mu, uint64_t* seed) const = 0;
virtual double sample_energy_and_pdf(
double E_in, double mu, double& E_out, uint64_t* seed) const = 0;
virtual ~AngleEnergy() = default;
};

Expand Down
2 changes: 2 additions & 0 deletions include/openmc/chain.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ class DecayPhotonAngleEnergy : public AngleEnergy {
//! \param[inout] seed Pseudorandom seed pointer
void sample(
double E_in, double& E_out, double& mu, uint64_t* seed) const override;
double sample_energy_and_pdf(
double E_in, double mu, double& E_out, uint64_t* seed) const override;

private:
const Distribution* photon_energy_;
Expand Down
10 changes: 8 additions & 2 deletions include/openmc/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,15 @@ enum class MgxsType {

enum class TallyResult { VALUE, SUM, SUM_SQ, SUM_THIRD, SUM_FOURTH };

enum class TallyType { VOLUME, MESH_SURFACE, SURFACE, PULSE_HEIGHT };
enum class TallyType {
VOLUME,
MESH_SURFACE,
SURFACE,
PULSE_HEIGHT,
NEXT_EVENT
};

enum class TallyEstimator { ANALOG, TRACKLENGTH, COLLISION };
enum class TallyEstimator { ANALOG, TRACKLENGTH, COLLISION, POINT };

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

Expand Down
1 change: 1 addition & 0 deletions include/openmc/distribution_angle.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class AngleDistribution {
//! \param[inout] seed pseudorandom number seed pointer
//! \return Cosine of the angle in the range [-1,1]
double sample(double E, uint64_t* seed) const;
double evaluate(double E, double mu) const;

//! Determine whether angle distribution is empty
//! \return Whether distribution is empty
Expand Down
10 changes: 10 additions & 0 deletions include/openmc/distribution_multi.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "pugixml.hpp"

#include "openmc/distribution.h"
#include "openmc/error.h"
#include "openmc/position.h"

namespace openmc {
Expand All @@ -29,6 +30,11 @@ class UnitSphereDistribution {
//! \return (sampled Direction, sample weight)
virtual std::pair<Direction, double> sample(uint64_t* seed) const = 0;

virtual double evaluate(Direction u) const
{
fatal_error("evaluate not available for this UnitSphereDistribution type");
}

Direction u_ref_ {0.0, 0.0, 1.0}; //!< reference direction
};

Expand All @@ -52,6 +58,8 @@ class PolarAzimuthal : public UnitSphereDistribution {
//! \return (sampled Direction, value of the PDF at this Direction)
std::pair<Direction, double> sample_as_bias(uint64_t* seed) const;

double evaluate(Direction u) const override;

// Observing pointers
Distribution* mu() const { return mu_.get(); }
Distribution* phi() const { return phi_.get(); }
Expand Down Expand Up @@ -87,6 +95,8 @@ class Isotropic : public UnitSphereDistribution {
//! \return (sampled direction, sample weight)
std::pair<Direction, double> sample(uint64_t* seed) const override;

double evaluate(Direction u) const override;

// Set or get bias distribution
void set_bias(std::unique_ptr<PolarAzimuthal> bias)
{
Expand Down
8 changes: 6 additions & 2 deletions include/openmc/particle.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class Particle : public ParticleData {
//==========================================================================
// Methods

double mass() const;

double speed() const;

//! create a secondary particle
Expand Down Expand Up @@ -64,10 +66,12 @@ class Particle : public ParticleData {
//! \param src Source site data
void from_source(const SourceSite* src);

void initialize_pseudoparticle(Particle& p, Direction u, double E);

// Coarse-grained particle events
void event_calculate_xs();
void event_calculate_xs(bool is_pseudo = false);
void event_advance();
void event_cross_surface();
void event_cross_surface(bool is_pseudo = false);
void event_collide();
void event_revive_from_secondary();
void event_death();
Expand Down
2 changes: 1 addition & 1 deletion include/openmc/physics.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void sample_fission_neutron(

//! handles all reactions with a single secondary neutron (other than fission),
//! i.e. level scattering, (n,np), (n,na), etc.
void inelastic_scatter(const Nuclide& nuc, const Reaction& rx, Particle& p);
void inelastic_scatter(int i_nuclide, const Reaction& rx, Particle& p);

void sample_secondary_photons(Particle& p, int i_nuclide);

Expand Down
11 changes: 11 additions & 0 deletions include/openmc/position.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,17 @@ inline Position operator/(double a, Position b)
return b /= a;
}

inline bool operator<(Position a, Position b)
{
if (a[0] != b[0])
return (a[0] < b[0]);
if (a[1] != b[1])
return (a[1] < b[1]);
if (a[2] != b[2])
return (a[2] < b[2]);
return false;
}

inline Position Position::reflect(Position n) const
{
const double projection = n.dot(*this);
Expand Down
3 changes: 2 additions & 1 deletion include/openmc/random_lcg.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ namespace openmc {
// Module constants.
//==============================================================================

constexpr int N_STREAMS {4};
constexpr int N_STREAMS {5};
constexpr int STREAM_TRACKING {0};
constexpr int STREAM_SOURCE {1};
constexpr int STREAM_URR_PTABLE {2};
constexpr int STREAM_VOLUME {3};
constexpr int STREAM_NEXT_EVENT {4};
constexpr int64_t DEFAULT_SEED {1};
constexpr uint64_t DEFAULT_STRIDE {152917ULL};

Expand Down
5 changes: 5 additions & 0 deletions include/openmc/reaction_product.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ class ReactionProduct {
//! \param[inout] seed Pseudorandom seed pointer
void sample(double E_in, double& E_out, double& mu, uint64_t* seed) const;

AngleEnergy& sample_dist(double E_in, uint64_t* seed) const;

double sample_energy_and_pdf(
double E_in, double mu, double& E_out, uint64_t* seed) const;

ParticleType particle_; //!< Particle type
EmissionMode emission_mode_; //!< Emission mode
double decay_rate_; //!< Decay rate (for delayed neutron precursors) in [1/s]
Expand Down
3 changes: 3 additions & 0 deletions include/openmc/secondary_correlated.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ class CorrelatedAngleEnergy : public AngleEnergy {
//! \param[inout] seed Pseudorandom seed pointer
void sample(
double E_in, double& E_out, double& mu, uint64_t* seed) const override;
Distribution& sample_dist(double E_in, double& E_out, uint64_t* seed) const;
double sample_energy_and_pdf(
double E_in, double mu, double& E_out, uint64_t* seed) const override;

// energy property
vector<double>& energy() { return energy_; }
Expand Down
4 changes: 4 additions & 0 deletions include/openmc/secondary_kalbach.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ class KalbachMann : public AngleEnergy {
//! \param[inout] seed Pseudorandom seed pointer
void sample(
double E_in, double& E_out, double& mu, uint64_t* seed) const override;
void sample_params(double E_in, double& E_out, double& km_a, double& km_r,
uint64_t* seed) const;
double sample_energy_and_pdf(
double E_in, double mu, double& E_out, uint64_t* seed) const override;

private:
//! Outgoing energy/angle at a single incoming energy
Expand Down
3 changes: 3 additions & 0 deletions include/openmc/secondary_nbody.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class NBodyPhaseSpace : public AngleEnergy {
//! \param[inout] seed Pseudorandom seed pointer
void sample(
double E_in, double& E_out, double& mu, uint64_t* seed) const override;
double sample_energy(double E_in, uint64_t* seed) const;
double sample_energy_and_pdf(
double E_in, double mu, double& E_out, uint64_t* seed) const override;

private:
int n_bodies_; //!< Number of particles distributed
Expand Down
76 changes: 76 additions & 0 deletions include/openmc/secondary_thermal.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include "openmc/angle_energy.h"
#include "openmc/endf.h"
#include "openmc/search.h"
#include "openmc/secondary_correlated.h"
#include "openmc/vector.h"

Expand All @@ -32,9 +33,13 @@ class CoherentElasticAE : public AngleEnergy {
//! \param[inout] seed Pseudorandom seed pointer
void sample(
double E_in, double& E_out, double& mu, uint64_t* seed) const override;
double sample_energy_and_pdf(
double E_in, double mu, double& E_out, uint64_t* seed) const override;

private:
const CoherentElasticXS& xs_; //!< Coherent elastic scattering cross section
tensor::Tensor<double>
factors_diff_; //!< Differences over elastic scattering factors
};

//==============================================================================
Expand All @@ -55,6 +60,8 @@ class IncoherentElasticAE : public AngleEnergy {
//! \param[inout] seed Pseudorandom number seed pointer
void sample(
double E_in, double& E_out, double& mu, uint64_t* seed) const override;
double sample_energy_and_pdf(
double E_in, double mu, double& E_out, uint64_t* seed) const override;

private:
double debye_waller_;
Expand All @@ -80,6 +87,8 @@ class IncoherentElasticAEDiscrete : public AngleEnergy {
//! \param[inout] seed Pseudorandom number seed pointer
void sample(
double E_in, double& E_out, double& mu, uint64_t* seed) const override;
double sample_energy_and_pdf(
double E_in, double mu, double& E_out, uint64_t* seed) const override;

private:
const vector<double>& energy_; //!< Energies at which cosines are tabulated
Expand All @@ -106,6 +115,9 @@ class IncoherentInelasticAEDiscrete : public AngleEnergy {
//! \param[inout] seed Pseudorandom number seed pointer
void sample(
double E_in, double& E_out, double& mu, uint64_t* seed) const override;
void sample_params(double E_in, double& E_out, int& j, uint64_t* seed) const;
double sample_energy_and_pdf(
double E_in, double mu, double& E_out, uint64_t* seed) const override;

private:
const vector<double>& energy_; //!< Incident energies
Expand Down Expand Up @@ -134,6 +146,10 @@ class IncoherentInelasticAE : public AngleEnergy {
//! \param[inout] seed Pseudorandom number seed pointer
void sample(
double E_in, double& E_out, double& mu, uint64_t* seed) const override;
void sample_params(double E_in, double& E_out, double& f, int& l, int& j,
uint64_t* seed) const;
double sample_energy_and_pdf(
double E_in, double mu, double& E_out, uint64_t* seed) const override;

private:
//! Secondary energy/angle distribution
Expand Down Expand Up @@ -169,6 +185,9 @@ class MixedElasticAE : public AngleEnergy {
//! \param[inout] seed Pseudorandom number seed pointer
void sample(
double E_in, double& E_out, double& mu, uint64_t* seed) const override;
const AngleEnergy& sample_dist(double E_in, uint64_t* seed) const;
double sample_energy_and_pdf(
double E_in, double mu, double& E_out, uint64_t* seed) const override;

private:
CoherentElasticAE coherent_dist_; //!< Coherent distribution
Expand All @@ -178,6 +197,63 @@ class MixedElasticAE : public AngleEnergy {
const Function1D& incoherent_xs_; //!< Polymorphic ref. to incoherent XS
};

struct DoubleVector {
double data;
const double& operator[](size_t index) const { return data; }
};

template<typename T1, typename T2>
double get_pdf_discrete(
const T1 mu, const T2& w, double mu_0, double a = -1.0, double b = 1.0)
{
// Make sure mu is in range [a,b]
if (mu_0 < a)
mu_0 = a;
if (mu_0 > b)
mu_0 = b;
double a0;
double a1;
double b0;
double b1;
int32_t ai = -1;
int32_t bi = -1;
if (mu_0 > mu[0]) {
ai = lower_bound_index(mu.begin(), mu.end(), mu_0);
a0 = mu[ai];
a1 = (ai > 1) ? mu[ai - 1] : a;
} else {
a0 = a;
a1 = a;
}
if (mu_0 < mu[mu.size() - 1]) {
bi = upper_bound_index(mu.begin(), mu.end(), mu_0);
b0 = mu[bi];
b1 = (bi < mu.size() - 1) ? mu[bi + 1] : b;
} else {
b0 = b;
b1 = b;
}

// Calculate Delta_a and Delta_b
double delta_a = 0.5 * std::min(b0 - a0, a0 - a1);
double delta_b = 0.5 * std::min(b1 - b0, b0 - a0);

if (mu_0 < a0 + delta_a)
return w[ai] / (2.0 * delta_a);
else if (mu_0 + delta_b < b0)
return w[bi] / (2.0 * delta_b);
else
return 0.0;
}

template<typename T1>
double get_pdf_discrete(
const T1 mu, double mu_0, double a = -1.0, double b = 1.0)
{
DoubleVector w {1.0 / mu.size()};
return get_pdf_discrete(mu, w, mu_0, a, b);
}

} // namespace openmc

#endif // OPENMC_SECONDARY_THERMAL_H
2 changes: 2 additions & 0 deletions include/openmc/secondary_uncorrelated.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class UncorrelatedAngleEnergy : public AngleEnergy {
//! \param[inout] seed Pseudorandom seed pointer
void sample(
double E_in, double& E_out, double& mu, uint64_t* seed) const override;
double sample_energy_and_pdf(
double E_in, double mu, double& E_out, uint64_t* seed) const override;

// Accessors
AngleDistribution& angle() { return angle_; }
Expand Down
17 changes: 11 additions & 6 deletions include/openmc/simulation.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@ extern "C" double
extern double log_spacing; //!< lethargy spacing for energy grid searches
extern "C" int n_lost_particles; //!< cumulative number of lost particles
extern "C" bool need_depletion_rx; //!< need to calculate depletion rx?
extern "C" int restart_batch; //!< batch at which a restart job resumed
extern "C" bool satisfy_triggers; //!< have tally triggers been satisfied?
extern int ssw_current_file; //!< current surface source file
extern "C" int total_gen; //!< total number of generations simulated
extern double total_weight; //!< Total source weight in a batch
extern int64_t work_per_rank; //!< number of particles per MPI rank
extern bool
nonvacuum_boundary_present; //!< Does the geometry contain non-vacuum b.c.
extern "C" int restart_batch; //!< batch at which a restart job resumed
extern "C" bool satisfy_triggers; //!< have tally triggers been satisfied?
extern int ssw_current_file; //!< current surface source file
extern "C" int total_gen; //!< total number of generations simulated
extern double total_weight; //!< Total source weight in a batch
extern int64_t work_per_rank; //!< number of particles per MPI rank

extern const RegularMesh* entropy_mesh;
extern const RegularMesh* ufs_mesh;
Expand Down Expand Up @@ -92,6 +94,9 @@ void broadcast_results();

void free_memory_simulation();

//! Simulate a single pseudoparticle history
double transport_pseudoparticle(Particle& p, double total_distance);

//! Simulate a single particle history (and all generated secondary particles,
//! if enabled), from birth to death
void transport_history_based_single_particle(Particle& p);
Expand Down
1 change: 1 addition & 0 deletions include/openmc/tallies/filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ enum class FilterType {
PARENT_NUCLIDE,
PARTICLE,
PARTICLE_PRODUCTION,
POINT,
POLAR,
REACTION,
SPHERICAL_HARMONICS,
Expand Down
Loading
Loading