BioCMAMC-ST
CommonModelType Concept Reference

Concept to define a correct Model. More...

#include <traits.hpp>

Concept definition

template<typename T, typename ViewType>
concept CommonModelType = requires(T model,
T::FloatType d_t,
std::size_t idx,
std::size_t idx2,
double weight,
const T::SelfParticle& arr,
const T::SelfParticle& buffer_arr,
std::size_t position,
const MC::ContributionView& contributions,
const MC::KPRNG::pool_type& random_pool,
const T::Config& config) {
{
T::n_var
} -> std::convertible_to<std::size_t>;
typename T::FloatType;
typename T::SelfParticle;
typename T::Self;
typename T::Config;
requires ConfigurableInit<T> || (std::is_same_v<typename T::Config, std::nullopt_t> && NonConfigurableInit<T>);
{ T::mass(idx, arr) } -> std::same_as<double>;
{
T::update(random_pool, d_t, idx, arr, c)
} -> std::convertible_to<MC::Status>;
{
T::contribution(idx, position, weight, arr, contributions)
} -> std::same_as<void>;
{
T::division(random_pool, idx, idx2, arr, buffer_arr)
} -> std::same_as<void>;
}
Kokkos::Random_XorShift1024_Pool< Kokkos::DefaultExecutionSpace > pool_type
Definition prng.hpp:17
Concept to define a correct Model.
Definition traits.hpp:64
Definition traits.hpp:41
Definition traits.hpp:20
Definition traits.hpp:50
Kokkos::Subview< KernelConcentrationType, int, decltype(Kokkos::ALL)> LocalConcentration
Definition alias.hpp:42
Kokkos::Experimental::ScatterView< double **, Kokkos::LayoutRight > ContributionView
Definition alias.hpp:31

Detailed Description

Concept to define a correct Model.

Minimum model definition should validate this contract, the behaviour behind each function can vary but the order and signature should be the same