BioCMAMC-ST
|
Main owning object for Monte-Carlo particles. More...
#include <particles_container.hpp>
Public Types | |
using | UsedModel = Model |
Alias for the model used by the container. | |
Public Member Functions | |
ParticlesContainer (std::size_t n_particle) | |
ParticlesContainer () | |
ParticlesContainer (const ParticlesContainer &)=default | |
Default copy and move constructors and assignment operators. | |
ParticlesContainer (ParticlesContainer &&)=default | |
ParticlesContainer & | operator= (const ParticlesContainer &)=default |
ParticlesContainer & | operator= (ParticlesContainer &&)=default |
~ParticlesContainer ()=default | |
Default destructor. | |
KOKKOS_INLINE_FUNCTION std::size_t | n_particles () const |
Gets the number of particles in the container. | |
KOKKOS_INLINE_FUNCTION void | get_contributions (std::size_t idx, const ContributionView &contributions) const |
KOKKOS_INLINE_FUNCTION bool | handle_division (const MC::KPRNG::pool_type &random_pool, std::size_t idx1) const |
void | clean_dead (std::size_t to_remove) |
void | merge_buffer () |
auto | get_buffer_index () const |
template<class Archive > | |
void | save (Archive &ar) const |
template<class Archive > | |
void | load (Archive &ar) |
KOKKOS_INLINE_FUNCTION double | get_weight (std::size_t idx) const |
double | get_allocation_factor () const |
std::size_t | capacity () const |
Public Attributes | |
Model::SelfParticle | model |
MC::ParticlePositions | position |
MC::ParticleStatus | status |
ParticleWeigths | weights |
Static Public Attributes | |
static constexpr double | buffer_ratio = 0.6 |
Private Member Functions | |
void | __allocate__ (std::size_t new_size) |
void | __allocate_buffer__ () |
void | __shrink__ (std::size_t new_size, bool force) |
Private Attributes | |
Model::SelfParticle | buffer_model |
ParticlePositions | buffer_position |
Kokkos::View< uint64_t, Kokkos::SharedSpace > | buffer_index |
double | allocation_factor |
std::size_t | n_allocated_elements |
uint64_t | n_used_elements |
Static Private Attributes | |
static constexpr double | default_allocation_factor = 2 |
Main owning object for Monte-Carlo particles.
This class is responsible for managing and owning containers related to particles, providing access to them for processing in a Monte-Carlo simulation. It uses a templated model to define the behavior and properties of the particles.
Model | The particle model type used for defining the behavior and properties of the particles. |
using MC::ParticlesContainer< Model >::UsedModel = Model |
Alias for the model used by the container.
|
explicit |
MC::ParticlesContainer< M >::ParticlesContainer | ( | ) |
|
default |
Default copy and move constructors and assignment operators.
|
default |
|
default |
Default destructor.
|
private |
|
private |
|
private |
|
inlinenodiscard |
void MC::ParticlesContainer< M >::clean_dead | ( | std::size_t | to_remove | ) |
|
inlinenodiscard |
|
inlinenodiscard |
KOKKOS_INLINE_FUNCTION void MC::ParticlesContainer< M >::get_contributions | ( | std::size_t | idx, |
const ContributionView & | contributions ) const |
|
nodiscard |
|
nodiscard |
|
inline |
void MC::ParticlesContainer< Model >::merge_buffer | ( | ) |
|
inlinenodiscard |
Gets the number of particles in the container.
|
default |
|
default |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
staticconstexpr |
|
staticconstexprprivate |
Model::SelfParticle MC::ParticlesContainer< Model >::model |
|
private |
|
private |
MC::ParticlePositions MC::ParticlesContainer< Model >::position |
MC::ParticleStatus MC::ParticlesContainer< Model >::status |
ParticleWeigths MC::ParticlesContainer< Model >::weights |