netxsimdg
Loading...
Searching...
No Matches
Nextsim::Model Class Reference

A class that encapsulates the whole of the model. More...

#include <Model.hpp>

Inheritance diagram for Nextsim::Model:
Inheritance graph
Collaboration diagram for Nextsim::Model:
Collaboration graph

Public Types

enum  {
  RESTARTFILE_KEY , STARTTIME_KEY , STOPTIME_KEY , RUNLENGTH_KEY ,
  TIMESTEP_KEY , MISSINGVALUE_KEY
}
 
- Public Types inherited from Nextsim::Configured< Model >
typedef ConfigurationHelp::HelpMap HelpMap
 
using ConfigType
 

Public Member Functions

void configure () override
 The configuration function.
 
ConfigMap getConfig () const
 
void run ()
 Run the model.
 
void writeRestartFile ()
 
void setFinalFilename (const std::string &finalFile)
 Sets the filename of the restart file that would currently be written out.
 
ModelMetadatametadata ()
 Gets the model metadata instance.
 
- Public Member Functions inherited from Nextsim::Configured< Model >
const std::map< int, std::string > keyMap
 
const std::map< int, std::string > keyMap
 
const std::map< int, std::string > keyMap
 
const std::map< int, std::string > keyMap
 
virtual ConfigMap getConfiguration () const
 Returns the current configuration of the object.
 
- Public Member Functions inherited from Nextsim::ConfiguredBase

Static Public Member Functions

static HelpMap & getHelpText (HelpMap &map, bool getAll)
 
static HelpMap & getHelpRecursive (HelpMap &map, bool getAll)
 
- Static Public Member Functions inherited from Nextsim::Configured< Model >
static T getConfiguration (const std::string &name, const T &defaultValue)
 Gets the value of the configuration with a given name from the default Configurator.
 
static void tryConfigure (T &ref)
 Template function for conditionally configuring references.
 
static void tryConfigure (T *ptr)
 Template function for conditionally configuring classes via a pointer.
 
static ConfigMap tryGetConfiguration (T &ref)
 Template function for conditionally retrieving class configuration via a reference.
 
static ConfigMap tryGetConfiguration (T *ptr)
 Template function for conditionally retrieving class configuration via a pointer.
 
static HelpMap & getHelpText (HelpMap &map, bool getAll)
 Gets the text to be printed as the help text for this configuration.
 
static HelpMap & getHelpRecursive (HelpMap &map, bool getAll)
 Gets the configuration help text for the current class as well as any classes used herein.
 
static void clearConfigurationMap ()
 Clear the configuration map. Usually used only in test suites.
 

Static Public Attributes

static const std::string restartOptionName = "model.init_file"
 
- Static Public Attributes inherited from Nextsim::Configured< Model >
static const std::map< int, std::string > keyMap
 A per-class static map to provide compile-time checking of configuration keys.
 

Additional Inherited Members

- Protected Member Functions inherited from Nextsim::Configured< Model >
void addOption (const std::string &name, const T &defaultValue)
 Adds an option to the per-class option map.
 
retrieveValue (const std::string &name)
 Retrieves a configured value of a single option.
 

Detailed Description

A class that encapsulates the whole of the model.

Definition at line 24 of file Model.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Definition at line 31 of file Model.hpp.

Constructor & Destructor Documentation

◆ Model()

Nextsim::Model::Model ( )

Definition at line 37 of file Model.cpp.

◆ ~Model()

Nextsim::Model::~Model ( )

Definition at line 44 of file Model.cpp.

Member Function Documentation

◆ configure()

void Nextsim::Model::configure ( )
overridevirtual

The configuration function.

Implements Nextsim::Configured< Model >.

Definition at line 59 of file Model.cpp.

Here is the call graph for this function:

◆ getConfig()

ConfigMap Nextsim::Model::getConfig ( ) const

Definition at line 88 of file Model.cpp.

◆ getHelpRecursive()

Model::HelpMap & Nextsim::Model::getHelpRecursive ( HelpMap & map,
bool getAll )
static

Definition at line 124 of file Model.cpp.

◆ getHelpText()

Model::HelpMap & Nextsim::Model::getHelpText ( HelpMap & map,
bool getAll )
static

Definition at line 101 of file Model.cpp.

◆ metadata()

ModelMetadata & Nextsim::Model::metadata ( )

Gets the model metadata instance.

Definition at line 146 of file Model.cpp.

◆ run()

void Nextsim::Model::run ( )

Run the model.

Definition at line 132 of file Model.cpp.

Here is the call graph for this function:

◆ writeRestartFile()

void Nextsim::Model::writeRestartFile ( )

Definition at line 134 of file Model.cpp.

Member Data Documentation

◆ restartOptionName

const std::string Nextsim::Model::restartOptionName = "model.init_file"
static

Definition at line 57 of file Model.hpp.


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