1#ifndef __MODEL_MONOD_HPP__
2#define __MODEL_MONOD_HPP__
4#include "mc/macros.hpp"
5#include "models/utils.hpp"
6#include <Kokkos_MathematicalConstants.hpp>
8#include <mc/prng/prng_extension.hpp>
9#include <mc/traits.hpp>
26 static constexpr std::size_t
n_var =
28 static constexpr std::string_view
name =
"monod";
45 KOKKOS_INLINE_FUNCTION
static void
47 [[maybe_unused]] std::size_t idx,
50 auto generator = random_pool.get_state();
55 static constexpr auto l_dist =
59 const auto l0 = l_dist.draw(generator);
61 random_pool.free_state(generator);
70 KOKKOS_INLINE_FUNCTION
static double
71 mass([[maybe_unused]] std::size_t idx,
80 [[maybe_unused]] std::size_t idx,
104 KOKKOS_INLINE_FUNCTION
static void
106 [[maybe_unused]] std::size_t idx,
107 [[maybe_unused]] std::size_t idx2,
115 GET_PROPERTY_FROM(idx2, buffer_arr,
particle_var::l) = new_current_length;
127 return {.begin = begin, .end = begin + 1};
130 static std::vector<std::string_view>
names()
pool_type pool_type
Definition prng.hpp:21
Status
Definition alias.hpp:49
Kokkos::Subview< KernelConcentrationType, int, decltype(Kokkos::ALL)> LocalConcentration
Definition alias.hpp:84
Kokkos::View< F *[Nd], Kokkos::LayoutRight > ParticlesModel
Definition alias.hpp:16
Models definition.
Definition config_loader.hpp:9
KOKKOS_INLINE_FUNCTION MC::Status check_div(const T l, const T lc)
Definition utils.hpp:18
KOKKOS_INLINE_FUNCTION consteval F c_linear_density(F rho, F d)
Definition utils.hpp:47
Represents a TruncatedNormal (Gaussian) probability distribution.
Definition prng_extension.hpp:277
MODEL_CONSTANT FloatType tau_meta
Definition monod.hpp:37
static KOKKOS_INLINE_FUNCTION void division(const MC::KPRNG::pool_type &random_pool, std::size_t idx, std::size_t idx2, const SelfParticle &arr, const SelfParticle &buffer_arr)
Definition monod.hpp:105
static constexpr std::string_view name
Definition monod.hpp:28
static MC::ContribIndexBounds get_bounds()
Definition monod.hpp:124
MODEL_CONSTANT FloatType d_m
Definition monod.hpp:41
static constexpr std::size_t n_var
Definition monod.hpp:26
static KOKKOS_INLINE_FUNCTION double mass(std::size_t idx, const SelfParticle &arr)
Definition monod.hpp:71
static KOKKOS_INLINE_FUNCTION void init(const MC::KPRNG::pool_type &random_pool, std::size_t idx, const SelfParticle &arr)
Definition monod.hpp:46
float FloatType
Definition monod.hpp:31
static std::vector< std::size_t > get_number()
Definition monod.hpp:137
static KOKKOS_INLINE_FUNCTION MC::Status update(const MC::KPRNG::pool_type &random_pool, FloatType d_t, std::size_t idx, const SelfParticle &arr, const MC::LocalConcentration &c)
Definition monod.hpp:78
MODEL_CONSTANT FloatType l_min_m
Definition monod.hpp:39
particle_var
Definition monod.hpp:17
@ l
Definition monod.hpp:18
@ phi_s_c
Definition monod.hpp:22
@ mu
Definition monod.hpp:20
@ l_max
Definition monod.hpp:19
@ __COUNT__
Definition monod.hpp:23
@ _init_only_cell_lenghtening
Definition monod.hpp:21
MODEL_CONSTANT FloatType lin_density
Definition monod.hpp:42
std::nullopt_t Config
Definition monod.hpp:33
MODEL_CONSTANT FloatType l_max_m
Definition monod.hpp:38
Monod Self
Definition monod.hpp:30
static std::vector< std::string_view > names()
Definition monod.hpp:130
MC::ParticlesModel< Self::n_var, Self::FloatType > SelfParticle
Definition monod.hpp:32
MODEL_CONSTANT FloatType k_s
Definition monod.hpp:40
MODEL_CONSTANT FloatType mu_max
Definition monod.hpp:36
MODEL_CONSTANT FloatType y_s_x
Definition monod.hpp:35
std::true_type uniform_weight
Definition monod.hpp:29