mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Fixed error due to applying de morgans laws
This commit is contained in:
parent
80c8692537
commit
090363b637
2 changed files with 3 additions and 2 deletions
|
|
@ -244,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
|
||||
|
|
|
|||
|
|
@ -624,6 +624,7 @@ CSGCell::CSGCell(pugi::xml_node cell_node)
|
|||
for (auto it = region_.begin(); it != region_.end(); it++) {
|
||||
if (*it == OP_INTERSECTION || *it > OP_COMPLEMENT) {
|
||||
region_.erase(it);
|
||||
it--;
|
||||
}
|
||||
}
|
||||
region_.shrink_to_fit();
|
||||
|
|
@ -807,7 +808,7 @@ void CSGCell::remove_complement_ops(vector<int32_t>& infix)
|
|||
// positions in the RPN
|
||||
apply_demorgan(it, stop);
|
||||
// update iterator position
|
||||
it = std::find(it, infix.end(), OP_COMPLEMENT);
|
||||
it = std::find(infix.begin(), infix.end(), OP_COMPLEMENT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue