| 917 | } |
| 918 | |
| 919 | bool |
| 920 | BoxArray::isDisjoint () const |
| 921 | { |
| 922 | std::vector< std::pair<int,Box> > isects; |
| 923 | |
| 924 | const int N = static_cast<int>(size()); |
| 925 | auto const& bxs = this->m_ref->m_abox; |
| 926 | if (m_bat.is_null()) { |
| 927 | for (int i = 0; i < N; ++i) { |
| 928 | intersections(bxs[i],isects); |
| 929 | if ( isects.size() > 1 ) { return false; } |
| 930 | } |
| 931 | } else if (m_bat.is_simple()) { |
| 932 | IndexType t = ixType(); |
| 933 | IntVect cr = crseRatio(); |
| 934 | for (int i = 0; i < N; ++i) { |
| 935 | intersections(amrex::convert(amrex::coarsen(bxs[i],cr),t), isects); |
| 936 | if ( isects.size() > 1 ) { return false; } |
| 937 | } |
| 938 | } else { |
| 939 | for (int i = 0; i < N; ++i) { |
| 940 | intersections(m_bat.m_op.m_bndryReg(bxs[i]), isects); |
| 941 | if ( isects.size() > 1 ) { return false; } |
| 942 | } |
| 943 | } |
| 944 | |
| 945 | return true; |
| 946 | } |
| 947 | |
| 948 | BoxList |
| 949 | BoxArray::boxList () const |