Example #1
0
const BoxList
BoxLib::intersect (const BoxList& bl,
                   const BoxList& br)
{
    BL_ASSERT(bl.ixType() == br.ixType());
    BoxList newbl(bl);
    return newbl.intersect(br);
}
Example #2
0
void
BoxList::catenate (BoxList& blist)
{
    BL_ASSERT(ixType() == blist.ixType());
    lbox.splice(lbox.end(), blist.lbox);
    BL_ASSERT(blist.isEmpty());
}
Example #3
0
void
BoxList::join (const BoxList& blist)
{
    BL_ASSERT(ixType() == blist.ixType());
    std::list<Box> lb = blist.lbox;
    lbox.splice(lbox.end(), lb);
}
Example #4
0
const BoxList
BoxLib::complementIn (const Box&     b,
                      const BoxList& bl)
{
    BL_ASSERT(bl.ixType() == b.ixType());
    BoxList newb(b.ixType());
    newb.complementIn(b,bl);
    return newb;
}
Example #5
0
bool
BoxList::contains (const BoxList&  bl) const
{
    if (isEmpty() || bl.isEmpty()) return false;

    BL_ASSERT(ixType() == bl.ixType());

    if (!minimalBox().contains(bl.minimalBox())) return false;

    BoxArray ba(*this);

    for (const_iterator bli = bl.begin(), End = bl.end(); bli != End; ++bli)
        if (!ba.contains(*bli))
            return false;

    return true;
}