mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Add getter for MaterialFilter::materials_
This commit is contained in:
parent
b0704a674f
commit
0e15cb58d3
2 changed files with 10 additions and 4 deletions
|
|
@ -27,12 +27,18 @@ public:
|
|||
void get_all_bins(const Particle* p, int estimator, FilterMatch& match)
|
||||
const override;
|
||||
|
||||
void set_materials(gsl::span<const int32_t> materials);
|
||||
|
||||
void to_statepoint(hid_t filter_group) const override;
|
||||
|
||||
std::string text_label(int bin) const override;
|
||||
|
||||
// Accessors
|
||||
std::vector<int32_t>& materials() { return materials_; }
|
||||
|
||||
const std::vector<int32_t>& materials() const { return materials_; }
|
||||
|
||||
void set_materials(gsl::span<const int32_t> materials);
|
||||
|
||||
private:
|
||||
//! The indices of the materials binned by this filter.
|
||||
std::vector<int32_t> materials_;
|
||||
|
||||
|
|
|
|||
|
|
@ -93,8 +93,8 @@ openmc_material_filter_get_bins(int32_t index, int32_t** bins, size_t* n)
|
|||
}
|
||||
|
||||
// Output the bins.
|
||||
*bins = filt->materials_.data();
|
||||
*n = filt->materials_.size();
|
||||
*bins = filt->materials().data();
|
||||
*n = filt->materials().size();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue