| 946 | } |
| 947 | |
| 948 | BoxList |
| 949 | BoxArray::boxList () const |
| 950 | { |
| 951 | const int N = static_cast<int>(size()); |
| 952 | BoxList newb; |
| 953 | newb.data().reserve(N); |
| 954 | if (N > 0) { |
| 955 | newb.set(ixType()); |
| 956 | auto const& bxs = this->m_ref->m_abox; |
| 957 | if (m_bat.is_null()) { |
| 958 | for (int i = 0; i < N; ++i) { |
| 959 | newb.push_back(bxs[i]); |
| 960 | } |
| 961 | } else if (m_bat.is_simple()) { |
| 962 | IndexType t = ixType(); |
| 963 | IntVect cr = crseRatio(); |
| 964 | for (int i = 0; i < N; ++i) { |
| 965 | newb.push_back(amrex::convert(amrex::coarsen(bxs[i],cr),t)); |
| 966 | } |
| 967 | } else { |
| 968 | for (int i = 0; i < N; ++i) { |
| 969 | newb.push_back(m_bat.m_op.m_bndryReg(bxs[i])); |
| 970 | } |
| 971 | } |
| 972 | } |
| 973 | return newb; |
| 974 | } |
| 975 | |
| 976 | bool |
| 977 | BoxArray::contains (const IntVect& iv) const |