netxsimdg
Loading...
Searching...
No Matches
IDynamics.hpp
Go to the documentation of this file.
1
8#ifndef IDYNAMICS_HPP
9#define IDYNAMICS_HPP
10
12#include "include/Time.hpp"
13
14namespace Nextsim {
15class IDynamics : public ModelComponent {
16public:
17 IDynamics()
18 : uice(ModelArray::Type::H)
19 , vice(ModelArray::Type::H)
20 , hice(getSharedArray())
21 , cice(getSharedArray())
22 , hsnow(getSharedArray())
23 //, damage(getSharedArray())
24 {
25 }
26 virtual ~IDynamics() = default;
27
28 ModelState getState() const override { return ModelState(); }
29 ModelState getState(const OutputLevel&) const override { return getState(); }
30
31 std::string getName() const override { return "IDynamics"; }
32 void setData(const ModelState::DataMap& ms) override
33 {
34 uice.resize();
35 vice.resize();
36 }
37
38 virtual void update(const TimestepTime& tst) = 0;
39protected:
40 // Shared ice velocity arrays
41 HField uice;
42 HField vice;
43 // References to the DG0 finite volume data arrays
47 //ModelArrayRef<ModelComponent::SharedArray::D, MARBackingStore, RW> damage;
48};
49}
50
51#endif /* IDYNAMICS_HPP */
std::string getName() const override
Returns the name of the component.
Definition IDynamics.hpp:31
ModelState getState(const OutputLevel &) const override
Returns a ModelState from this component at a specified level.
Definition IDynamics.hpp:29
ModelState getState() const override
Returns a ModelState from this component.
Definition IDynamics.hpp:28
void setData(const ModelState::DataMap &ms) override
Set the initial data of the component from the passed ModelState.
Definition IDynamics.hpp:32
A class which provides indirect access to ModelArray.
static const MARBackingStore & getSharedArray()
Returns a const reference to the store for SharedArray fields.