MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / CFinfo

Method CFinfo

Src/Base/AMReX_FabArrayBase.cpp:2169–2211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2167}
2168
2169FabArrayBase::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
2213Box
2214FabArrayBase::CFinfo::Domain (const Geometry& geom, const IntVect& ng,

Callers

nothing calls this directly

Calls 11

convertFunction · 0.85
getBDKeyMethod · 0.80
DistributionMapMethod · 0.80
complementInMethod · 0.80
MyProcFunction · 0.70
boxArrayMethod · 0.45
ixTypeMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
emptyMethod · 0.45
defineMethod · 0.45

Tested by

no test coverage detected