| 2167 | } |
| 2168 | |
| 2169 | FabArrayBase::CFinfo::CFinfo (const FabArrayBase& finefa, |
| 2170 | const Geometry& finegm, |
| 2171 | const IntVect& ng, |
| 2172 | bool include_periodic, |
| 2173 | bool include_physbndry) |
| 2174 | : m_fine_bdk (finefa.getBDKey()), |
| 2175 | m_ng (ng), |
| 2176 | m_include_periodic(include_periodic), |
| 2177 | m_include_physbndry(include_physbndry) |
| 2178 | { |
| 2179 | BL_PROFILE("CFinfo::CFinfo()"); |
| 2180 | |
| 2181 | m_fine_domain = Domain(finegm, ng, include_periodic, include_physbndry); |
| 2182 | |
| 2183 | const BoxArray& fba = amrex::convert(finefa.boxArray(), IndexType::TheCellType()); |
| 2184 | const DistributionMapping& fdm = finefa.DistributionMap(); |
| 2185 | |
| 2186 | BoxList bl(fba.ixType()); |
| 2187 | Vector<int> iprocs; |
| 2188 | const int myproc = ParallelDescriptor::MyProc(); |
| 2189 | |
| 2190 | for (int i = 0, N = static_cast<int>(fba.size()); i < N; ++i) |
| 2191 | { |
| 2192 | Box bx = fba[i]; |
| 2193 | bx.grow(m_ng); |
| 2194 | bx &= m_fine_domain; |
| 2195 | |
| 2196 | const BoxList& noncovered = fba.complementIn(bx); |
| 2197 | for (const Box& b : noncovered) { |
| 2198 | bl.push_back(b); |
| 2199 | iprocs.push_back(fdm[i]); |
| 2200 | if (fdm[i] == myproc) { |
| 2201 | fine_grid_idx.push_back(i); |
| 2202 | } |
| 2203 | } |
| 2204 | } |
| 2205 | |
| 2206 | if (!iprocs.empty()) |
| 2207 | { |
| 2208 | ba_cfb.define(bl); |
| 2209 | dm_cfb.define(std::move(iprocs)); |
| 2210 | } |
| 2211 | } |
| 2212 | |
| 2213 | Box |
| 2214 | FabArrayBase::CFinfo::Domain (const Geometry& geom, const IntVect& ng, |
nothing calls this directly
no test coverage detected