Class ModelMetadata¶
Defined in File ModelMetadata.hpp
Class Documentation¶
-
class ModelMetadata¶
A class to hold the metadata pertaining to the model as a whole, both constant and time varying values. Especially values required for data file output.
Public Functions
-
void setDimensionsFromFile(const std::string &filename)¶
Set dimensions information based on the contents of an input file.
If an input file hasn’t been read yet, the dimensions are read from the file and set. Otherwise, a consistency check is made against the dimensions read from file and already set.
- Parameters:
filename – the name of the file
-
void setTimes(const TimePoint &start, const TimePoint &stop, const Duration &step)¶
Sets the model start, stop and step times directly.
-
void setTimes(const TimePoint &start, const Duration &runLength, const Duration &step)¶
Sets the model start, stop and step times from a run length.
-
void setTime(const TimePoint &time)¶
Sets the initial or current model time.
- Parameters:
time – TimePoint instance encoding the current time.
-
void incrementTime(const Duration &step)¶
Increments the model time metadata value.
- Parameters:
step – Duration of the time increment to add.
-
const std::string &structureName() const¶
Returns the string description of the model grid structure.
-
inline void setConfig(const ConfigMap &config)¶
Sets the configuration metadata.
- Parameters:
config – The configuration metadata
-
const ModelState &extractCoordinates(const ModelState &state)¶
Extracts and sets the coordinate metadata from the given ModelState.
- Parameters:
state – The given ModelState.
-
ModelState &affixCoordinates(ModelState &state) const¶
Adds the coordinate metadata to the given ModelState.
- Parameters:
state – The given ModelState.
Public Members
- friend CommonRestartMetadata
-
void setDimensionsFromFile(const std::string &filename)¶