Skip to content

Commit 63a991f

Browse files
committed
Change the visibility of VolumeCalculation memberss to private when possible
1 parent 40b01bc commit 63a991f

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

include/openmc/volume_calc.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ namespace openmc {
2424
//==============================================================================
2525

2626
class VolumeCalculation {
27-
28-
public:
27+
private:
2928
// Aliases, types
3029
struct NuclResult {
3130
vector<int> nuclides; //!< Index of nuclides
3231
vector<double> atoms; //!< Number of atoms for each nuclide
3332
vector<double> uncertainty; //!< Uncertainty on number of atoms
3433
}; // Results of nuclides calculation for a single domain
3534

35+
public:
3636
//! \brief Tally corresponding to a single material (AoS)
3737
struct VolTally {
3838
double score {0.0}; //!< Current batch scores accumulator
@@ -67,7 +67,7 @@ class VolumeCalculation {
6767
//! \return True if the trigger condition is satisfied
6868
inline bool trigger_state(const TriggerMetric trigger_type,
6969
const double threshold, const size_t& n_samples) const;
70-
};
70+
}; // public just because it is used externally for the MPI struct definition
7171

7272
//! \brief Online results of calculation specific for each thread
7373
struct CalcResults {
@@ -108,6 +108,18 @@ class VolumeCalculation {
108108
//! \return Vector of results for each user-specified domain
109109
void execute(CalcResults& results) const;
110110

111+
//! \brief Print volume calculation results
112+
//
113+
//! \param[in] results Full volume calculation results
114+
void show_results(const CalcResults& results) const;
115+
116+
//! \brief Write volume calculation results to HDF5 file
117+
//
118+
//! \param[in] filename Path to HDF5 file to write
119+
//! \param[in] results Results entity
120+
void to_hdf5(const std::string& filename, const CalcResults& results) const;
121+
122+
private:
111123
//! \brief Rejection estimator
112124
inline void score_hit(const Particle& p, CalcResults& results) const;
113125

@@ -129,11 +141,6 @@ class VolumeCalculation {
129141
void reduce_results(
130142
const CalcResults& local_results, CalcResults& results) const;
131143

132-
//! \brief Print volume calculation results
133-
//
134-
//! \param[in] results Full volume calculation results
135-
void show_results(const CalcResults& results) const;
136-
137144
//! \brief Prints a statistics parameter
138145
//
139146
//! \param[in] label Name of parameter
@@ -153,12 +160,6 @@ class VolumeCalculation {
153160
const std::string region_name, const double mean,
154161
const double stddev) const;
155162

156-
//! \brief Write volume calculation results to HDF5 file
157-
//
158-
//! \param[in] filename Path to HDF5 file to write
159-
//! \param[in] results Results entity
160-
void to_hdf5(const std::string& filename, const CalcResults& results) const;
161-
162163
// Tally filter and map types
163164
enum class TallyDomain { UNIVERSE, MATERIAL, CELL };
164165

@@ -176,7 +177,6 @@ class VolumeCalculation {
176177
Position upper_right_; //!< Upper-right position of bounding box
177178
vector<int> domain_ids_; //!< IDs of domains to find volumes of
178179

179-
private:
180180
constexpr static int _INDEX_TOTAL =
181181
-999; //!< Index of zero-element tally for entire domain totals should be
182182
//!< out of material ID range

0 commit comments

Comments
 (0)