BioCMAMC-ST
CmaUtils::LinterFMT Class Referencefinal

Derived class to handle Linear interpolation transition between flowmaps. More...

#include <linter_fmt.hpp>

Inheritance diagram for CmaUtils::LinterFMT:
[legend]
Collaboration diagram for CmaUtils::LinterFMT:
[legend]

Public Member Functions

 LinterFMT (std::size_t _n_flowmap, std::size_t _n_per_flowmap, std::size_t number_time_step, std::unique_ptr< CmaRead::FlowIterator > &&_iterator, bool is_two_phase_flow)
 
void update_flow () final
 Calculate the current state based on the selected method, may be caching or direct calculation.
 
- Public Member Functions inherited from CmaUtils::FlowMapTransitionner
 FlowMapTransitionner ()=default
 
FlowMapTransitionneroperator= (FlowMapTransitionner &&)=default
 
 FlowMapTransitionner (FlowMapTransitionner &&)=default
 
FlowMapTransitionneroperator= (const FlowMapTransitionner &)=delete
 
 FlowMapTransitionner (const FlowMapTransitionner &)=delete
 
 FlowMapTransitionner (std::size_t _n_flowmap, std::size_t _n_per_flowmap, std::size_t number_time_step, std::unique_ptr< CmaRead::FlowIterator > &&_iterator, bool is_two_phase_flow)
 
virtual ~FlowMapTransitionner ()=default
 
IterationState advance ()
 Advances the simulation by one timestep.
 
IterationState advance_worker (std::span< double > flows, std::span< double > volumeLiq, std::span< double > volumeGas, const CmaRead::Neighbors::Neighbors_const_view_t &neighbors)
 Advances the simulation by one timestep from a MPI Wroker.
 
bool is_two_phase_flow () const noexcept
 Checks whether a gas flowmap is provided.
 
std::size_t get_n_timestep () const noexcept
 Returns the total number of expected simulation timesteps.
 

Protected Member Functions

const CmaRead::ReactorState & get_current_reactor_state () const noexcept final
 Provides a const reference to the current reactor state.
 
CmaUtils::ProxyPreCalculatedHydroStatecurrent_liq_hydro_state () noexcept final
 Get current liquid state read from CmaRead.
 
CmaUtils::ProxyPreCalculatedHydroStatecurrent_gas_hydro_state () noexcept final
 Get current gas state read from CmaRead.
 
- Protected Member Functions inherited from CmaUtils::FlowMapTransitionner
bool need_liquid_state_calculation () const noexcept
 Check if liquid state has to calculated or can be use via caching.
 
IterationState common_advance (NeighborsView< HostSpace > host_view, std::unordered_map< std::string, std::span< const double > > &&info)
 Operation required by all methods in order to perform advance function .
 
void update_flow_worker (std::span< double > flows, std::span< double > volumeLiq, std::span< double > volumeGas, const CmaRead::Neighbors::Neighbors_const_view_t &neighbors)
 ONLY for MPI_WORKER Calculate the current state based on the selected method, may be caching or direct calculation.
 
void calculate_full_state (const CmaRead::ReactorState &reactor_state, CmaUtils::ProxyPreCalculatedHydroState &liq_hydro_state, CmaUtils::ProxyPreCalculatedHydroState &gas_hydro_state) const
 Calculate the whole state (liquid+gas+neighbor) for the current time step.
 
size_t getFlowIndex () const noexcept
 Return the index of the current ProxyPreCalculatedHydroState.
 
size_t size () const noexcept
 Get the number of load flowmap.
 
const CmaRead::ReactorState & get_unchecked (size_t index) const noexcept
 Direct read state from iterator.
 

Additional Inherited Members

- Static Public Member Functions inherited from CmaUtils::FlowMapTransitionner
static NeighborsView< HostSpace > get_neighbors_view (const CmaRead::Neighbors::Neighbors_const_view_t &liquid_neighbors)
 Converts the provided neighbors' data into a Kokkos view.
 
- Protected Attributes inherited from CmaUtils::FlowMapTransitionner
std::vector< CmaUtils::ProxyPreCalculatedHydroStateliquid_pc
 Buffer for liquid state.
 
std::vector< CmaUtils::ProxyPreCalculatedHydroStategas_pc
 Buffer for gas state.
 

Detailed Description

Derived class to handle Linear interpolation transition between flowmaps.

Linear interpolation means that we pass don't pass from flowmap i to flormap i+1 but we use intermediate flowmap created with linear interpolation

Constructor & Destructor Documentation

◆ LinterFMT()

CmaUtils::LinterFMT::LinterFMT ( std::size_t _n_flowmap,
std::size_t _n_per_flowmap,
std::size_t number_time_step,
std::unique_ptr< CmaRead::FlowIterator > && _iterator,
bool is_two_phase_flow )
inline
Here is the call graph for this function:

Member Function Documentation

◆ current_gas_hydro_state()

CmaUtils::ProxyPreCalculatedHydroState & CmaUtils::LinterFMT::current_gas_hydro_state ( )
finalprotectedvirtualnoexcept

Get current gas state read from CmaRead.

Implements CmaUtils::FlowMapTransitionner.

◆ current_liq_hydro_state()

CmaUtils::ProxyPreCalculatedHydroState & CmaUtils::LinterFMT::current_liq_hydro_state ( )
finalprotectedvirtualnoexcept

Get current liquid state read from CmaRead.

Implements CmaUtils::FlowMapTransitionner.

◆ get_current_reactor_state()

const CmaRead::ReactorState & CmaUtils::LinterFMT::get_current_reactor_state ( ) const
inlinenodiscardfinalprotectedvirtualnoexcept

Provides a const reference to the current reactor state.

This method returns the reactor state currently read from the flowmap.

Todo
: Consider making this method protected or moving it to MPI_WRAP.

Implements CmaUtils::FlowMapTransitionner.

◆ update_flow()

void CmaUtils::LinterFMT::update_flow ( )
inlinefinalvirtual

Calculate the current state based on the selected method, may be caching or direct calculation.

Implements CmaUtils::FlowMapTransitionner.


The documentation for this class was generated from the following files: