• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openmc-dev / openmc / 12776996362

14 Jan 2025 09:49PM UTC coverage: 84.938% (+0.2%) from 84.729%
12776996362

Pull #3133

github

web-flow
Merge 0495246d9 into 549cc0973
Pull Request #3133: Kinetics parameters using Iterated Fission Probability

318 of 330 new or added lines in 10 files covered. (96.36%)

1658 existing lines in 66 files now uncovered.

50402 of 59340 relevant lines covered (84.94%)

33987813.96 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/include/openmc/tallies/filter_energy.h
1
#ifndef OPENMC_TALLIES_FILTER_ENERGY_H
2
#define OPENMC_TALLIES_FILTER_ENERGY_H
3

4
#include <gsl/gsl-lite.hpp>
5

6
#include "openmc/tallies/filter.h"
7
#include "openmc/vector.h"
8

9
namespace openmc {
10

11
//==============================================================================
12
//! Bins the incident neutron energy.
13
//==============================================================================
14

15
class EnergyFilter : public Filter {
16
public:
17
  //----------------------------------------------------------------------------
18
  // Constructors, destructors
19

20
  ~EnergyFilter() = default;
21

22
  //----------------------------------------------------------------------------
23
  // Methods
24

25
  std::string type_str() const override { return "energy"; }
26
  FilterType type() const override { return FilterType::ENERGY; }
27

28
  void from_xml(pugi::xml_node node) override;
29

30
  void get_all_bins(const Particle& p, TallyEstimator estimator,
31
    FilterMatch& match) const override;
32

33
  void to_statepoint(hid_t filter_group) const override;
34

35
  std::string text_label(int bin) const override;
36

37
  //----------------------------------------------------------------------------
38
  // Accessors
39

UNCOV
40
  const vector<double>& bins() const { return bins_; }
×
41
  void set_bins(gsl::span<const double> bins);
42

43
  bool matches_transport_groups() const { return matches_transport_groups_; }
44

45
protected:
46
  //----------------------------------------------------------------------------
47
  // Data members
48

49
  vector<double> bins_;
50

51
  //! True if transport group number can be used directly to get bin number
52
  bool matches_transport_groups_ {false};
53
};
54

55
//==============================================================================
56
//! Bins the outgoing neutron energy.
57
//!
58
//! Only scattering events use the get_all_bins functionality.  Nu-fission
59
//! tallies manually iterate over the filter bins.
60
//==============================================================================
61

62
class EnergyoutFilter : public EnergyFilter {
63
public:
64
  //----------------------------------------------------------------------------
65
  // Methods
66

67
  std::string type_str() const override { return "energyout"; }
68
  FilterType type() const override { return FilterType::ENERGY_OUT; }
69

70
  void get_all_bins(const Particle& p, TallyEstimator estimator,
71
    FilterMatch& match) const override;
72

73
  std::string text_label(int bin) const override;
74
};
75

76
} // namespace openmc
77
#endif // OPENMC_TALLIES_FILTER_ENERGY_H
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc