netxsimdg
Loading...
Searching...
No Matches
DevStep.hpp
Go to the documentation of this file.
1
8#ifndef DEVSTEP_HPP
9#define DEVSTEP_HPP
10
13
14#include <string>
15
16namespace Nextsim {
17
19class DevStep : public IModelStep {
20public:
21 DevStep() = default;
22 virtual ~DevStep() = default;
23
24 // Member functions inherited from IModelStep
25 void writeRestartFile(const std::string& filePath) override {};
26
27 void setData(PrognosticData& pDat) override { pData = &pDat; }
28 void setMetadata(ModelMetadata& metadata) override { mData = &metadata; }
29
30 // Member functions inherited from Iterant
31 void init() override;
32 void start(const TimePoint& startTime) override {};
33 void iterate(const TimestepTime& dt) override;
34 void stop(const TimePoint& stopTime) override {};
35
36private:
37 PrognosticData* pData;
38 ModelMetadata* mData;
39};
40
41} /* namespace Nextsim */
42
43#endif /* DEVSTEP_HPP */
A class providing a simple implementation of Iterator.
Definition DevStep.hpp:19
void setMetadata(ModelMetadata &metadata) override
Sets the metadata object that will be used within the timesteps.
Definition DevStep.hpp:28
void setData(PrognosticData &pDat) override
Sets the data object that will be used within the timesteps.
Definition DevStep.hpp:27
void writeRestartFile(const std::string &filePath) override
Writes a restart file containing the current model state to the given file location.
Definition DevStep.hpp:25
void start(const TimePoint &startTime) override
Definition DevStep.hpp:32
void iterate(const TimestepTime &dt) override
Definition DevStep.cpp:22
void stop(const TimePoint &stopTime) override
Definition DevStep.hpp:34
void init() override
Initializes the model, based on some environment stored in the implementing class.
Definition DevStep.cpp:15
An interface class extending Iterator::Iterant with some file name handling.