mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Merge pull request #1863 from pshriwise/cell_inst_filter
Enable cell instance tallies for universe/lattice-filled cells
This commit is contained in:
commit
180fefc99d
10 changed files with 156 additions and 48 deletions
|
|
@ -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.
|
||||
//!
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue