Merge pull request #1863 from pshriwise/cell_inst_filter

Enable cell instance tallies for universe/lattice-filled cells
This commit is contained in:
Paul Romano 2021-08-03 14:27:32 -05:00 committed by GitHub
commit 180fefc99d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 156 additions and 48 deletions

View file

@ -40,6 +40,17 @@ inline bool coincident(double d1, double d2) {
bool check_cell_overlap(Particle& p, bool error=true);
//==============================================================================
//! Get the cell instance for a particle at the specified universe level
//!
//! \param p A particle for which to compute the instance using
//! its coordinates
//! \param level The level (zero indexed) of the geometry where the instance should be computed.
//! \return The instance of the cell at the specified level.
//==============================================================================
int cell_instance_at_level(const Particle& p, int level);
//==============================================================================
//! Locate a particle in the geometry tree and set its geometry data fields.
//!

View file

@ -53,8 +53,14 @@ private:
//! The indices of the cells binned by this filter.
vector<CellInstance> cell_instances_;
//! The set of cells used in this filter
std::unordered_set<int32_t> cells_;
//! A map from cell/instance indices to filter bin indices.
std::unordered_map<CellInstance, gsl::index, CellInstanceHash> map_;
//! Indicates if filter uses only material-filled cells
bool material_cells_only_;
};
} // namespace openmc