|
BioCMAMC-ST
|
Main owning object for Monte-Carlo particles. More...
#include <particles_container.hpp>
Public Types | |
| using | UsedModel = Model |
Public Member Functions | |
| ParticlesContainer (std::size_t n_particle, bool virtual_position=false) | |
| Alias for the model used by the container. | |
| 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. | |
| template<typename CviewType> | |
| KOKKOS_INLINE_FUNCTION void | get_contributions (std::size_t idx, const CviewType &contributions) const |
| KOKKOS_INLINE_FUNCTION bool | handle_division (const MC::KPRNG::pool_type &random_pool, std::size_t idx1) const |
| KOKKOS_INLINE_FUNCTION double | get_weight (std::size_t idx) const |
| void | force_remove_dead () |
| void | merge_buffer () |
| auto | get_buffer_index () const |
| template<class Archive> | |
| void | save (Archive &ar) const |
| template<class Archive> | |
| void | load (Archive &ar) |
| double | get_allocation_factor () const |
| std::size_t | capacity () const |
| std::size_t | get_inactive () const |
| std::size_t | update_and_clean_dead (std::size_t out, std::size_t dead, std::size_t threshold) |
| KOKKOS_INLINE_FUNCTION std::size_t | n_particles () const |
| Gets the number of particles in the container. | |
| void | clean_dead (std::size_t to_remove) |
Public Attributes | |
| Model::SelfParticle | model |
| MC::ParticlePositions | position |
| MC::ParticleStatus | status |
| ParticleWeigths | weights |
| ParticleAges | ages |
Static Public Attributes | |
| static constexpr double | buffer_ratio |
Private Member Functions | |
| void | __allocate_buffer__ () |
| void | _resize (std::size_t new_size, bool force=false) |
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 |
| std::size_t | inactive_counter = 0 |
| bool | flag_virtual_position = false |
| int | begin |
| int | end |
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 |
|
explicit |
Alias for the model used by the container.
| MC::ParticlesContainer< M >::ParticlesContainer | ( | ) |
|
default |
Default copy and move constructors and assignment operators.
|
default |
|
default |
Default destructor.
|
private |
|
private |
|
nodiscard |
| void MC::ParticlesContainer< M >::clean_dead | ( | std::size_t | to_remove | ) |
| void MC::ParticlesContainer< Model >::force_remove_dead | ( | ) |
|
nodiscard |
|
nodiscard |
|
inline |
|
nodiscard |
|
nodiscard |
|
nodiscard |
| void MC::ParticlesContainer< Model >::load | ( | Archive & | ar | ) |
| void MC::ParticlesContainer< Model >::merge_buffer | ( | ) |
|
nodiscard |
Gets the number of particles in the container.
|
default |
|
default |
| void MC::ParticlesContainer< Model >::save | ( | Archive & | ar | ) | const |
| std::size_t MC::ParticlesContainer< Model >::update_and_clean_dead | ( | std::size_t | out, |
| std::size_t | dead, | ||
| std::size_t | threshold ) |
| ParticleAges MC::ParticlesContainer< Model >::ages |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticconstexpr |
Buffer size = ceil(list.size()*buffer_ratio), 0.6 is fine for high division rate or stiff increase to 1
|
staticconstexprprivate |
|
private |
|
private |
|
private |
| 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 |