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

Method isDisjoint

Src/Base/AMReX_BoxArray.cpp:919–946  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

917}
918
919bool
920BoxArray::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
948BoxList
949BoxArray::boxList () const

Callers

nothing calls this directly

Calls 6

sizeFunction · 0.85
convertFunction · 0.85
is_nullMethod · 0.80
is_simpleMethod · 0.80
coarsenFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected