diff --git a/src/overset/TiogaSTKIface.C b/src/overset/TiogaSTKIface.C index 849dabcfd..3fbbb8837 100644 --- a/src/overset/TiogaSTKIface.C +++ b/src/overset/TiogaSTKIface.C @@ -208,27 +208,19 @@ TiogaSTKIface::reset_data_structures() void TiogaSTKIface::update_ghosting() { - stk::mesh::Ghosting* ovsetGhosting = oversetManager_.oversetGhosting_; std::vector recvGhostsToRemove; - if (ovsetGhosting != nullptr) { - stk::mesh::EntityProcVec currentSendGhosts; - ovsetGhosting->send_list(currentSendGhosts); - - sierra::nalu::compute_precise_ghosting_lists( - bulk_, elemsToGhost_, currentSendGhosts, recvGhostsToRemove); - } - size_t local[2] = {elemsToGhost_.size(), recvGhostsToRemove.size()}; size_t global[2] = {0, 0}; stk::all_reduce_sum(bulk_.parallel(), local, global, 2); if ((global[0] > 0) || (global[1] > 0)) { bulk_.modification_begin(); - if (ovsetGhosting == nullptr) { - const std::string ghostName = "nalu_overset_ghosting"; - oversetManager_.oversetGhosting_ = &(bulk_.create_ghosting(ghostName)); + if (oversetManager_.oversetGhosting_ != nullptr) { + bulk_.destroy_ghosting(*oversetManager_.oversetGhosting_); } + const std::string ghostName = "nalu_overset_ghosting"; + oversetManager_.oversetGhosting_ = &(bulk_.create_ghosting(ghostName)); bulk_.change_ghosting( *(oversetManager_.oversetGhosting_), elemsToGhost_, recvGhostsToRemove); bulk_.modification_end();