GCBM
peatlanddisturbancemodule.h
Go to the documentation of this file.
1 #ifndef MOJA_MODULES_CBM_PEATLAND_DISTURBANCE_H_
2 #define MOJA_MODULES_CBM_PEATLAND_DISTURBANCE_H_
3 
4 #include "moja/modules/cbm/_modules.cbm_exports.h"
8 
9 namespace moja {
10  namespace modules {
11  namespace cbm {
12 
13  /*
14  Response to the historical and last disturbance events in CBM spinup
15  */
16  class CBM_API PeatlandDisturbanceModule : public CBMModuleBase {
17  public:
20 
21  std::string fireEvent = "fire";
22 
23  void configure(const DynamicObject& config) override;
24  void subscribe(NotificationCenter& notificationCenter) override;
25 
26  void doDisturbanceEvent(DynamicVar) override;
27  void doLocalDomainInit() override;
28  void doTimingInit() override;
29 
30  void fetchPeatlandDistMatrices();
31  void fetchPeatlandDMAssociations();
32  void fetchPeatlandDistModifiers();
33 
34  private:
35  typedef std::vector<CBMDistEventTransfer> EventVector;
36  typedef std::unordered_map<int, EventVector> EventMap;
37 
39  std::unordered_map<std::pair<int, std::string>, std::pair<int, int>> _dmAssociations;
40 
41  typedef std::vector<std::string> modifierVector;
42  std::unordered_map<int, modifierVector> _modifiers;
43 
44  flint::IVariable* _wtdModifier;
45 
46  int _peatlandId{ -1 };
47  bool _runPeatland{ false };
48  };
49  }
50  }
51 }
52 #endif
moja::modules::cbm::PeatlandDisturbanceModule::_modifiers
std::unordered_map< int, modifierVector > _modifiers
Definition: peatlanddisturbancemodule.h:42
moja::modules::cbm::PeatlandDisturbanceModule::~PeatlandDisturbanceModule
virtual ~PeatlandDisturbanceModule()
Definition: peatlanddisturbancemodule.h:19
moja::modules::cbm::PeatlandDisturbanceModule::modifierVector
std::vector< std::string > modifierVector
Definition: peatlanddisturbancemodule.h:41
moja::modules::cbm
Definition: ageclasshelper.cpp:12
moja::modules::cbm::CBMModuleBase
Definition: cbmmodulebase.h:22
moja::modules::cbm::PeatlandDisturbanceModule::EventVector
std::vector< CBMDistEventTransfer > EventVector
Definition: peatlanddisturbancemodule.h:35
moja::modules::cbm::PeatlandDisturbanceModule
Definition: peatlanddisturbancemodule.h:16
moja::modules::cbm::PeatlandDisturbanceModule::_matrices
EventMap _matrices
Definition: peatlanddisturbancemodule.h:38
moja::modules::cbm::PeatlandDisturbanceModule::_dmAssociations
std::unordered_map< std::pair< int, std::string >, std::pair< int, int > > _dmAssociations
Definition: peatlanddisturbancemodule.h:39
peatlandfireparameters.h
moja::modules::cbm::PeatlandDisturbanceModule::EventMap
std::unordered_map< int, EventVector > EventMap
Definition: peatlanddisturbancemodule.h:36
cbmdisturbanceeventmodule.h
moja::modules::cbm::PeatlandDisturbanceModule::PeatlandDisturbanceModule
PeatlandDisturbanceModule()
Definition: peatlanddisturbancemodule.h:18
moja
Definition: ageclasshelper.cpp:10
cbmmodulebase.h
moja::modules::cbm::PeatlandDisturbanceModule::_wtdModifier
flint::IVariable * _wtdModifier
Definition: peatlanddisturbancemodule.h:44