|
BioCMAMC-ST
|
Namespace that contains classes and structures related to Monte Carlo (MC) simulations. More...
Namespaces | |
| namespace | Distributions |
| Kokkos compatible method to draw from specific probability distribution. | |
Classes | |
| struct | ContribIndexBounds |
| struct | DomainState |
| Structure to store information about domain needed during MC cycle data is likely to change between each iteration. More... | |
| struct | EventContainer |
| Use to count events that occurs during Monte-Carlo processing cycles. More... | |
| class | KPRNG |
| Utilities and wrap around kokkos random generator. More... | |
| struct | LeavingFlow |
| Store position and value of volumic flow at outlet. More... | |
| struct | MonteCarloUnit |
| General-purpose Monte Carlo unit to carry out simulations. More... | |
| class | ParticlesContainer |
| Main owning object for Monte-Carlo particles. More... | |
| class | ReactorDomain |
| Represents the spatial domain where Monte Carlo particles can exist. More... | |
| struct | RuntimeParameters |
Typedefs | |
| template<uint64_t Nd, FloatingPointType F> | |
| using | ParticlesModel = Kokkos::View<F* [Nd], Kokkos::LayoutRight> |
| template<FloatingPointType F> | |
| using | DynParticlesModel = Kokkos::View<F**, Kokkos::LayoutRight> |
| using | ComputeSpace = Kokkos::DefaultExecutionSpace |
| using | HostSpace = Kokkos::DefaultHostExecutionSpace |
| template<typename ExecSpace> | |
| using | gen_pool_type = Kokkos::Random_XorShift1024_Pool<ExecSpace> |
| using | pool_type = gen_pool_type<Kokkos::DefaultExecutionSpace> |
| using | generator_type = pool_type::generator_type |
| using | restrict_mt = Kokkos::MemoryTraits<Kokkos::MemoryTraitsFlags::Restrict> |
| using | ParticlePositions = Kokkos::View<uint64_t*, ComputeSpace> |
| using | ParticleStatus = Kokkos::View<Status*, ComputeSpace> |
| using | ParticleWeigths = Kokkos::View<double*, ComputeSpace> |
| using | ParticleAges = ParticleAgesBase<ComputeSpace> |
| using | ParticleSamples |
| template<typename MemorySpace> | |
| using | ParticlePropertyViewType = Kokkos::View<double**, Kokkos::LayoutRight, MemorySpace> |
| using | PropertySubViewtype |
| using | ContributionView |
| using | KernelConcentrationType |
| using | LocalConcentration = Kokkos::Subview<KernelConcentrationType, int, decltype(Kokkos::ALL)> |
| template<class ExecSpace, bool is_const> | |
| using | VolumeView |
| template<class ExecSpace, bool is_const> | |
| using | DiagonalView |
| template<bool is_const> | |
| using | LeavingFlowView |
| template<class ExecSpace, bool is_const> | |
| using | CumulativeProbabilityView |
| template<class ExecSpace, bool is_const> | |
| using | NeighborsView |
Enumerations | |
| enum class | Status : char { Idle = 0 , Division , Exit , Dead } |
| enum class | EventType : char { NewParticle = 0 , Exit , Move , Death , Overflow , ChangeWeight , __COUNT__ } |
| Enumeration that represents events that can occurs during a Monte-Carlo cycle. More... | |
Functions | |
| template<EventType event> | |
| KOKKOS_INLINE_FUNCTION consteval size_t | event_index () |
| inline getter, converts event to its value in order to be use as array index | |
| void | impl_init (double &total_mass, uint64_t n_particles, MonteCarloUnit &unit, AutoGenerated::ContainerVariant &&container, bool uniform_init) |
| template<ModelType Model> | |
| std::unique_ptr< MonteCarloUnit > | init (const std::shared_ptr< IO::Logger > &_logger, uint64_t n_particles, std::size_t n_samples, std::span< double > volumes, std::span< const size_t > _neighbors, bool uniform_mc_init, double &total_mass) |
| Helper function to initialize a MonteCarloUnit. | |
| void | post_init_weight (std::unique_ptr< MonteCarloUnit > &unit, double x0, double total_mass) |
| pool_type | get_pool (std::size_t seed=0) |
| KOKKOS_INLINE_FUNCTION auto | sample_random_variables (const pool_type &pool, auto &&functor) |
| RuntimeParameters | load_tuning_constant () |
Variables | |
| constexpr size_t | number_event_type |
Namespace that contains classes and structures related to Monte Carlo (MC) simulations.
This namespace encapsulates all the components used in Monte Carlo simulations, including data structures for managing simulation state and results.
| using MC::ComputeSpace = Kokkos::DefaultExecutionSpace |
| using MC::ContributionView |
| using MC::CumulativeProbabilityView |
| using MC::DiagonalView |
| using MC::DynParticlesModel = Kokkos::View<F**, Kokkos::LayoutRight> |
| using MC::gen_pool_type = Kokkos::Random_XorShift1024_Pool<ExecSpace> |
| using MC::generator_type = pool_type::generator_type |
| using MC::HostSpace = Kokkos::DefaultHostExecutionSpace |
| using MC::LeavingFlowView |
| using MC::LocalConcentration = Kokkos::Subview<KernelConcentrationType, int, decltype(Kokkos::ALL)> |
| using MC::NeighborsView |
| using MC::ParticleAges = ParticleAgesBase<ComputeSpace> |
| using MC::ParticlePositions = Kokkos::View<uint64_t*, ComputeSpace> |
| using MC::ParticlePropertyViewType = Kokkos::View<double**, Kokkos::LayoutRight, MemorySpace> |
| using MC::ParticleSamples |
| using MC::ParticlesModel = Kokkos::View<F* [Nd], Kokkos::LayoutRight> |
| using MC::ParticleStatus = Kokkos::View<Status*, ComputeSpace> |
| using MC::ParticleWeigths = Kokkos::View<double*, ComputeSpace> |
| using MC::pool_type = gen_pool_type<Kokkos::DefaultExecutionSpace> |
| using MC::PropertySubViewtype |
| using MC::restrict_mt = Kokkos::MemoryTraits<Kokkos::MemoryTraitsFlags::Restrict> |
| using MC::VolumeView |
|
strong |
|
strong |
| Enumerator | |
|---|---|
| Idle | |
| Division | |
| Exit | |
| Dead | |
|
consteval |
inline getter, converts event to its value in order to be use as array index
| pool_type MC::get_pool | ( | std::size_t | seed = 0 | ) |
| void MC::impl_init | ( | double & | total_mass, |
| uint64_t | n_particles, | ||
| MonteCarloUnit & | unit, | ||
| AutoGenerated::ContainerVariant && | container, | ||
| bool | uniform_init ) |
| std::unique_ptr< MonteCarloUnit > MC::init | ( | const std::shared_ptr< IO::Logger > & | _logger, |
| uint64_t | n_particles, | ||
| std::size_t | n_samples, | ||
| std::span< double > | volumes, | ||
| std::span< const size_t > | _neighbors, | ||
| bool | uniform_mc_init, | ||
| double & | total_mass ) |
Helper function to initialize a MonteCarloUnit.
Since MonteCarloUnit is not a generic type and the model type is resolved at runtime, no constructors are defined to avoid carrying template functions when using the unit. This function wraps the constructor externally, providing a convenient way to initialize a MonteCarloUnit with the appropriate model type and parameters.
| Model | The particle model type, specified at compile time. |
| RuntimeParameters MC::load_tuning_constant | ( | ) |
| void MC::post_init_weight | ( | std::unique_ptr< MonteCarloUnit > & | unit, |
| double | x0, | ||
| double | total_mass ) |
| KOKKOS_INLINE_FUNCTION auto MC::sample_random_variables | ( | const pool_type & | pool, |
| auto && | functor ) |
|
constexpr |