BioCMAMC-ST
MC::ReactorDomain Class Reference

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
ReactorDomainoperator= (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.
ReactorDomainoperator= (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< ComputeSpacegetNeighbors () 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< ComputeSpacek_neighbor

Detailed Description

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.

  • The domain is partitioned into multiple compartments, each represented by a ContainerState.
    See also
    ContainerState

Member Typedef Documentation

◆ n_cells_view_type

using MC::ReactorDomain::n_cells_view_type = Kokkos::View<uint64_t*, ComputeSpace>

Constructor & Destructor Documentation

◆ ReactorDomain() [1/4]

MC::ReactorDomain::ReactorDomain ( const ReactorDomain & )
delete
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReactorDomain() [2/4]

MC::ReactorDomain::ReactorDomain ( )

Default constructor.

◆ ReactorDomain() [3/4]

MC::ReactorDomain::ReactorDomain ( ReactorDomain && other)
defaultnoexcept

Move constructor.

Here is the call graph for this function:

◆ ReactorDomain() [4/4]

MC::ReactorDomain::ReactorDomain ( std::span< double > volumes,
const NeighborsView< HostSpace > & _neighbors )

Main constructor.

Here is the call graph for this function:

◆ ~ReactorDomain()

MC::ReactorDomain::~ReactorDomain ( )
default

Default destructor.

Here is the call graph for this function:

Member Function Documentation

◆ getNeighbors()

ConstNeighborsView< ComputeSpace > MC::ReactorDomain::getNeighbors ( ) const
inlinenodiscard

Return a const reference to neighbors.

Here is the caller graph for this function:

◆ getNumberCompartments()

size_t MC::ReactorDomain::getNumberCompartments ( ) const
inlinenodiscardnoexcept

Return the number of compartment in the domain.

Here is the caller graph for this function:

◆ getTotalVolume()

double MC::ReactorDomain::getTotalVolume ( ) const
inlinenodiscardnoexcept

Return total volume of domain.

Here is the caller graph for this function:

◆ in_place_reduce()

void MC::ReactorDomain::in_place_reduce ( std::span< const size_t > data,
size_t original_size,
size_t n_rank )
Here is the caller graph for this function:

◆ load()

template<class Archive>
void MC::ReactorDomain::load ( Archive & ar)
inline

◆ operator=() [1/2]

ReactorDomain & MC::ReactorDomain::operator= ( const ReactorDomain & )
delete
Here is the call graph for this function:

◆ operator=() [2/2]

ReactorDomain & MC::ReactorDomain::operator= ( ReactorDomain && other)
noexcept

Move assignment operator.

Here is the call graph for this function:

◆ reduce()

ReactorDomain MC::ReactorDomain::reduce ( std::span< const size_t > data,
size_t original_size,
size_t n_rank )
static

Return a unique domain from data obtained with MPI gather.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ save()

template<class Archive>
void MC::ReactorDomain::save ( Archive & ar) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setLiquidNeighbors()

void MC::ReactorDomain::setLiquidNeighbors ( const NeighborsView< HostSpace > & data)

Update neigbors of compartments.

Here is the caller graph for this function:

◆ setVolumes()

void MC::ReactorDomain::setVolumes ( std::span< double const > volumes_liq)

Set volume of liquid and gas of each compartment.

Member Data Documentation

◆ _total_volume

double MC::ReactorDomain::_total_volume = 0.
private

Domain total volume.

◆ id

size_t MC::ReactorDomain::id = 0
private

Domain ID.

◆ k_neighbor

NeighborsView<ComputeSpace> MC::ReactorDomain::k_neighbor
private

◆ size

size_t MC::ReactorDomain::size = 0
private

Number of compartment.


The documentation for this class was generated from the following files:
  • apps/libs/mc/public/mc/domain.hpp
  • apps/libs/mc/src/domain.cpp