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 [[nodiscard]] bool RequiresDailyTimeStep() const override {
46 return true;
47 }
48
52 void SetParameters(const ProcessSettings& processSettings) override;
53
57 void Reset() override;
58
62 void Finalize() override;
63
67 double* GetValuePointer(std::string_view name) override;
68
75 [[nodiscard]] const vecDouble& GetChangeRates() override;
76
77 protected:
78 const float* _exchangeFactor; // X2 [mm/d]
79 const float* _routingCapacity; // X3 [mm]
80 const float* _uhBaseTime; // X4 [d]
81 const float* _exchangeThreshold; // X5 [-]
82 const float* _expStoreCoeff; // X6 [mm]
83
84 // Unit-hydrograph convolution buffers (length changes with X4)
85 vecDouble _stuh1;
86 vecDouble _stuh2;
87
88 // Pre-computed UH ordinates
89 vecDouble _uh1Ord;
90 vecDouble _uh2Ord;
91
92 // Store levels [mm] — updated in Finalize()
93 double _r; // power routing store
94 double _rexp; // exponential store (may be negative)
95
96 // Logged discharge components exposed via GetValuePointer
97 double _qr;
98 double _qrexp;
99 double _qd;
100
101 // Cached total process-internal water storage for water balance logging
102 double _processStorage;
103
110 const vecDouble& GetRates() override;
111
115 void _recomputeUH();
116};
117
118#endif // HYDROBRICKS_PROCESS_ROUTING_GR6J_H
Definition ProcessOutflow.h:8
Definition ProcessRoutingGR6J.h:31
void _recomputeUH()
Definition ProcessRoutingGR6J.cpp:220
bool RequiresDailyTimeStep() const override
Definition ProcessRoutingGR6J.h:45
void SetParameters(const ProcessSettings &processSettings) override
Definition ProcessRoutingGR6J.cpp:42
const vecDouble & GetChangeRates() override
Definition ProcessRoutingGR6J.cpp:91
const vecDouble & GetRates() override
Definition ProcessRoutingGR6J.cpp:98
void Finalize() override
Definition ProcessRoutingGR6J.cpp:155
static void RegisterProcessSettings(SettingsModel *modelSettings)
Definition ProcessRoutingGR6J.cpp:31
void Reset() override
Definition ProcessRoutingGR6J.cpp:52
double * GetValuePointer(std::string_view name) override
Definition ProcessRoutingGR6J.cpp:65
Definition SettingsModel.h:74
Definition WaterContainer.h:10
Definition SettingsModel.h:32