MCPcopy Create free account
hub / github.com/AMReX-Astro/Castro / deferred_sync_setup

Method deferred_sync_setup

Source/radiation/Radiation.cpp:1779–1819  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1777}
1778
1779void Radiation::deferred_sync_setup(int crse_level)
1780{
1781 BL_PROFILE("Radiation::deferred_sync_setup");
1782 if (verbose && ParallelDescriptor::IOProcessor()) {
1783 std::cout << "Radiation deferred sync setup for coarse level " << crse_level << "..." << std::endl;
1784 }
1785
1786 // sync is only called if this is not the finest level
1787
1788 int level = crse_level + 1;
1789
1790 const Orientation ori(0, Orientation::low);
1791
1792 int do_swap = (flux_cons_old[level] &&
1793 (flux_cons_old[level]->coarsenedBoxes() ==
1794 flux_cons[level]->coarsenedBoxes()) &&
1795 ((*flux_cons_old[level])[ori].DistributionMap() ==
1796 (*flux_cons[level])[ori].DistributionMap()));
1797
1798 if (do_swap) {
1799 // flux_cons_old exists and is based on same grids as flux_cons
1800 std::swap(flux_cons_old[level], flux_cons[level]);
1801 }
1802 else {
1803 flux_cons_old[level] = std::move(flux_cons[level]);
1804 // leave flux_cons undefined because we may be about to regrid anyway
1805 }
1806
1807 delta_t_old[crse_level] = parent->dtLevel(crse_level);
1808
1809 if (verbose && ParallelDescriptor::IOProcessor()) {
1810 if (do_sync) {
1811 std::cout << " done"
1812 << std::endl;
1813 }
1814 else {
1815 std::cout << " zeroed out"
1816 << std::endl;
1817 }
1818 }
1819}
1820
1821void Radiation::deferred_sync(int level, MultiFab& rhs, int indx)
1822{

Callers 1

Castro.cppFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected