diff --git a/src/grid.hpp b/src/grid.hpp index ada0d5e..921294b 100644 --- a/src/grid.hpp +++ b/src/grid.hpp @@ -638,17 +638,14 @@ template class FsGrid { /*! Get the size of the local domain handled by this grid. */ - std::array& getLocalSize() { return localSize; } const std::array& getLocalSize() const { return localSize; } /*! Get the start coordinates of the local domain handled by this grid. */ - std::array& getLocalStart() { return localStart; } const std::array& getLocalStart() const { return localStart; } /*! Get global size of the fsgrid domain */ - std::array& getGlobalSize() { return globalSize; } const std::array& getGlobalSize() const { return globalSize; } /*! Get the rank of this CPU in the FsGrid communicator */ @@ -658,11 +655,9 @@ template class FsGrid { Task_t getSize() const { return numTasksPerDim[0] * numTasksPerDim[1] * numTasksPerDim[2]; } /*! Get in which directions, if any, this grid is periodic */ - std::array& getPeriodic() { return periodic; } const std::array& getPeriodic() const { return periodic; } /*! Get the decomposition array*/ - std::array& getDecomposition() { return numTasksPerDim; } const std::array& getDecomposition() const { return numTasksPerDim; } // ============================ @@ -1153,30 +1148,30 @@ template class FsGrid { //!< Physical coordinate space start. const std::array physicalGlobalStart = {}; //!< Global size of the simulation space, in cells - std::array globalSize = {}; + const std::array globalSize = {}; //!< Number of tasks in each direction - std::array numTasksPerDim = {}; + const std::array numTasksPerDim = {}; //!< Information about whether a given direction is periodic - std::array periodic = {}; + const std::array periodic = {}; //! MPI Cartesian communicator used in this grid MPI_Comm comm3d = MPI_COMM_NULL; //!< This task's rank in the communicator - int32_t rank = 0; + const int32_t rank = 0; //!< Local size of simulation space handled by this task (without ghost cells) - std::array localSize = {}; + const std::array localSize = {}; //!< Offset of the local coordinate system against the global one - std::array localStart = {}; + const std::array localStart = {}; //!< Local size of simulation space handled by this task (including ghost cells) - std::array storageSize = {}; + const std::array storageSize = {}; //!< Lookup table from index to rank in the neighbour array (includes self) - std::array neighbourIndexToRank = { + const std::array neighbourIndexToRank = { MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, MPI_PROC_NULL, }; //!< Lookup table from rank to index in the neighbour array - std::vector neighbourRankToIndex = {}; + const std::vector neighbourRankToIndex = {}; //! Actual storage of field data std::vector data = {}; //!< Datatype for sending data