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

Method boxList

Src/Base/AMReX_BoxArray.cpp:948–974  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

946}
947
948BoxList
949BoxArray::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
976bool
977BoxArray::contains (const IntVect& iv) const

Callers 15

addFineGridsMethod · 0.45
defineMethod · 0.45
CopierMethod · 0.45
intersectFunction · 0.45
GetBndryCellsFunction · 0.45
removeOverlapFunction · 0.45
BoxListMethod · 0.45
periodicShiftFunction · 0.45
AddBoxMethod · 0.45
inverse_boxarrayMethod · 0.45

Calls 9

sizeFunction · 0.85
convertFunction · 0.85
is_nullMethod · 0.80
is_simpleMethod · 0.80
coarsenFunction · 0.70
reserveMethod · 0.45
dataMethod · 0.45
setMethod · 0.45
push_backMethod · 0.45

Tested by 1

addFineGridsMethod · 0.36