BioCMAMC-ST
transport.hpp
1#ifndef __GET_CUMULATIVE_PROBABILITY_HPP__
2#define __GET_CUMULATIVE_PROBABILITY_HPP__
3
4#ifndef NDEBUG
5#pragma GCC diagnostic push
6#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
7#endif
8#include <Eigen/Core>
9#ifndef NDEBUG
10#pragma GCC diagnostic pop
11#endif
12#include <Kokkos_Core.hpp>
13#include <cma_read/flowmap.hpp>
14#include <cma_read/light_2d_view.hpp>
15#include <cma_read/neighbors.hpp>
16#include <cma_utils/cache_hydro_state.hpp>
17#include <vector>
18
19namespace CmaUtils
20{
21 using CumulativeProbaType = Eigen::Matrix<double, -1, -1, Eigen::RowMajor>;
39 get_cumulative_probabilities(CmaRead::Neighbors::Neighbors_const_view_t neighbors,
40 const FlowMatrixType& m_transition);
41
50 FlowMatrixType get_transition_matrix(const CmaRead::FlowMap::FlowMap_const_view_t& flows);
51
59 std::vector<double> get_diag_transition(const FlowMatrixType& m_transition);
60
61} // namespace CmaUtils
62#endif //__GET_CUMULATIVE_PROBABILITY_HPP__
Namespace to handle algorithms and structures related to reading compartment mesh.
Definition host_specific.hpp:18
std::vector< double > get_diag_transition(const FlowMatrixType &m_transition)
Return the diagonal of the transition matrix (outflows).
Definition transport.cpp:17
FlowMatrixType get_transition_matrix(const CmaRead::FlowMap::FlowMap_const_view_t &flows)
Calculate the transition matrix representing phase flow.
Definition transport.cpp:27
Eigen::Matrix< double, -1, -1, Eigen::RowMajor > CumulativeProbaType
Definition transport.hpp:21
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.
Definition get_cumulative_proba.cpp:17