Template Class SDESynchronizer

Nested Relationships

Nested Types

Class Documentation

template<system_state S, can_be_time T = double>
class SDESynchronizer

SDE synchronization helper for coordinating noise processes.

This class provides utilities for synchronizing SDE integrators that need to receive noise data from external processes. It handles:

  • Noise data buffering and interpolation

  • Time synchronization between processes

  • Multiple noise process types

  • Robust error handling and recovery

Public Functions

inline explicit SDESynchronizer(SDESyncConfig config = {})

Construct SDE synchronizer.

Parameters:

config – SDE synchronization configuration

inline NoiseData<T> get_noise_increment(T current_time, T dt)

Get noise increment for SDE integration.

Parameters:
  • current_time – Current integration time

  • dt – Time step

Throws:

std::runtime_error – if noise cannot be obtained within timeout

Returns:

Noise data for the time step

inline void submit_noise_data(const NoiseData<T> &noise_data)

Submit noise data from external process.

Parameters:

noise_data – Noise data received

template<typename IPCDecorator>
inline void configure_with_ipc(IPCDecorator &ipc_decorator)

Configure for use with InterprocessDecorator.

Parameters:

ipc_decorator – Interprocess decorator to coordinate with

inline SyncStats get_statistics() const
inline void reset_statistics()

Reset statistics.

Public Static Functions

template<typename ProducerIntegrator, typename ConsumerIntegrator>
static inline std::pair<std::unique_ptr<AbstractIntegrator<S, T>>, std::unique_ptr<AbstractIntegrator<S, T>>> create_synchronized_pair(std::unique_ptr<ProducerIntegrator> producer_integrator, std::unique_ptr<ConsumerIntegrator> consumer_integrator, InterprocessConfig ipc_config, SDESyncConfig sync_config = {})

Create synchronized SDE integrator pair.

Parameters:
  • producer_integrator – Integrator that generates noise

  • consumer_integrator – Integrator that receives noise

  • ipc_config – IPC configuration

Returns:

Pair of configured integrators

struct SyncStats

Get synchronization statistics.

Public Functions

inline double timeout_rate() const

Public Members

size_t noise_requests
size_t noise_timeouts
size_t interpolations