netxsimdg
Loading...
Searching...
No Matches
Nextsim::IModelStep Class Referenceabstract

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

#include <IModelStep.hpp>

Inheritance diagram for Nextsim::IModelStep:
Inheritance graph
Collaboration diagram for Nextsim::IModelStep:
Collaboration graph

Public Member Functions

void setInitFile (const std::string &filePath)
 Sets the path to the initial file for later reference.
 
virtual void writeRestartFile (const std::string &filePath)=0
 Writes a restart file containing the current model state to the given file location.
 
virtual void setData (PrognosticData &data)=0
 Sets the data object that will be used within the timesteps.
 
virtual void setMetadata (ModelMetadata &meta)=0
 Sets the metadata object that will be used within the timesteps.
 
virtual void init ()=0
 Initializes the model, based on some environment stored in the implementing class.
 
virtual void start (const TimePoint &startTime)=0
 
virtual void iterate (const TimestepTime &dt)=0
 
virtual void stop (const TimePoint &stopTime)=0
 
- Public Member Functions inherited from Nextsim::Iterator::Iterant
 Iterant (const Iterant &copyFrom)=default
 
Iterantoperator= (const Iterant &copyFrom)=default
 
 Iterant (Iterant &&)=default
 
Iterantoperator= (Iterant &&)=default
 

Protected Attributes

std::string initialRestartFilePath
 

Detailed Description

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

Definition at line 18 of file IModelStep.hpp.

Member Function Documentation

◆ init()

virtual void Nextsim::IModelStep::init ( )
pure virtual

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

Implements Nextsim::Iterator::Iterant.

Implemented in Nextsim::DevStep.

◆ iterate()

virtual void Nextsim::IModelStep::iterate ( const TimestepTime & dt)
pure virtual

Performs one iteration a specified length

Parameters
dtThe length of the timestep.

Implements Nextsim::Iterator::Iterant.

Implemented in Nextsim::DevStep.

◆ setData()

virtual void Nextsim::IModelStep::setData ( PrognosticData & data)
pure virtual

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

Parameters
dataThe PrognosticData holding the model data.

Implemented in Nextsim::DevStep.

◆ setInitFile()

void Nextsim::IModelStep::setInitFile ( const std::string & filePath)
inline

Sets the path to the initial file for later reference.

Parameters
filePathThe path to the location of the file used to initialize the model.

Definition at line 28 of file IModelStep.hpp.

Here is the caller graph for this function:

◆ setMetadata()

virtual void Nextsim::IModelStep::setMetadata ( ModelMetadata & meta)
pure virtual

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

The ModelMetadata object will contain much constant information, primarily metadata about the model set up, but also time-dependent metadata, including the current time for which the model data is valid.

Parameters
metaA ModelMetadata reference to the metadata instance

Implemented in Nextsim::DevStep.

◆ start()

virtual void Nextsim::IModelStep::start ( const TimePoint & startTime)
pure virtual

Initializes the iterant based on the start time.

Parameters
startTimethe time at the initialization of the iterant.

Implements Nextsim::Iterator::Iterant.

Implemented in Nextsim::DevStep.

◆ stop()

virtual void Nextsim::IModelStep::stop ( const TimePoint & stopTime)
pure virtual

Finalizes the iterant based on the stop time.

Parameters
stopTimethe time at the finalization of the iterant.

Implements Nextsim::Iterator::Iterant.

Implemented in Nextsim::DevStep.

◆ writeRestartFile()

virtual void Nextsim::IModelStep::writeRestartFile ( const std::string & filePath)
pure virtual

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

Parameters
filePathThe path to the location to write the file.

Implemented in Nextsim::DevStep.

Member Data Documentation

◆ initialRestartFilePath

std::string Nextsim::IModelStep::initialRestartFilePath
protected

Definition at line 64 of file IModelStep.hpp.


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