GCBM
cbmspinupdisturbancemodule.h
Go to the documentation of this file.
1 #ifndef MOJA_MODULES_CBM_CBM_SPINUPDISTURBANCEMODULE_H_
2 #define MOJA_MODULES_CBM_CBM_SPINUPDISTURBANCEMODULE_H_
3 
4 #include "moja/modules/cbm/_modules.cbm_exports.h"
7 
8 namespace moja {
9 namespace modules {
10 namespace cbm {
11 
12  /*
13  Response to the historical and last disturbance events in CBM spinup
14  */
15  class CBM_API CBMSpinupDisturbanceModule : public CBMModuleBase {
16  public:
19 
20  void configure(const DynamicObject& config) override;
21  void subscribe(NotificationCenter& notificationCenter) override;
22 
23  void doDisturbanceEvent(DynamicVar) override;
24  void doLocalDomainInit() override;
25  void doTimingInit() override;
26 
27  private:
28  typedef std::vector<CBMDistEventTransfer> EventVector;
29  typedef std::unordered_map<int, EventVector> EventMap;
30 
31  flint::IVariable* _spu;
32  int _spuId;
34  std::unordered_map<std::pair<std::string, int>, int> _dmAssociations;
35 
36  void fetchMatrices();
37  void fetchDMAssociations();
38  };
39 }}}
40 #endif
moja::modules::cbm::CBMSpinupDisturbanceModule::CBMSpinupDisturbanceModule
CBMSpinupDisturbanceModule()
Definition: cbmspinupdisturbancemodule.h:17
moja::modules::cbm
Definition: ageclasshelper.cpp:12
moja::modules::cbm::CBMSpinupDisturbanceModule
Definition: cbmspinupdisturbancemodule.h:15
moja::modules::cbm::CBMModuleBase
Definition: cbmmodulebase.h:22
moja::modules::cbm::CBMSpinupDisturbanceModule::EventMap
std::unordered_map< int, EventVector > EventMap
Definition: cbmspinupdisturbancemodule.h:29
moja::modules::cbm::CBMSpinupDisturbanceModule::EventVector
std::vector< CBMDistEventTransfer > EventVector
Definition: cbmspinupdisturbancemodule.h:28
moja::modules::cbm::CBMSpinupDisturbanceModule::_dmAssociations
std::unordered_map< std::pair< std::string, int >, int > _dmAssociations
Definition: cbmspinupdisturbancemodule.h:34
moja::modules::cbm::CBMSpinupDisturbanceModule::~CBMSpinupDisturbanceModule
virtual ~CBMSpinupDisturbanceModule()
Definition: cbmspinupdisturbancemodule.h:18
cbmdisturbanceeventmodule.h
moja::modules::cbm::CBMSpinupDisturbanceModule::_matrices
EventMap _matrices
Definition: cbmspinupdisturbancemodule.h:33
moja::modules::cbm::CBMSpinupDisturbanceModule::_spuId
int _spuId
Definition: cbmspinupdisturbancemodule.h:32
moja
Definition: ageclasshelper.cpp:10
cbmmodulebase.h
moja::modules::cbm::CBMSpinupDisturbanceModule::_spu
flint::IVariable * _spu
Definition: cbmspinupdisturbancemodule.h:31