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

A class to hold a grid of ElementData instances in a fixed sized square grid. More...

#include <DevGrid.hpp>

Inheritance diagram for Nextsim::DevGrid:
Inheritance graph
Collaboration diagram for Nextsim::DevGrid:
Collaboration graph

Public Member Functions

virtual ~DevGrid ()
 Destructor. The lifetime of pio should be the lifetime of the instance.
 
ModelState getModelState (const std::string &filePath) override
 Dumps the data to a file path.
 
void dumpModelState (const ModelState &state, const ModelMetadata &metadata, const std::string &filePath, bool isRestart=false) const override
 Dumps the data to a file path.
 
const std::string & structureType () const override
 Returns the structure name that this class will process.
 
int nIceLayers () const override
 The number of ice layers in this data structure.
 
void setIO (IDevGridIO *p)
 Sets the pointer to the class that will perform the IO. Should be an instance of DevGridIO.
 
- Public Member Functions inherited from Nextsim::IStructure
bool structureTypeCheck (const std::string &str) const
 Checks if the passed string matches (ignoring case) the name of the structure that this class constructs.
 

Static Public Attributes

static const int nx = 10
 
static const std::string structureName = "devgrid"
 
static const std::string xDimName = "x"
 
static const std::string yDimName = "y"
 
static const std::string nIceLayersName = "nLayers"
 

Additional Inherited Members

- Static Public Member Functions inherited from Nextsim::IStructure
static const std::string metadataNodeName ()
 Returns the name of the metadata node.
 
static const std::string dataNodeName ()
 Returns the name of the data node.
 
static const std::string structureNodeName ()
 The name of the group holding the definitive structure type.
 
static const std::string typeNodeName ()
 The name of the node holding the name of the structure type processed by this class.
 

Detailed Description

A class to hold a grid of ElementData instances in a fixed sized square grid.

Definition at line 23 of file DevGrid.hpp.

Constructor & Destructor Documentation

◆ DevGrid()

Nextsim::DevGrid::DevGrid ( )
inline

Definition at line 25 of file DevGrid.hpp.

◆ ~DevGrid()

virtual Nextsim::DevGrid::~DevGrid ( )
inlinevirtual

Destructor. The lifetime of pio should be the lifetime of the instance.

Definition at line 31 of file DevGrid.hpp.

Member Function Documentation

◆ dumpModelState()

void Nextsim::DevGrid::dumpModelState ( const ModelState & state,
const ModelMetadata & metadata,
const std::string & filePath,
bool isRestart = false ) const
inlineoverridevirtual

Dumps the data to a file path.

Parameters
filePathThe path to attempt writing the data to.

Dumps the given ModelState to the given file path.

Parameters
stateThe ModelState data
filePathThe path to attempt to write the data to.

Implements Nextsim::IStructure.

Definition at line 47 of file DevGrid.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getModelState()

ModelState Nextsim::DevGrid::getModelState ( const std::string & filePath)
inlineoverridevirtual

Dumps the data to a file path.

Parameters
filePathThe path to attempt writing the data to.

Returns the ModelState stored in the file

Implements Nextsim::IStructure.

Definition at line 42 of file DevGrid.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nIceLayers()

int Nextsim::DevGrid::nIceLayers ( ) const
inlineoverridevirtual

The number of ice layers in this data structure.

Implements Nextsim::IStructure.

Definition at line 55 of file DevGrid.hpp.

◆ setIO()

void Nextsim::DevGrid::setIO ( IDevGridIO * p)
inline

Sets the pointer to the class that will perform the IO. Should be an instance of DevGridIO.

Definition at line 58 of file DevGrid.hpp.

Here is the caller graph for this function:

◆ structureType()

const std::string & Nextsim::DevGrid::structureType ( ) const
inlineoverridevirtual

Returns the structure name that this class will process.

Reimplemented from Nextsim::IStructure.

Definition at line 53 of file DevGrid.hpp.

Member Data Documentation

◆ nIceLayersName

const std::string Nextsim::DevGrid::nIceLayersName = "nLayers"
static

Definition at line 62 of file DevGrid.hpp.

◆ nx

const int Nextsim::DevGrid::nx = 10
static

Definition at line 38 of file DevGrid.hpp.

◆ structureName

const std::string Nextsim::DevGrid::structureName = "devgrid"
static

Definition at line 39 of file DevGrid.hpp.

◆ xDimName

const std::string Nextsim::DevGrid::xDimName = "x"
static

Definition at line 60 of file DevGrid.hpp.

◆ yDimName

const std::string Nextsim::DevGrid::yDimName = "y"
static

Definition at line 61 of file DevGrid.hpp.


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