diff --git a/libs/cartesiandomain/cartesianmaps.cpp b/libs/cartesiandomain/cartesianmaps.cpp index 4ca764d63..88313938f 100644 --- a/libs/cartesiandomain/cartesianmaps.cpp +++ b/libs/cartesiandomain/cartesianmaps.cpp @@ -1,4 +1,6 @@ -/* Copyright (c) 2023 MPI-M, Clara Bayley +/* + * Copyright (c) 2024 MPI-M, Clara Bayley + * * * ----- CLEO ----- * File: cartesianmaps.cpp @@ -7,7 +9,7 @@ * Author: Clara Bayley (CB) * Additional Contributors: * ----- - * Last Modified: Thursday 9th November 2023 + * Last Modified: Wednesday 1st May 2024 * Modified By: CB * ----- * License: BSD 3-Clause "New" or "Revised" License @@ -31,10 +33,8 @@ size_t CartesianMaps::maps_size() const { to_coord2bounds.size() != sz || to_back_coord3nghbr.size() != sz || to_forward_coord3nghbr.size() != sz || to_back_coord1nghbr.size() != sz || to_forward_coord1nghbr.size() != sz || to_back_coord2nghbr.size() != sz || - to_forward_coord2nghbr.size() != sz) { - throw std::invalid_argument( - "gridbox maps are not" - " all the same size"); + to_forward_coord2nghbr.size() != sz || to_area.size() != sz || to_volume.size() != sz) { + throw std::invalid_argument("gridbox maps are not all the same size"); } return sz; diff --git a/libs/cartesiandomain/cartesianmaps.hpp b/libs/cartesiandomain/cartesianmaps.hpp index 9acd034b0..22c3264dd 100644 --- a/libs/cartesiandomain/cartesianmaps.hpp +++ b/libs/cartesiandomain/cartesianmaps.hpp @@ -18,7 +18,6 @@ * File Description: */ - /* Copyright (c) 2023 MPI-M, Clara Bayley * * ----- CLEO ----- @@ -225,18 +224,18 @@ struct CartesianMaps { KOKKOS_INLINE_FUNCTION size_t get_ndim(const unsigned int d) const { return ndims(d); } - /* returns horizontal (x-y planar) area of gridbox with index 'gbxindex' on device */ + /* returns horizontal (x-y planar) area of gridbox with index 'gbxidx' on device */ KOKKOS_INLINE_FUNCTION - double get_gbxarea(const unsigned int gbxindex) const { - const auto i(to_area.find(gbxindex)); // index in map of key 'gbxindex' + double get_gbxarea(const unsigned int gbxidx) const { + const auto i(to_area.find(gbxidx)); // index in map of key 'gbxindex' return to_area.value_at(i); // value returned by map at index i } - /* returns volume of gridbox with index 'gbxindex' on device */ + /* returns volume of gridbox with index 'gbxidx' on device */ KOKKOS_INLINE_FUNCTION - double get_gbxvolume(const unsigned int gbxindex) const { - const auto i(to_volume.find(gbxindex)); // index in map of key 'gbxindex' + double get_gbxvolume(const unsigned int gbxidx) const { + const auto i(to_volume.find(gbxidx)); // index in map of key 'gbxindex' return to_volume.value_at(i); // value returned by map at index i } diff --git a/libs/kokkosaliases.hpp b/libs/kokkosaliases.hpp index e03909cd3..bca281e48 100644 --- a/libs/kokkosaliases.hpp +++ b/libs/kokkosaliases.hpp @@ -1,4 +1,6 @@ -/* Copyright (c) 2023 MPI-M, Clara Bayley +/* + * Copyright (c) 2024 MPI-M, Clara Bayley + * * * ----- CLEO ----- * File: kokkosaliases.hpp @@ -7,7 +9,7 @@ * Author: Clara Bayley (CB) * Additional Contributors: * ----- - * Last Modified: Thursday 2nd November 2023 + * Last Modified: Wednesday 1st May 2024 * Modified By: CB * ----- * License: BSD 3-Clause "New" or "Revised" License @@ -20,8 +22,6 @@ #ifndef LIBS_KOKKOSALIASES_HPP_ #define LIBS_KOKKOSALIASES_HPP_ -#include - #include #include #include @@ -43,9 +43,9 @@ using viewd_gbx = dualview_gbx::t_dev; // view in device memory of gr using viewd_constgbx = dualview_constgbx::t_dev; // view in device memory of const gridboxes /* Gridbox Maps */ -using viewd_ndims = - Kokkos::View; // view in device memory for number of gridboxes in CartesianMaps +using viewd_ndims = Kokkos::View; using kokkos_pairmap = Kokkos::UnorderedMap, ExecSpace>; +using kokkos_dblmap = Kokkos::UnorderedMap; using kokkos_uintmap = Kokkos::UnorderedMap; #endif // LIBS_KOKKOSALIASES_HPP_