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 | EventContainer |
Use to count events that occurs during Monte-Carlo processing cycles. More... | |
class | KPRNG |
Utilities and wrap around kokkos random generator. 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... | |
Typedefs | |
using | ParticlePositions = Kokkos::View<uint64_t*, ComputeSpace> |
using | ParticleStatus = Kokkos::View<Status*, ComputeSpace> |
using | ParticleWeigths = Kokkos::View<double*, ComputeSpace> |
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<typename Space > | |
using | NeighborsView |
template<uint64_t Nd, FloatingPointType F> | |
using | ParticlesModel = Kokkos::View<F* [Nd]> |
template<FloatingPointType F> | |
using | DynParticlesModel = Kokkos::View<F**> |
Enumerations | |
enum class | Status : int { Idle = 0 , Division , Exit , Dead } |
enum class | EventType : char { ChangeWeight = 0 , NewParticle , Death , Move , Exit , Overflow , __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) |
template<ModelType Model> | |
std::unique_ptr< MonteCarloUnit > | init (uint64_t n_particles, std::span< double > volumes, const NeighborsView< HostSpace > &neighbors, double &total_mass) |
Helper function to initialize a MonteCarloUnit. | |
void | post_init_weight (std::unique_ptr< MonteCarloUnit > &unit, double x0, double total_mass) |
template<typename FunctorType > | |
Kokkos::TeamPolicy< ComputeSpace > | get_policy (FunctorType &f, std::size_t range, bool reduce=false) |
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::ContributionView |
Contribution inside the particle's current container
using MC::DynParticlesModel = Kokkos::View<F**> |
using MC::LocalConcentration = Kokkos::Subview<KernelConcentrationType, int, decltype(Kokkos::ALL)> |
using MC::NeighborsView |
using MC::ParticlePositions = Kokkos::View<uint64_t*, ComputeSpace> |
using MC::ParticlePropertyViewType = Kokkos::View<double**, Kokkos::LayoutRight, MemorySpace> |
using MC::ParticlesModel = Kokkos::View<F* [Nd]> |
using MC::ParticleStatus = Kokkos::View<Status*, ComputeSpace> |
using MC::ParticleWeigths = Kokkos::View<double*, ComputeSpace> |
using MC::PropertySubViewtype |
|
strong |
|
strong |
|
consteval |
inline getter, converts event to its value in order to be use as array index
Kokkos::TeamPolicy< ComputeSpace > MC::get_policy | ( | FunctorType & | f, |
std::size_t | range, | ||
bool | reduce = false ) |
void MC::impl_init | ( | double & | total_mass, |
uint64_t | n_particles, | ||
MonteCarloUnit & | unit, | ||
AutoGenerated::ContainerVariant && | container ) |
std::unique_ptr< MonteCarloUnit > MC::init | ( | uint64_t | n_particles, |
std::span< double > | volumes, | ||
const NeighborsView< HostSpace > & | neighbors, | ||
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. |
void MC::post_init_weight | ( | std::unique_ptr< MonteCarloUnit > & | unit, |
double | x0, | ||
double | total_mass ) |
|
constexpr |