Multiscale Universal Interface  2.0
A Concurrent Framework for Coupling Heterogeneous Solvers
mui::uniface< CONFIG > Class Template Reference

#include <uniface.h>

Public Types

using REAL = typename CONFIG::REAL
 
using point_type = typename CONFIG::point_type
 
using time_type = typename CONFIG::time_type
 
using iterator_type = typename CONFIG::iterator_type
 
using data_types = typename CONFIG::data_types
 
using span_t = geometry::any_shape< CONFIG >
 

Public Member Functions

 uniface (const char URI[])
 
 uniface (std::string const &URI)
 
 uniface (communicator *comm_)
 
 uniface (const uniface &)=delete
 
unifaceoperator= (const uniface &)=delete
 
template<typename TYPE >
void push (const std::string &attr, const TYPE &value)
 Announce the value value with the parameter attr Useful if, for example, you wish to pass a parameter rather than a field without an associated timestamp. More...
 
template<typename TYPE >
void push (const std::string &attr, const point_type &loc, const TYPE &value)
 Push data with tag "attr" to buffer Push data with tag "attr" to bcuffer. If using CONFIG::FIXEDPOINTS=true, data must be pushed in the same order that the points were previously pushed. More...
 
template<typename TYPE >
TYPE fetch (const std::string &attr)
 Fetch a single parameter from the interface Overloaded fetch to fetch a single parameter of name attr. There is no barrier on this fetch as there is no time associated with the value. More...
 
template<class SAMPLER , class TIME_SAMPLER , typename ... ADDITIONAL>
SAMPLER::OTYPE fetch (const std::string &attr, const point_type &focus, const time_type t, SAMPLER &sampler, const TIME_SAMPLER &t_sampler, bool barrier_enabled=true, ADDITIONAL &&... additional)
 Fetch from the interface, blocking with barrier at time=t. More...
 
template<class SAMPLER , class TIME_SAMPLER , typename ... ADDITIONAL>
SAMPLER::OTYPE fetch (const std::string &attr, const point_type &focus, const time_type t, const iterator_type it, SAMPLER &sampler, const TIME_SAMPLER &t_sampler, bool barrier_enabled=true, ADDITIONAL &&... additional)
 Fetch from the interface, blocking with barrier at time=t,it. More...
 
template<class SAMPLER , class TIME_SAMPLER , class COUPLING_ALGO , typename ... ADDITIONAL>
SAMPLER::OTYPE fetch (const std::string &attr, const point_type &focus, const time_type t, SAMPLER &sampler, const TIME_SAMPLER &t_sampler, const COUPLING_ALGO &cpl_algo, bool barrier_enabled=true, ADDITIONAL &&... additional)
 Fetch from the interface with coupling algorithms, blocking with barrier at time=t. More...
 
template<class SAMPLER , class TIME_SAMPLER , class COUPLING_ALGO , typename ... ADDITIONAL>
SAMPLER::OTYPE fetch (const std::string &attr, const point_type &focus, const time_type t, const iterator_type it, SAMPLER &sampler, const TIME_SAMPLER &t_sampler, const COUPLING_ALGO &cpl_algo, bool barrier_enabled=true, ADDITIONAL &&... additional)
 Fetch from the interface with coupling algorithms, blocking with barrier at time=t,it. More...
 
template<typename TYPE , class TIME_SAMPLER , typename ... ADDITIONAL>
std::vector< point_typefetch_points (const std::string &attr, const time_type t, const TIME_SAMPLER &t_sampler, bool barrier_enabled=true, ADDITIONAL &&... additional)
 Fetch points currently stored in the interface, blocking with barrier at time=t. More...
 
template<typename TYPE , class TIME_SAMPLER , typename ... ADDITIONAL>
std::vector< point_typefetch_points (const std::string &attr, const time_type t, const iterator_type it, const TIME_SAMPLER &t_sampler, bool barrier_enabled=true, ADDITIONAL &&... additional)
 Fetch points currently stored in the interface, blocking with barrier at time=t,it. More...
 
template<typename TYPE , class TIME_SAMPLER , typename ... ADDITIONAL>
std::vector< TYPE > fetch_values (const std::string &attr, const time_type t, const TIME_SAMPLER &t_sampler, bool barrier_enabled=true, ADDITIONAL &&... additional)
 Fetch values currently stored in the interface, blocking with barrier at time=t. More...
 
template<typename TYPE , class TIME_SAMPLER , typename ... ADDITIONAL>
std::vector< TYPE > fetch_values (const std::string &attr, const time_type t, const iterator_type it, const TIME_SAMPLER &t_sampler, bool barrier_enabled=true, ADDITIONAL &&... additional)
 Fetch values currently stored in the interface, blocking with barrier at time=t,it. More...
 
int commit (time_type t, iterator_type it=std::numeric_limits< iterator_type >::lowest())
 Serializes pushed data and sends it to remote nodes Serializes pushed data and sends it to remote nodes. Returns the actual number of peers contacted. More...
 
void update_smart_send (time_type t)
 Updates Smart Send locality data Creates a new comm rank mapping for Smart Send functionality. More...
 
void forecast (time_type t, iterator_type it=std::numeric_limits< iterator_type >::lowest())
 Sends a forecast of an upcoming time to remote nodes. More...
 
bool is_ready (const std::string &attr, time_type t) const
 Tests whether data is available at time=t. More...
 
bool is_ready (const std::string &attr, time_type t, iterator_type it) const
 Tests whether data is available at time=t,it. More...
 
void barrier (time_type t)
 Blocking barrier at time=t. Initiates receive from remote nodes. More...
 
void barrier (time_type t, iterator_type it)
 Blocking barrier at time=t,it. Initiates receive from remote nodes. More...
 
void barrier_ss_send ()
 Blocking barrier for Smart Send send values. Initiates receive from remote nodes. More...
 
void barrier_ss_recv ()
 Blocking barrier for Smart Send receive values. Initiates receive from remote nodes. More...
 
void announce_send_span (time_type start, time_type timeout, span_t s, bool synchronised=false)
 Announces to all remote nodes using non-blocking peer-to-peer approach "I'll send this span". More...
 
void announce_send_disable (bool synchronised=false)
 Announces to all remote nodes "I'm disabled for send". More...
 
void announce_recv_span (time_type start, time_type timeout, span_t s, bool synchronised=false)
 Announces to all remote nodes using non-blocking peer-to-peer approach "I'm receiving this span". More...
 
void announce_recv_disable (bool synchronised=false)
 Announces to all remote nodes "I'm disabled for receive". More...
 
void forget (time_type last, bool reset_log=false)
 Removes log between (-inf, @last]. More...
 
void forget (std::pair< time_type, iterator_type > last, bool reset_log=false)
 Removes log between ([-inf,-inf], [@last.first,@last.second]]. More...
 
void forget (time_type first, time_type last, bool reset_log=false)
 Removes log between [@first, @last]. More...
 
void forget (std::pair< time_type, iterator_type > first, std::pair< time_type, iterator_type > last, bool reset_log=false)
 Removes log between [[@first.first,@first.second], [@last.first,@last.second]]. More...
 
void set_memory (time_type length)
 Removes log between (-inf, current-@length] automatically. More...
 
std::string uri_host ()
 Returns the URI host (domain) for the created uniface. More...
 
std::string uri_path ()
 Returns the URI path (name) for the created uniface. More...
 
std::string uri_protocol ()
 Returns the URI protocol for the created uniface. More...
 

Static Public Attributes

static const int D = CONFIG::D
 
static const bool FIXEDPOINTS = CONFIG::FIXEDPOINTS
 
static const bool QUIET = CONFIG::QUIET
 

Member Typedef Documentation

◆ data_types

template<typename CONFIG = default_config>
using mui::uniface< CONFIG >::data_types = typename CONFIG::data_types

◆ iterator_type

template<typename CONFIG = default_config>
using mui::uniface< CONFIG >::iterator_type = typename CONFIG::iterator_type

◆ point_type

template<typename CONFIG = default_config>
using mui::uniface< CONFIG >::point_type = typename CONFIG::point_type

◆ REAL

template<typename CONFIG = default_config>
using mui::uniface< CONFIG >::REAL = typename CONFIG::REAL

◆ span_t

template<typename CONFIG = default_config>
using mui::uniface< CONFIG >::span_t = geometry::any_shape<CONFIG>

◆ time_type

template<typename CONFIG = default_config>
using mui::uniface< CONFIG >::time_type = typename CONFIG::time_type

Constructor & Destructor Documentation

◆ uniface() [1/4]

template<typename CONFIG = default_config>
mui::uniface< CONFIG >::uniface ( const char  URI[])
inline

◆ uniface() [2/4]

template<typename CONFIG = default_config>
mui::uniface< CONFIG >::uniface ( std::string const &  URI)
inline

◆ uniface() [3/4]

template<typename CONFIG = default_config>
mui::uniface< CONFIG >::uniface ( communicator comm_)
inline

◆ uniface() [4/4]

template<typename CONFIG = default_config>
mui::uniface< CONFIG >::uniface ( const uniface< CONFIG > &  )
delete

Member Function Documentation

◆ announce_recv_disable()

template<typename CONFIG = default_config>
void mui::uniface< CONFIG >::announce_recv_disable ( bool  synchronised = false)
inline

Announces to all remote nodes "I'm disabled for receive".

◆ announce_recv_span()

template<typename CONFIG = default_config>
void mui::uniface< CONFIG >::announce_recv_span ( time_type  start,
time_type  timeout,
span_t  s,
bool  synchronised = false 
)
inline

Announces to all remote nodes using non-blocking peer-to-peer approach "I'm receiving this span".

◆ announce_send_disable()

template<typename CONFIG = default_config>
void mui::uniface< CONFIG >::announce_send_disable ( bool  synchronised = false)
inline

Announces to all remote nodes "I'm disabled for send".

◆ announce_send_span()

template<typename CONFIG = default_config>
void mui::uniface< CONFIG >::announce_send_span ( time_type  start,
time_type  timeout,
span_t  s,
bool  synchronised = false 
)
inline

Announces to all remote nodes using non-blocking peer-to-peer approach "I'll send this span".

◆ barrier() [1/2]

template<typename CONFIG = default_config>
void mui::uniface< CONFIG >::barrier ( time_type  t)
inline

Blocking barrier at time=t. Initiates receive from remote nodes.

◆ barrier() [2/2]

template<typename CONFIG = default_config>
void mui::uniface< CONFIG >::barrier ( time_type  t,
iterator_type  it 
)
inline

Blocking barrier at time=t,it. Initiates receive from remote nodes.

◆ barrier_ss_recv()

template<typename CONFIG = default_config>
void mui::uniface< CONFIG >::barrier_ss_recv ( )
inline

Blocking barrier for Smart Send receive values. Initiates receive from remote nodes.

◆ barrier_ss_send()

template<typename CONFIG = default_config>
void mui::uniface< CONFIG >::barrier_ss_send ( )
inline

Blocking barrier for Smart Send send values. Initiates receive from remote nodes.

◆ commit()

template<typename CONFIG = default_config>
int mui::uniface< CONFIG >::commit ( time_type  t,
iterator_type  it = std::numeric_limits<iterator_type>::lowest() 
)
inline

Serializes pushed data and sends it to remote nodes Serializes pushed data and sends it to remote nodes. Returns the actual number of peers contacted.

◆ fetch() [1/5]

template<typename CONFIG = default_config>
template<typename TYPE >
TYPE mui::uniface< CONFIG >::fetch ( const std::string &  attr)
inline

Fetch a single parameter from the interface Overloaded fetch to fetch a single parameter of name attr. There is no barrier on this fetch as there is no time associated with the value.

◆ fetch() [2/5]

template<typename CONFIG = default_config>
template<class SAMPLER , class TIME_SAMPLER , typename ... ADDITIONAL>
SAMPLER::OTYPE mui::uniface< CONFIG >::fetch ( const std::string &  attr,
const point_type focus,
const time_type  t,
const iterator_type  it,
SAMPLER &  sampler,
const TIME_SAMPLER &  t_sampler,
bool  barrier_enabled = true,
ADDITIONAL &&...  additional 
)
inline

Fetch from the interface, blocking with barrier at time=t,it.

◆ fetch() [3/5]

template<typename CONFIG = default_config>
template<class SAMPLER , class TIME_SAMPLER , class COUPLING_ALGO , typename ... ADDITIONAL>
SAMPLER::OTYPE mui::uniface< CONFIG >::fetch ( const std::string &  attr,
const point_type focus,
const time_type  t,
const iterator_type  it,
SAMPLER &  sampler,
const TIME_SAMPLER &  t_sampler,
const COUPLING_ALGO &  cpl_algo,
bool  barrier_enabled = true,
ADDITIONAL &&...  additional 
)
inline

Fetch from the interface with coupling algorithms, blocking with barrier at time=t,it.

◆ fetch() [4/5]

template<typename CONFIG = default_config>
template<class SAMPLER , class TIME_SAMPLER , typename ... ADDITIONAL>
SAMPLER::OTYPE mui::uniface< CONFIG >::fetch ( const std::string &  attr,
const point_type focus,
const time_type  t,
SAMPLER &  sampler,
const TIME_SAMPLER &  t_sampler,
bool  barrier_enabled = true,
ADDITIONAL &&...  additional 
)
inline

Fetch from the interface, blocking with barrier at time=t.

◆ fetch() [5/5]

template<typename CONFIG = default_config>
template<class SAMPLER , class TIME_SAMPLER , class COUPLING_ALGO , typename ... ADDITIONAL>
SAMPLER::OTYPE mui::uniface< CONFIG >::fetch ( const std::string &  attr,
const point_type focus,
const time_type  t,
SAMPLER &  sampler,
const TIME_SAMPLER &  t_sampler,
const COUPLING_ALGO &  cpl_algo,
bool  barrier_enabled = true,
ADDITIONAL &&...  additional 
)
inline

Fetch from the interface with coupling algorithms, blocking with barrier at time=t.

◆ fetch_points() [1/2]

template<typename CONFIG = default_config>
template<typename TYPE , class TIME_SAMPLER , typename ... ADDITIONAL>
std::vector<point_type> mui::uniface< CONFIG >::fetch_points ( const std::string &  attr,
const time_type  t,
const iterator_type  it,
const TIME_SAMPLER &  t_sampler,
bool  barrier_enabled = true,
ADDITIONAL &&...  additional 
)
inline

Fetch points currently stored in the interface, blocking with barrier at time=t,it.

◆ fetch_points() [2/2]

template<typename CONFIG = default_config>
template<typename TYPE , class TIME_SAMPLER , typename ... ADDITIONAL>
std::vector<point_type> mui::uniface< CONFIG >::fetch_points ( const std::string &  attr,
const time_type  t,
const TIME_SAMPLER &  t_sampler,
bool  barrier_enabled = true,
ADDITIONAL &&...  additional 
)
inline

Fetch points currently stored in the interface, blocking with barrier at time=t.

◆ fetch_values() [1/2]

template<typename CONFIG = default_config>
template<typename TYPE , class TIME_SAMPLER , typename ... ADDITIONAL>
std::vector<TYPE> mui::uniface< CONFIG >::fetch_values ( const std::string &  attr,
const time_type  t,
const iterator_type  it,
const TIME_SAMPLER &  t_sampler,
bool  barrier_enabled = true,
ADDITIONAL &&...  additional 
)
inline

Fetch values currently stored in the interface, blocking with barrier at time=t,it.

◆ fetch_values() [2/2]

template<typename CONFIG = default_config>
template<typename TYPE , class TIME_SAMPLER , typename ... ADDITIONAL>
std::vector<TYPE> mui::uniface< CONFIG >::fetch_values ( const std::string &  attr,
const time_type  t,
const TIME_SAMPLER &  t_sampler,
bool  barrier_enabled = true,
ADDITIONAL &&...  additional 
)
inline

Fetch values currently stored in the interface, blocking with barrier at time=t.

