diff --git a/example/poisson_gmg/poisson_driver.cpp b/example/poisson_gmg/poisson_driver.cpp index 49eefe1164c4..77b07b79bfee 100644 --- a/example/poisson_gmg/poisson_driver.cpp +++ b/example/poisson_gmg/poisson_driver.cpp @@ -85,17 +85,17 @@ TaskCollection PoissonDriver::MakeTaskCollection(BlockList_t &blocks) { if (use_exact_rhs) { auto copy_exact = tl.AddTask( copy_rhs, TF(solvers::utils::between_fields::CopyData), md); - copy_exact = tl.AddTask( + auto copy_u_between_stages = tl.AddTask( copy_exact, TF(solvers::utils::CopyData>), md, md_u); - auto comm = AddBoundaryExchangeTasks(copy_exact, tl, md_u, true); + auto comm = AddBoundaryExchangeTasks(copy_u_between_stages, tl, + md_u, true); auto *eqs = pkg->MutableParam>("poisson_equation"); copy_rhs = eqs->Ax(tl, comm, md, md_u, md_rhs); } // Set initial solution guess to zero - auto zero_u = tl.AddTask(copy_rhs, TF(solvers::utils::SetToZero), md); - zero_u = tl.AddTask(zero_u, TF(solvers::utils::SetToZero), md_u); + auto zero_u = tl.AddTask(copy_rhs, TF(solvers::utils::SetToZero), md_u); auto setup = psolver->AddSetupTasks(tl, zero_u, i, pmesh); auto solve = psolver->AddTasks(tl, setup, i, pmesh); diff --git a/src/interface/sparse_pack.hpp b/src/interface/sparse_pack.hpp index bdd48792b66b..824e2aa95d12 100644 --- a/src/interface/sparse_pack.hpp +++ b/src/interface/sparse_pack.hpp @@ -196,7 +196,8 @@ class SparsePack : public SparsePackBase { KOKKOS_INLINE_FUNCTION bool IsPhysicalBoundary(const int b, const int off3, const int off2, const int off1) const { - return block_props_(b, (off1 + 1) + 3 * ((off2 + 1) + 3 * (off3 + 1))) == bnd_flag; + return block_props_(b, (off1 + 1) + 3 * ((off2 + 1) + 3 * (off3 + 1))) == + physical_bnd_flag; } KOKKOS_INLINE_FUNCTION int GetGID(const int b) const { return block_props_(b, 27); } diff --git a/src/interface/sparse_pack_base.cpp b/src/interface/sparse_pack_base.cpp index 4fdc4e0db17c..d11d1df3ab9b 100644 --- a/src/interface/sparse_pack_base.cpp +++ b/src/interface/sparse_pack_base.cpp @@ -219,17 +219,23 @@ SparsePackBase SparsePackBase::Build(T *pmd, const PackDescriptor &desc, for (int oxb = -1; oxb <= 1; ++oxb) { for (int oxa = -1; oxa <= 1; ++oxa) { if (pmb->IsPhysicalBoundary(inner_x1)) - pack.block_props_h_(blidx, bp_idxer.GetFlatIdx(oxb, oxa, -1)) = bnd_flag; + pack.block_props_h_(blidx, bp_idxer.GetFlatIdx(oxb, oxa, -1)) = + physical_bnd_flag; if (pmb->IsPhysicalBoundary(outer_x1)) - pack.block_props_h_(blidx, bp_idxer.GetFlatIdx(oxb, oxa, 1)) = bnd_flag; + pack.block_props_h_(blidx, bp_idxer.GetFlatIdx(oxb, oxa, 1)) = + physical_bnd_flag; if (pmb->IsPhysicalBoundary(inner_x2)) - pack.block_props_h_(blidx, bp_idxer.GetFlatIdx(oxb, -1, oxa)) = bnd_flag; + pack.block_props_h_(blidx, bp_idxer.GetFlatIdx(oxb, -1, oxa)) = + physical_bnd_flag; if (pmb->IsPhysicalBoundary(outer_x2)) - pack.block_props_h_(blidx, bp_idxer.GetFlatIdx(oxb, 1, oxa)) = bnd_flag; + pack.block_props_h_(blidx, bp_idxer.GetFlatIdx(oxb, 1, oxa)) = + physical_bnd_flag; if (pmb->IsPhysicalBoundary(inner_x3)) - pack.block_props_h_(blidx, bp_idxer.GetFlatIdx(-1, oxb, oxa)) = bnd_flag; + pack.block_props_h_(blidx, bp_idxer.GetFlatIdx(-1, oxb, oxa)) = + physical_bnd_flag; if (pmb->IsPhysicalBoundary(outer_x3)) - pack.block_props_h_(blidx, bp_idxer.GetFlatIdx(1, oxb, oxa)) = bnd_flag; + pack.block_props_h_(blidx, bp_idxer.GetFlatIdx(1, oxb, oxa)) = + physical_bnd_flag; } } diff --git a/src/interface/sparse_pack_base.hpp b/src/interface/sparse_pack_base.hpp index d1d59caff844..9f03a98301d6 100644 --- a/src/interface/sparse_pack_base.hpp +++ b/src/interface/sparse_pack_base.hpp @@ -64,7 +64,7 @@ class SparsePackBase { using block_props_h_t = typename block_props_t::HostMirror; using coords_t = ParArray1DRaw>; - static constexpr int bnd_flag = -2000; + static constexpr int physical_bnd_flag = -2000; // Returns a SparsePackBase object that is either newly created or taken // from the cache in pmd. The cache itself handles the all of this logic