1#ifndef __CACHE_HYDRO_STATE__
2#define __CACHE_HYDRO_STATE__
7#include <common/common.hpp>
10template <
typename ExecSpace>
11using DiagonalView = Kokkos::
12 View<double*, Kokkos::LayoutLeft, ExecSpace, Kokkos::MemoryTraits<Kokkos::RandomAccess>>;
14template <
typename Space>
15using CumulativeProbabilityView =
16 Kokkos::View<double**, Kokkos::LayoutRight, Space, Kokkos::MemoryTraits<Kokkos::RandomAccess>>;
18using FlowMatrixType = Eigen::SparseMatrix<double>;
28 class ProxyPreCalculatedHydroState;
90 Eigen::Matrix<double, -1, -1, Eigen::RowMajor>
Structure to store hydrodynamic properties from a compartment mesh.
Definition cache_hydro_state.hpp:40
PreCalculatedHydroState(const PreCalculatedHydroState &other)=delete
Deleted copy assigment.
FlowMatrixType transition_matrix
Matrix representing flow transitions.
Definition cache_hydro_state.hpp:88
PreCalculatedHydroState & operator=(const PreCalculatedHydroState &rhs)=delete
Deleted copy constructor.
Eigen::Matrix< double, -1, -1, Eigen::RowMajor > cumulative_probability
Cumulative probability matrix.
Definition cache_hydro_state.hpp:91
std::vector< double > inverse_volume
Inverse of compartment volumes.
Definition cache_hydro_state.hpp:93
PreCalculatedHydroState()
Default constructor.
Definition cache_hydro_state.cpp:15
PreCalculatedHydroState(PreCalculatedHydroState &&other)=default
Default move assigment.
PreCalculatedHydroState & operator=(PreCalculatedHydroState &&rhs)=default
Default move constructor.
~PreCalculatedHydroState()=default
Default destructor.
std::vector< double > volume
Volumes of compartments.
Definition cache_hydro_state.hpp:94
friend class ProxyCalculatedHydroState
Definition cache_hydro_state.hpp:42
DiagonalView< ComputeSpace > diagonal_compute
Diagonal view for compute operations.
Definition cache_hydro_state.hpp:95
DiagonalView< ComputeSpace > get_kernel_diagonal() const
Get the kernel diagonal view.
Definition cache_hydro_state.hpp:103
const FlowMatrixType & get_transition() const
Get the transition matrix.
Definition cache_hydro_state.cpp:20
Namespace to handle algorithms and structures related to reading compartment mesh.
Definition host_specific.hpp:17