netxsimdg
Loading...
Searching...
No Matches
DevStep.cpp
Go to the documentation of this file.
1
8#include "include/DevStep.hpp"
9
12
13namespace Nextsim {
14
16{
17 IDiagnosticOutput& ido = Module::getImplementation<IDiagnosticOutput>();
18 ido.setFilenamePrefix("diagnostic");
19 tryConfigure(ido);
20}
21
23{
24 pData->update(tst);
25 // The state of the model has now advanced by one timestep, so update the
26 // model metadata timestamp.
27 mData->incrementTime(tst.step);
28 // Output the model state
29 Module::getImplementation<IDiagnosticOutput>().outputState(*mData);
30}
31
32} /* namespace Nextsim */
void tryConfigure(T &t)
Template function for conditionally configuring references.
void iterate(const TimestepTime &dt) override
Definition DevStep.cpp:22
void init() override
Initializes the model, based on some environment stored in the implementing class.
Definition DevStep.cpp:15
virtual void setFilenamePrefix(const std::string &filePrefix)=0
Sets the output file name.
void incrementTime(const Duration &step)
Increments the model time metadata value.
void update(const TimestepTime &tsTime)
Updates the state of the prognostic data for this timestep.