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

Function intersect

Src/Base/AMReX_BoxArray.cpp:1716–1740  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1714}
1715
1716BoxArray
1717intersect (const BoxArray& ba,
1718 const Box& b,
1719 int ng)
1720{
1721 std::vector< std::pair<int,Box> > isects;
1722
1723 ba.intersections(b,isects,false,IntVect(ng));
1724
1725 const int N = static_cast<int>(isects.size());
1726
1727 BoxArray r(N);
1728
1729 if (N > 0) {
1730#ifdef AMREX_USE_OMP
1731#pragma omp parallel for
1732#endif
1733 for (int i = 0; i < N; i++)
1734 {
1735 r.set(i, isects[i].second);
1736 }
1737 }
1738
1739 return r;
1740}
1741
1742BoxArray
1743intersect (const BoxArray& ba,

Callers

nothing calls this directly

Calls 8

intersectionsMethod · 0.80
joinMethod · 0.80
BoxArrayClass · 0.70
sizeMethod · 0.45
setMethod · 0.45
emptyMethod · 0.45
ixTypeMethod · 0.45
boxListMethod · 0.45

Tested by

no test coverage detected