Namespace to handle algorithms and structures related to reading compartment mesh.
More...
|
std::unique_ptr< FlowMapTransitionner > | get_transitioner (FlowmapTransitionMethod method, std::size_t n_flowmap, std::size_t n_per_flowmap, std::size_t number_time_step, std::unique_ptr< CmaRead::FlowIterator > &&iterator=nullptr, bool is_two_phase_flow=false) |
| Transition factory according to the given method.
|
|
CumulativeProbaType | get_cumulative_probabilities (CmaRead::Neighbors::Neighbors_const_view_t neighbors, const FlowMatrixType &m_transition) |
| Computes the cumulative probability matrix from the transition matrix and neighbor information.
|
|
FlowMatrixType | get_transition_matrix (const CmaRead::FlowMap::FlowMap_const_view_t &flows) |
| Calculate the transition matrix representing phase flow.
|
|
std::vector< double > | get_diag_transition (const FlowMatrixType &m_transition) |
| Return the diagonal of the transition matrix (outflows).
|
|
Namespace to handle algorithms and structures related to reading compartment mesh.
- See also
- Simulation::KernelInline::MoveFunctor
- Note
- See documentation page for full explanation
◆ CumulativeProbaType
◆ NeighborsView
template<typename Space >
Initial value: Kokkos::
View<std::size_t**, Kokkos::LayoutRight, Space, Kokkos::MemoryTraits<Kokkos::RandomAccess>>
◆ FlowmapTransitionMethod
Defines the transition methods used between flowmaps.
Enumerator |
---|
Discontinuous | Represents a sharp, abrupt transition.
|
InterpolationFO | Represents a smooth transition using first-order interpolation.
|
◆ get_cumulative_probabilities()
CumulativeProbaType CmaUtils::get_cumulative_probabilities |
( |
CmaRead::Neighbors::Neighbors_const_view_t | neighbors, |
|
|
const FlowMatrixType & | m_transition ) |
Computes the cumulative probability matrix from the transition matrix and neighbor information.
This function calculates the cumulative probability matrix for each zone (or compartment) based on the transition probabilities and the neighboring information. The cumulative probability matrix is used for determining the likelihood of moving to different compartments. This is by construction non-strictly increasing over rows
- Parameters
-
neighbors | A view of the neighbors for each compartment. |
m_transition | The transition matrix that provides the probabilities of transitioning from one compartment to another. |
- Returns
- An Eigen::MatrixXd representing the cumulative probability matrix.
◆ get_diag_transition()
std::vector< double > CmaUtils::get_diag_transition |
( |
const FlowMatrixType & | m_transition | ) |
|
Return the diagonal of the transition matrix (outflows).
This function performs a copy of the diagonal elements.
- Parameters
-
m_transition | Reference to the transition matrix. |
- Returns
- Vector of double containing the diagonal elements.
◆ get_transition_matrix()
FlowMatrixType CmaUtils::get_transition_matrix |
( |
const CmaRead::FlowMap::FlowMap_const_view_t & | flows | ) |
|
Calculate the transition matrix representing phase flow.
Converts a flow map read from the CmaRead private library into FlowMatrixType, a public typedef.
- Parameters
-
flows | Constant view of FlowMap from CmaRead. |
- Returns
- FlowMatrixType representing phase flow.
◆ get_transitioner()
std::unique_ptr< FlowMapTransitionner > CmaUtils::get_transitioner |
( |
FlowmapTransitionMethod | method, |
|
|
std::size_t | n_flowmap, |
|
|
std::size_t | n_per_flowmap, |
|
|
std::size_t | number_time_step, |
|
|
std::unique_ptr< CmaRead::FlowIterator > && | iterator = nullptr, |
|
|
bool | is_two_phase_flow = false ) |
Transition factory according to the given method.
Creates and returns a unique pointer to a FlowMapTransitionner based on the provided method and configuration parameters.
- Parameters
-
method | The method to use for transition. |
n_flowmap | The number of flow maps. |
n_per_flowmap | The number of iteration per flow map. |
number_time_step | The number of time steps. |
iterator | Optional unique pointer to a FlowIterator. |
is_two_phase_flow | Boolean flag indicating whether the flow is two-phase. |
- Returns
- Unique pointer to FlowMapTransitionner.