hydrobricks
Loading...
Searching...
No Matches
ProcessRoutingGR6J.h
1#ifndef HYDROBRICKS_PROCESS_ROUTING_GR6J_H
2#define HYDROBRICKS_PROCESS_ROUTING_GR6J_H
3
4#include "Includes.h"
5#include "ProcessOutflow.h"
6
32 public:
33 explicit ProcessRoutingGR6J(WaterContainer* container);
34
35 ~ProcessRoutingGR6J() override = default;
36
40 static void RegisterProcessSettings(SettingsModel* modelSettings);
41
45 void SetParameters(const ProcessSettings& processSettings) override;
46
50 void Reset() override;
51
55 void Finalize() override;
56
60 double* GetValuePointer(std::string_view name) override;
61
68 [[nodiscard]] vecDouble GetChangeRates() override;
69
70 protected:
71 const float* _exchangeFactor; // X2 [mm/d]
72 const float* _routingCapacity; // X3 [mm]
73 const float* _uhBaseTime; // X4 [d]
74 const float* _exchangeThreshold; // X5 [-]
75 const float* _expStoreCoeff; // X6 [mm]
76
77 // Unit-hydrograph convolution buffers (length changes with X4)
78 vecDouble _stuh1;
79 vecDouble _stuh2;
80
81 // Pre-computed UH ordinates
82 vecDouble _uh1Ord;
83 vecDouble _uh2Ord;
84
85 // Store levels [mm] — updated in Finalize()
86 double _r; // power routing store
87 double _rexp; // exponential store (may be negative)
88
89 // Logged discharge components exposed via GetValuePointer
90 double _qr;
91 double _qrexp;
92 double _qd;
93
94 // Cached total process-internal water storage for water balance logging
95 double _processStorage;
96
103 vecDouble GetRates() override;
104
108 void _recomputeUH();
109};
110
111#endif // HYDROBRICKS_PROCESS_ROUTING_GR6J_H
Definition ProcessOutflow.h:8
Definition ProcessRoutingGR6J.h:31
vecDouble GetChangeRates() override
Definition ProcessRoutingGR6J.cpp:91
void _recomputeUH()
Definition ProcessRoutingGR6J.cpp:220
void SetParameters(const ProcessSettings &processSettings) override
Definition ProcessRoutingGR6J.cpp:42
void Finalize() override
Definition ProcessRoutingGR6J.cpp:155
static void RegisterProcessSettings(SettingsModel *modelSettings)
Definition ProcessRoutingGR6J.cpp:31
vecDouble GetRates() override
Definition ProcessRoutingGR6J.cpp:98
void Reset() override
Definition ProcessRoutingGR6J.cpp:52
double * GetValuePointer(std::string_view name) override
Definition ProcessRoutingGR6J.cpp:65
Definition SettingsModel.h:69
Definition WaterContainer.h:9
Definition SettingsModel.h:29