1#ifndef __SIMULATION_PROBA_LEAVING_HPP__
2#define __SIMULATION_PROBA_LEAVING_HPP__
4#include <Kokkos_Assert.hpp>
5#include <Kokkos_Core.hpp>
6#include <common/maths.hpp>
16 template <
typename FastSample = precision_tag>
17 KOKKOS_INLINE_FUNCTION
bool
23 KOKKOS_ASSERT(random_number >= 0. && random_number <= 1.);
24 KOKKOS_ASSERT(volume >= 0.);
25 KOKKOS_ASSERT(flow >= 0.);
26 KOKKOS_ASSERT(dt >= 0.);
34 KOKKOS_INLINE_FUNCTION
bool
40 KOKKOS_ASSERT(random_number >= 0. && random_number <= 1.);
41 KOKKOS_ASSERT(volume >= 0.);
42 KOKKOS_ASSERT(flow >= 0.);
43 KOKKOS_ASSERT(dt >= 0.);
45 return (dt * flow / volume) > random_number;
KOKKOS_INLINE_FUNCTION float _ln(float x)
Definition maths.hpp:11
Definition kernels.hpp:16
static constexpr bool _use_kokkos_log
Definition probability_leaving.hpp:14
KOKKOS_INLINE_FUNCTION bool probability_leaving(float random_number, double volume, double flow, double dt)
Definition probability_leaving.hpp:18
void fast_tag
Definition probability_leaving.hpp:11
int precision_tag
Definition probability_leaving.hpp:12
KOKKOS_INLINE_FUNCTION bool probability_leaving< fast_tag >(float random_number, double volume, double flow, double dt)
Definition probability_leaving.hpp:35