Class IModelStep

Inheritance Relationships

Base Type

Derived Type

Class Documentation

class IModelStep : public Nextsim::Iterator::Iterant

An interface class extending Iterator::Iterant with some file name handling.

Subclassed by Nextsim::DevStep

Public Functions

IModelStep() = default
virtual ~IModelStep() = default
inline void setInitFile(const std::string &filePath)

Sets the path to the initial file for later reference.

Parameters:

filePath – The path to the location of the file used to initialize the model.

virtual void writeRestartFile(const std::string &filePath) = 0

Writes a restart file containing the current model state to the given file location.

Parameters:

filePath – The path to the location to write the file.

virtual void setData(PrognosticData &data) = 0

Sets the data object that will be used within the timesteps.

Parameters:

data – The PrognosticData holding the model data.

virtual void init() = 0

Initializes the model, based on some environment stored in the implementing class.

virtual void start(const TimePoint &startTime) = 0

Initializes the iterant based on the start time.

Parameters:

startTime – the time at the initialization of the iterant.

virtual void iterate(const TimestepTime &dt) = 0

Performs one iteration a specified length

Parameters:

dt – The length of the timestep.

virtual void stop(const TimePoint &stopTime) = 0

Finalizes the iterant based on the stop time.

Parameters:

stopTime – the time at the finalization of the iterant.

Protected Attributes

std::string initialRestartFilePath