From 69050e030ba101a2dd386fd7199c7e9f2448d42f Mon Sep 17 00:00:00 2001 From: Juhana Lankinen Date: Tue, 12 Nov 2024 08:31:40 +0200 Subject: [PATCH] Remove unused function; Redirect function to a newer version --- src/grid.hpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/grid.hpp b/src/grid.hpp index 7a64b15..5d3a17a 100644 --- a/src/grid.hpp +++ b/src/grid.hpp @@ -317,11 +317,6 @@ template class FsGrid { std::vector& getData() { return data; } const std::vector& getData() const { return data; } - void copyData(FsGrid& other) { - // Copy assignment - data = other.getData(); - } - bool localIdInBounds(LocalID id) const { return 0 <= id && (size_t)id < data.size(); } T* get(LocalID id) { @@ -430,7 +425,7 @@ template class FsGrid { /*! Perform ghost cell communication. */ - void updateGhostCells() { + template void updateGhostCells(D& data) { if (rank == -1) { return; } @@ -468,6 +463,8 @@ template class FsGrid { "Synchronization at ghost cell update failed"); } + void updateGhostCells() { updateGhostCells(data); } + /*! Perform an MPI_Allreduce with this grid's internal communicator * Function syntax is identical to MPI_Allreduce, except the final (communicator * argument will not be needed) */ @@ -491,10 +488,9 @@ template class FsGrid { * \return a task for the grid's cartesian communicator */ Task_t getTaskForGlobalID(GlobalID id) const { - const auto taskIndex = coordinates.globalIdToTaskPos(id); + const auto taskPos = coordinates.globalIdToTaskPos(id); Task_t taskID = -1; - FSGRID_MPI_CHECK(MPI_Cart_rank(comm3d, taskIndex.data(), &taskID), "Unable to find FsGrid rank for global ID ", - id); + FSGRID_MPI_CHECK(MPI_Cart_rank(comm3d, taskPos.data(), &taskID), "Unable to find FsGrid rank for global ID ", id); return taskID; }