mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Move tally % nuclide_bins to C++
This commit is contained in:
parent
e99fd9e7e4
commit
f4d7c81bd4
8 changed files with 164 additions and 72 deletions
|
|
@ -20,6 +20,9 @@ class Tally {
|
|||
public:
|
||||
Tally() {}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods for getting and setting filter/stride data.
|
||||
|
||||
const std::vector<int32_t>& filters() {return filters_;}
|
||||
|
||||
int32_t filters(int i) const {return filters_[i];}
|
||||
|
|
@ -30,13 +33,26 @@ public:
|
|||
|
||||
int32_t n_filter_bins() const {return n_filter_bins_;}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Major public data members.
|
||||
|
||||
int type_ {TALLY_VOLUME}; //!< volume, surface current
|
||||
|
||||
//! Event type that contributes to this tally
|
||||
int estimator_ {ESTIMATOR_TRACKLENGTH};
|
||||
|
||||
//! Whether this tally is currently being updated
|
||||
bool active_ {false};
|
||||
|
||||
//! Index of each nuclide to be tallied. -1 indicates total material.
|
||||
std::vector<int> nuclides_;
|
||||
|
||||
//! True if this tally has a bin for every nuclide in the problem
|
||||
bool all_nuclides_ {false};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Miscellaneous public members.
|
||||
|
||||
// We need to have quick access to some filters. The following gives indices
|
||||
// for various filters that could be in the tally or C_NONE if they are not
|
||||
// present.
|
||||
|
|
@ -49,6 +65,9 @@ public:
|
|||
int deriv_ {C_NONE}; //!< Index of a TallyDerivative object for diff tallies.
|
||||
|
||||
private:
|
||||
//----------------------------------------------------------------------------
|
||||
// Private data.
|
||||
|
||||
std::vector<int32_t> filters_; //!< Filter indices in global filters array
|
||||
|
||||
//! Index strides assigned to each filter to support 1D indexing.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue