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

Method uniqify

Src/Base/AMReX_BoxArray.cpp:1612–1633  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1610/// \endcond
1611
1612void
1613BoxArray::uniqify ()
1614{
1615 if (m_ref.use_count() == 1) {
1616 clear_hash_bin();
1617 } else {
1618 auto p = std::make_shared<BARef>(*m_ref);
1619 std::swap(m_ref,p);
1620 }
1621 IntVect cr = crseRatio();
1622 if (cr != IntVect::TheUnitVector()) {
1623 const int N = static_cast<int>(m_ref->m_abox.size());
1624#ifdef AMREX_USE_OMP
1625#pragma omp parallel for
1626#endif
1627 for (int i = 0; i < N; i++) {
1628 m_ref->m_abox[i].coarsen(cr);
1629 }
1630 m_bat.set_coarsen_ratio(IntVect::TheUnitVector());
1631 }
1632 m_simplified_list.reset();
1633}
1634
1635BoxList const&
1636BoxArray::simplified_list () const

Callers 3

RunSendsPFMethod · 0.80
RunACTPFMethod · 0.80
defineMethod · 0.80

Calls 4

set_coarsen_ratioMethod · 0.80
sizeMethod · 0.45
coarsenMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected