2.3.16. swTimeLoop

Defined in swCore/swCore.h

class swTimeLoop : public QObject

The swTimeLoop class to do the main loop.

Considering the following class:

Public Functions

swTimeLoop(swSettings *settings, swMesh *mesh, swVTKConverter *converter, swModel *hyperbolic_model, swTimeSeries *time_series)

Constructor.

set the Time loop settings

Parameters
  • settings: pointer to Settings structure

  • Mesh: pointer to Mesh structure

  • hyperbolic_model: pointer to model

  • time_series: pointer to boundary conditions time series

~swTimeLoop(void)

Destructor.

int run(void)

Execute the main loop.

  • it will emit progress and save signals.

  • it will compute new timesteps until time < Tmax or if it’s QThread is interrupted

execute the main loop

Return

number of computed timesteps

Signals

void progress(double time)

signal emitted each time a new timestep has been computed

void save(double time, const QString &path)

Private Members

swTimeLoopPrivate *d