◆ forecast()

template<typename CONFIG = default_config>
void mui::uniface< CONFIG >::forecast ( time_type  t,
iterator_type  it = std::numeric_limits<iterator_type>::lowest() 
)
inline

Sends a forecast of an upcoming time to remote nodes.

◆ forget() [1/4]

template<typename CONFIG = default_config>
void mui::uniface< CONFIG >::forget ( std::pair< time_type, iterator_type first,
std::pair< time_type, iterator_type last,
bool  reset_log = false 
)
inline

Removes log between [[@first.first,@first.second], [@last.first,@last.second]].

◆ forget() [2/4]

template<typename CONFIG = default_config>
void mui::uniface< CONFIG >::forget ( std::pair< time_type, iterator_type last,
bool  reset_log = false 
)
inline

Removes log between ([-inf,-inf], [@last.first,@last.second]].

◆ forget() [3/4]

template<typename CONFIG = default_config>
void mui::uniface< CONFIG >::forget ( time_type  first,
time_type  last,
bool  reset_log = false 
)
inline

Removes log between [@first, @last].

◆ forget() [4/4]

template<typename CONFIG = default_config>
void mui::uniface< CONFIG >::forget ( time_type  last,
bool  reset_log = false 
)
inline

Removes log between (-inf, @last].

◆ is_ready() [1/2]

template<typename CONFIG = default_config>
bool mui::uniface< CONFIG >::is_ready ( const std::string &  attr,
time_type  t 
) const
inline

Tests whether data is available at time=t.

◆ is_ready() [2/2]

template<typename CONFIG = default_config>
bool mui::uniface< CONFIG >::is_ready ( const std::string &  attr,
time_type  t,
iterator_type  it 
) const
inline

Tests whether data is available at time=t,it.

◆ operator=()

template<typename CONFIG = default_config>
uniface& mui::uniface< CONFIG >::operator= ( const uniface< CONFIG > &  )
delete

◆ push() [1/2]

template<typename CONFIG = default_config>
template<typename TYPE >
void mui::uniface< CONFIG >::push ( const std::string &  attr,
const point_type loc,
const TYPE &  value 
)
inline

Push data with tag "attr" to buffer Push data with tag "attr" to bcuffer. If using CONFIG::FIXEDPOINTS=true, data must be pushed in the same order that the points were previously pushed.

◆ push() [2/2]

template<typename CONFIG = default_config>
template<typename TYPE >
void mui::uniface< CONFIG >::push ( const std::string &  attr,
const TYPE &  value 
)
inline

Announce the value value with the parameter attr Useful if, for example, you wish to pass a parameter rather than a field without an associated timestamp.

◆ set_memory()

template<typename CONFIG = default_config>
void mui::uniface< CONFIG >::set_memory ( time_type  length)
inline

Removes log between (-inf, current-@length] automatically.

◆ update_smart_send()

template<typename CONFIG = default_config>
void mui::uniface< CONFIG >::update_smart_send ( time_type  t)
inline

Updates Smart Send locality data Creates a new comm rank mapping for Smart Send functionality.

◆ uri_host()

template<typename CONFIG = default_config>
std::string mui::uniface< CONFIG >::uri_host ( )
inline

Returns the URI host (domain) for the created uniface.

◆ uri_path()

template<typename CONFIG = default_config>
std::string mui::uniface< CONFIG >::uri_path ( )
inline

Returns the URI path (name) for the created uniface.

◆ uri_protocol()

template<typename CONFIG = default_config>
std::string mui::uniface< CONFIG >::uri_protocol ( )
inline

Returns the URI protocol for the created uniface.

Member Data Documentation

◆ D

template<typename CONFIG = default_config>
const int mui::uniface< CONFIG >::D = CONFIG::D
static

◆ FIXEDPOINTS

template<typename CONFIG = default_config>
const bool mui::uniface< CONFIG >::FIXEDPOINTS = CONFIG::FIXEDPOINTS
static

◆ QUIET

template<typename CONFIG = default_config>
const bool mui::uniface< CONFIG >::QUIET = CONFIG::QUIET
static

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