mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Merge pull request #2178 from myerspat/infix-sense-evaluation
Short circuiting and lazy evaluation of CSG regions for cell searching
This commit is contained in:
commit
df3765fa07
4 changed files with 203 additions and 96 deletions
|
|
@ -160,14 +160,12 @@ protected:
|
|||
//! \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;
|
||||
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> exhaustive_find_parent_cells(
|
||||
int32_t instance) const;
|
||||
vector<ParentCell> exhaustive_find_parent_cells(int32_t instance) const;
|
||||
|
||||
//! Inner function for retrieving contained cells
|
||||
void get_contained_cells_inner(
|
||||
|
|
@ -201,9 +199,7 @@ public:
|
|||
vector<double> sqrtkT_;
|
||||
|
||||
//! Definition of spatial region as Boolean expression of half-spaces
|
||||
vector<std::int32_t> region_;
|
||||
//! Reverse Polish notation for region expression
|
||||
vector<std::int32_t> rpn_;
|
||||
vector<int32_t> region_;
|
||||
bool simple_; //!< Does the region contain only intersections?
|
||||
|
||||
//! \brief Neighboring cells in the same universe.
|
||||
|
|
@ -248,7 +244,7 @@ protected:
|
|||
bool contains_simple(Position r, Direction u, int32_t on_surface) const;
|
||||
bool contains_complex(Position r, Direction u, int32_t on_surface) const;
|
||||
BoundingBox bounding_box_simple() const;
|
||||
static BoundingBox bounding_box_complex(vector<int32_t> rpn);
|
||||
static BoundingBox bounding_box_complex(vector<int32_t> postfix);
|
||||
|
||||
//! Applies DeMorgan's laws to a section of the RPN
|
||||
//! \param start Starting point for token modification
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue