mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Creating a separate struct for the parent cell concept.
This commit is contained in:
parent
00fffc8590
commit
29cfec5a20
2 changed files with 27 additions and 13 deletions
|
|
@ -44,6 +44,7 @@ constexpr int32_t OP_UNION {std::numeric_limits<int32_t>::max() - 4};
|
|||
//==============================================================================
|
||||
|
||||
class Cell;
|
||||
class ParentCell;
|
||||
class CellInstance;
|
||||
class Universe;
|
||||
class UniversePartitioner;
|
||||
|
|
@ -151,13 +152,15 @@ public:
|
|||
|
||||
//! Get all cell instances contained by this cell
|
||||
//! \return Map with cell indexes as keys and instances as values
|
||||
std::unordered_map<int32_t, std::set<int32_t>>
|
||||
std::unordered_map<int32_t, std::vector<int32_t>>
|
||||
get_contained_cells();
|
||||
|
||||
protected:
|
||||
void
|
||||
get_contained_cells_inner(std::unordered_map<int32_t, std::set<int32_t>>& contained_cells,
|
||||
std::vector<CellInstance>& parent_cells);
|
||||
get_contained_cells_inner(std::unordered_map<int32_t, std::vector<int32_t>>& contained_cells,
|
||||
std::vector<ParentCell>& parent_cells);
|
||||
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Data members
|
||||
|
||||
|
|
@ -307,6 +310,16 @@ private:
|
|||
std::vector<std::vector<int32_t>> partitions_;
|
||||
};
|
||||
|
||||
|
||||
//==============================================================================
|
||||
//! Define a containing (parent) cell
|
||||
//==============================================================================
|
||||
|
||||
struct ParentCell {
|
||||
gsl::index cell_index;
|
||||
gsl::index lattice_index;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
//! Define an instance of a particular cell
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue