Skip to content

Commit

Permalink
chore: todos and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
yoctoyotta1024 committed Apr 11, 2024
1 parent c5655f3 commit e9782f7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
2 changes: 2 additions & 0 deletions docs/source/usage/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ simply :ref:`contact us<contact>`!

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
2 changes: 0 additions & 2 deletions docs/source/usage/requirements.rst
Original file line number Diff line number Diff line change
@@ -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 <contact>` or `open a new
Expand Down
2 changes: 1 addition & 1 deletion libs/cartesiandomain/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions libs/cartesiandomain/cartesianmotion_withreset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down
13 changes: 6 additions & 7 deletions libs/cartesiandomain/cartesianmotion_withreset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 <functional>
#include <random>

#include <Kokkos_Core.hpp>
#include <Kokkos_Pair.hpp>
#include <functional>
#include <random>

#include "../cleoconstants.hpp"
#include "../kokkosaliases.hpp"
Expand Down Expand Up @@ -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)};
Expand All @@ -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 {
Expand Down

0 comments on commit e9782f7

Please sign in to comment.