From e9782f78a4a15a8d38647cb4a2252695fbc9a991 Mon Sep 17 00:00:00 2001 From: "clara.bayley" Date: Thu, 11 Apr 2024 16:02:10 +0200 Subject: [PATCH] chore: todos and formatting --- docs/source/usage/contributing.rst | 2 ++ docs/source/usage/requirements.rst | 2 -- libs/cartesiandomain/CMakeLists.txt | 2 +- libs/cartesiandomain/cartesianmotion_withreset.cpp | 4 +--- libs/cartesiandomain/cartesianmotion_withreset.hpp | 13 ++++++------- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/docs/source/usage/contributing.rst b/docs/source/usage/contributing.rst index aa5456607..26f7b7482 100644 --- a/docs/source/usage/contributing.rst +++ b/docs/source/usage/contributing.rst @@ -9,3 +9,5 @@ simply :ref:`contact us`! We welcome your interest and are enthusiastic about both CLEO's computational development and its use for scientific research. + +TODO(CB) update with commit and code formating requirements diff --git a/docs/source/usage/requirements.rst b/docs/source/usage/requirements.rst index 2ea18e456..f943cdda5 100644 --- a/docs/source/usage/requirements.rst +++ b/docs/source/usage/requirements.rst @@ -1,8 +1,6 @@ Requirements ============ -TODO(CB) update requirements with formating of code? - The following requirements ensure CLEO's build, compilation and execution on DKRZ's Levante HPC. If they do not work, please :ref:`contact us ` or `open a new diff --git a/libs/cartesiandomain/CMakeLists.txt b/libs/cartesiandomain/CMakeLists.txt index 35a18f9c1..67d2fa43c 100644 --- a/libs/cartesiandomain/CMakeLists.txt +++ b/libs/cartesiandomain/CMakeLists.txt @@ -14,7 +14,7 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) set(SOURCES "cartesianmaps.cpp" "cartesianmotion.cpp" -#"cartesianmotion_withreset.cpp" # TODO(CB) decide to delete file +#"cartesianmotion_withreset.cpp" "createcartesianmaps.cpp" ) # must use STATIC (not(!) SHARED) lib for linking to executable if build is CUDA enabled with Kokkos diff --git a/libs/cartesiandomain/cartesianmotion_withreset.cpp b/libs/cartesiandomain/cartesianmotion_withreset.cpp index 1b3ba6619..f8860ff4d 100644 --- a/libs/cartesiandomain/cartesianmotion_withreset.cpp +++ b/libs/cartesiandomain/cartesianmotion_withreset.cpp @@ -9,7 +9,7 @@ * Author: Clara Bayley (CB) * Additional Contributors: * ----- - * Last Modified: Tuesday 9th April 2024 + * Last Modified: Thursday 11th April 2024 * Modified By: CB * ----- * License: BSD 3-Clause "New" or "Revised" License @@ -24,8 +24,6 @@ * the domain through coord3 domain boundaries */ -// TODO(CB) decide to delete file - #include "./cartesianmotion_withreset.hpp" KOKKOS_FUNCTION unsigned int change_to_backwards_coord3nghbr_withreset( diff --git a/libs/cartesiandomain/cartesianmotion_withreset.hpp b/libs/cartesiandomain/cartesianmotion_withreset.hpp index 65195cbc5..2326a9477 100644 --- a/libs/cartesiandomain/cartesianmotion_withreset.hpp +++ b/libs/cartesiandomain/cartesianmotion_withreset.hpp @@ -9,7 +9,7 @@ * Author: Clara Bayley (CB) * Additional Contributors: * ----- - * Last Modified: Wednesday 6th March 2024 + * Last Modified: Thursday 11th April 2024 * Modified By: CB * ----- * License: BSD 3-Clause "New" or "Revised" License @@ -24,16 +24,15 @@ * the domain through coord3 domain boundaries */ -// TODO(CB) decide to delete file +// TODO(CB) revisit and improve #ifndef LIBS_CARTESIANDOMAIN_CARTESIANMOTION_WITHRESET_HPP_ #define LIBS_CARTESIANDOMAIN_CARTESIANMOTION_WITHRESET_HPP_ -#include -#include - #include #include +#include +#include #include "../cleoconstants.hpp" #include "../kokkosaliases.hpp" @@ -169,7 +168,7 @@ struct ResetSuperdrop { /* returns xi given value of normalised probability distribution at radius and the bin width */ KOKKOS_FUNCTION uint64_t new_xi(const double gbxvol, const double log10rlow, - const double log10rup, const double radius) const { + const double log10rup, const double radius) const { constexpr double numconc = 100000000 * dlc::VOL0; // 100/cm^3, non-dimensionalised const auto rlow = double{Kokkos::pow(10.0, log10rlow)}; @@ -178,7 +177,7 @@ struct ResetSuperdrop { const auto prob = prob_distrib(radius, rlow, rup); const auto xi = double{prob * numconc * gbxvol}; - return (uint64_t) Kokkos::round(xi); + return (uint64_t)Kokkos::round(xi); } KOKKOS_FUNCTION unsigned int operator()(const CartesianMaps &gbxmaps, Superdrop &drop) const {