mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Using find_cell to determine upward path through geometry
This commit is contained in:
parent
2332dd2fae
commit
c148683d82
3 changed files with 100 additions and 35 deletions
|
|
@ -169,6 +169,7 @@ public:
|
|||
//! Get all cell instances contained by this cell
|
||||
//! \param[in] instance Instance of the cell for which to get contained cells
|
||||
//! (default instance is zero)
|
||||
//! \param[in] hint positional hint for determining the parent cells
|
||||
//! \return Map with cell indexes as keys and
|
||||
//! instances as values
|
||||
std::unordered_map<int32_t, vector<int32_t>> get_contained_cells(
|
||||
|
|
@ -176,8 +177,24 @@ public:
|
|||
|
||||
protected:
|
||||
//! Determine the path to this cell instance in the geometry hierarchy
|
||||
//! \param[in] instance of the cell to find parent cells for
|
||||
//! \param[in] r position used to do a fast search for parent cells
|
||||
//! \return parent cells
|
||||
vector<ParentCell> find_parent_cells(
|
||||
int32_t instance, Position* hint = nullptr) const;
|
||||
int32_t instance, const Position& r) const;
|
||||
|
||||
//! Determine the path to this cell instance in the geometry hierarchy
|
||||
//! \param[in] instance of the cell to find parent cells for
|
||||
//! \param[in] p particle used to do a fast search for parent cells
|
||||
//! \return parent cells
|
||||
vector<ParentCell> find_parent_cells(
|
||||
int32_t instance, Particle& p) const;
|
||||
|
||||
//! Determine the path to this cell instance in the geometry hierarchy
|
||||
//! \param[in] instance of the cell to find parent cells for
|
||||
//! \return parent cells
|
||||
vector<ParentCell> find_parent_cells_exhaustive(
|
||||
int32_t instance) const;
|
||||
|
||||
//! Inner function for retrieving contained cells
|
||||
void get_contained_cells_inner(
|
||||
|
|
|
|||
|
|
@ -341,6 +341,8 @@ public:
|
|||
const int& cell_instance() const { return cell_instance_; }
|
||||
LocalCoord& coord(int i) { return coord_[i]; }
|
||||
const LocalCoord& coord(int i) const { return coord_[i]; }
|
||||
const vector<LocalCoord>& coord() const { return coord_; }
|
||||
|
||||
|
||||
int& n_coord_last() { return n_coord_last_; }
|
||||
const int& n_coord_last() const { return n_coord_last_; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue