| 118 | {} |
| 119 | |
| 120 | void |
| 121 | BoxDomain::add (const Box& b) |
| 122 | { |
| 123 | BL_ASSERT(b.ixType() == ixType()); |
| 124 | |
| 125 | Vector<Box> tmp, check; |
| 126 | |
| 127 | check.push_back(b); |
| 128 | |
| 129 | for (const auto& bx : *this) |
| 130 | { |
| 131 | tmp.clear(); |
| 132 | for (auto& cbx : check) |
| 133 | { |
| 134 | if (cbx.intersects(bx)) |
| 135 | { |
| 136 | const BoxList& tmpbl = amrex::boxDiff(cbx, bx); |
| 137 | tmp.insert(std::end(tmp), std::begin(tmpbl), std::end(tmpbl)); |
| 138 | cbx = Box(); |
| 139 | } |
| 140 | } |
| 141 | std::erase_if(check, [](const Box& x) { return x.isEmpty(); }); |
| 142 | check.insert(std::end(check), std::begin(tmp), std::end(tmp)); |
| 143 | } |
| 144 | join(check); |
| 145 | BL_ASSERT(ok()); |
| 146 | } |
| 147 | |
| 148 | void |
| 149 | BoxDomain::add (const BoxList& bl) |
no test coverage detected