BioCMAMC-ST
|
Represents the spatial domain where Monte Carlo particles can exist. More...
#include <domain.hpp>
Public Types | |
using | n_cells_view_type = Kokkos::View<uint64_t*, ComputeSpace> |
Public Member Functions | |
ReactorDomain (const ReactorDomain &)=delete | |
ReactorDomain & | operator= (const ReactorDomain &)=delete |
ReactorDomain () | |
Default constructor. | |
ReactorDomain (ReactorDomain &&other) noexcept=default | |
Move constructor. | |
ReactorDomain (std::span< double > volumes, const NeighborsView< HostSpace > &_neighbors) | |
Main constructor. | |
~ReactorDomain ()=default | |
Default destructor. | |
ReactorDomain & | operator= (ReactorDomain &&other) noexcept |
Move assignment operator. | |
void | setVolumes (std::span< double const > volumes_liq) |
Set volume of liquid and gas of each compartment. | |
void | setLiquidNeighbors (const NeighborsView< HostSpace > &data) |
Update neigbors of compartments. | |
size_t | getNumberCompartments () const noexcept |
Return the number of compartment in the domain. | |
double | getTotalVolume () const noexcept |
Return total volume of domain. | |
ConstNeighborsView< ComputeSpace > | getNeighbors () const |
Return a const reference to neighbors. | |
void | in_place_reduce (std::span< const size_t > data, size_t original_size, size_t n_rank) |
template<class Archive > | |
void | save (Archive &ar) const |
template<class Archive > | |
void | load (Archive &ar) |
Static Public Member Functions | |
static ReactorDomain | reduce (std::span< const size_t > data, size_t original_size, size_t n_rank) |
Return a unique domain from data obtained with MPI gather. | |
Private Attributes | |
double | _total_volume = 0. |
Domain total volume. | |
size_t | id = 0 |
Domain ID. | |
size_t | size = 0 |
Number of compartment. | |
NeighborsView< ComputeSpace > | k_neighbor |
Represents the spatial domain where Monte Carlo particles can exist.
The ReactorDomain
class models a spatial domain using a compartment-based approach. Each compartment within the domain holds and manages its own state through an instance of ContainerState
. The compartments collectively represent the entire spatial domain in which particles interact, move, and evolve according to Monte Carlo simulations.
The ReactorDomain
class is responsible for maintaining the structure and state of the compartments, and for providing access to the compartments for simulation and modeling purposes.
ContainerState
. using MC::ReactorDomain::n_cells_view_type = Kokkos::View<uint64_t*, ComputeSpace> |
|
delete |
MC::ReactorDomain::ReactorDomain | ( | ) |
Default constructor.
|
defaultnoexcept |
Move constructor.
MC::ReactorDomain::ReactorDomain | ( | std::span< double > | volumes, |
const NeighborsView< HostSpace > & | _neighbors ) |
Main constructor.
|
default |
Default destructor.
|
inlinenodiscard |
Return a const reference to neighbors.
|
inlinenodiscardnoexcept |
Return the number of compartment in the domain.
|
inlinenodiscardnoexcept |
Return total volume of domain.
void MC::ReactorDomain::in_place_reduce | ( | std::span< const size_t > | data, |
size_t | original_size, | ||
size_t | n_rank ) |
|
inline |
|
delete |
|
noexcept |
Move assignment operator.
|
static |
Return a unique domain from data obtained with MPI gather.
|
inline |
void MC::ReactorDomain::setLiquidNeighbors | ( | const NeighborsView< HostSpace > & | data | ) |
Update neigbors of compartments.
void MC::ReactorDomain::setVolumes | ( | std::span< double const > | volumes_liq | ) |
Set volume of liquid and gas of each compartment.
|
private |
Domain total volume.
|
private |
Domain ID.
|
private |
|
private |
Number of compartment.