Molecular Dynamics Simulation
1.0
|
#include <SimulationInterceptor.h>
Public Member Functions | |
virtual | ~SimulationInterceptor ()=default |
Destroy the Simulation Interceptor object. More... | |
virtual void | onSimulationStart (Simulation &simulation)=0 |
Called before the simulation loop starts. More... | |
virtual void | operator() (size_t iteration, Simulation &simulation)=0 |
Called on every nth iteration. This function should perform the desired action. More... | |
virtual void | onSimulationEnd (size_t iteration, Simulation &simulation)=0 |
Called after the simulation loop ends. More... | |
void | notify (size_t iteration, Simulation &simulation) |
This function is called by the simulation loop on every iteration. Whenever the iteration is a multiple of every_nth_iteration, the operator() function is called. More... | |
virtual | operator std::string () const =0 |
The string representation of this interceptor. More... | |
virtual void | logSummary (int depth) const =0 |
Summary of the interceptor. More... | |
Protected Attributes | |
size_t | every_nth_iteration = 1 |
Definition at line 8 of file SimulationInterceptor.h.
|
virtualdefault |
Destroy the Simulation Interceptor object.
|
pure virtual |
Summary of the interceptor.
depth |
Implemented in VelocityProfileInterceptor, ThermostatInterceptor, TemperatureSensorInterceptor, RadialDistributionFunctionInterceptor, ProgressBarInterceptor, ParticleUpdateCounterInterceptor, FrameWriterInterceptor, and DiffusionFunctionInterceptor.
|
inline |
This function is called by the simulation loop on every iteration. Whenever the iteration is a multiple of every_nth_iteration, the operator() function is called.
iteration | The current iteration |
simulation | The simulation object |
Definition at line 50 of file SimulationInterceptor.h.
|
pure virtual |
Called after the simulation loop ends.
iteration | The current iteration |
simulation | The simulation object |
Implemented in VelocityProfileInterceptor, ThermostatInterceptor, TemperatureSensorInterceptor, RadialDistributionFunctionInterceptor, ProgressBarInterceptor, ParticleUpdateCounterInterceptor, FrameWriterInterceptor, and DiffusionFunctionInterceptor.
|
pure virtual |
Called before the simulation loop starts.
simulation | The simulation object |
Implemented in VelocityProfileInterceptor, ThermostatInterceptor, TemperatureSensorInterceptor, RadialDistributionFunctionInterceptor, ProgressBarInterceptor, ParticleUpdateCounterInterceptor, FrameWriterInterceptor, and DiffusionFunctionInterceptor.
|
explicitpure virtual |
The string representation of this interceptor.
This is used to write the final summary of the Interceptors to the console.
Implemented in VelocityProfileInterceptor, ThermostatInterceptor, TemperatureSensorInterceptor, RadialDistributionFunctionInterceptor, ProgressBarInterceptor, ParticleUpdateCounterInterceptor, FrameWriterInterceptor, and DiffusionFunctionInterceptor.
|
pure virtual |
Called on every nth iteration. This function should perform the desired action.
iteration | The current iteration |
simulation | The simulation object |
Implemented in VelocityProfileInterceptor, ThermostatInterceptor, TemperatureSensorInterceptor, RadialDistributionFunctionInterceptor, ProgressBarInterceptor, ParticleUpdateCounterInterceptor, FrameWriterInterceptor, and DiffusionFunctionInterceptor.
|
protected |
Definition at line 74 of file SimulationInterceptor.h.