|
hydrobricks
|
#include <ProcessOutflowSplit.h>
Public Member Functions | |
| ProcessOutflowSplit (WaterContainer *container) | |
| bool | IsValid () const override |
| void | SetParameters (const ProcessSettings &processSettings) override |
| const vecDouble & | GetChangeRates () override |
| double | GetSplitFraction () const |
Public Member Functions inherited from ProcessOutflow | |
| ProcessOutflow (WaterContainer *container) | |
| int | GetConnectionCount () const override |
| double * | GetValuePointer (std::string_view name) override |
Public Member Functions inherited from Process | |
| Process (WaterContainer *container) | |
| virtual void | Reset () |
| virtual void | Validate () const |
| const float * | GetParameterValuePointer (const ProcessSettings &processSettings, std::string_view name) |
| void | SetParentContext (HydroUnit *unit, Brick *brick) |
| virtual void | SetHydroUnitProperties (HydroUnit *unit, Brick *brick) |
| virtual void | AttachForcing (Forcing *) |
| void | AttachFluxOut (std::unique_ptr< Flux > flux) |
| int | GetOutputFluxCount () const |
| Flux * | GetOutputFlux (size_t index) const |
| virtual bool | ToAtmosphere () const |
| virtual bool | RequiresDailyTimeStep () const |
| virtual bool | NeedsTargetBrickLinking () const |
| virtual bool | NeedsGateBrickLinking () const |
| virtual bool | HasConstraintPriority () const |
| virtual void | StoreInOutgoingFlux (double *rate, int index) |
| void | ApplyChange (int connectionIndex, double rate, double timeStepInDays) |
| virtual void | Finalize () |
| virtual vecDoublePt | GetStateVariables () |
| const string & | GetName () const |
| void | SetName (const string &name) |
| void | SetTimeMachine (TimeMachine *timeMachine) |
| WaterContainer * | GetWaterContainer () const |
| virtual void | SetTargetBrick (Brick *) |
| virtual void | AddGateBrick (Brick *) |
| virtual bool | LinksMultipleTargets () const |
| virtual void | AddTargetBrickWithWeights (Brick *, const std::vector< Brick * > &) |
| virtual bool | IsLateralProcess () const noexcept |
| virtual bool | HasLinearResponse () const |
| virtual double | GetLinearResponseRate () const |
| virtual double | GetLinearResponseOffset () const |
| bool | HasOutputFluxes () const noexcept |
| bool | HasWaterContainer () const noexcept |
Static Public Member Functions | |
| static void | RegisterProcessSettings (SettingsModel *modelSettings) |
Static Public Member Functions inherited from ProcessOutflow | |
| static void | RegisterProcessSettings (SettingsModel *modelSettings) |
Static Public Member Functions inherited from Process | |
| static std::unique_ptr< Process > | Factory (const ProcessSettings &processSettings, Brick *brick) |
| static bool | RegisterSettings (SettingsModel *modelSettings, const string &processType) |
| static bool | HasParameter (const ProcessSettings &processSettings, std::string_view name) |
Protected Member Functions | |
| const vecDouble & | GetRates () override |
Protected Member Functions inherited from Process | |
| double | GetForcingRate (Forcing *forcing) const |
| double | GetTimeStepInDays () const |
| int | GetCurrentDayOfYear () const |
| const vecDouble & | StoreRates (std::initializer_list< double > rates) |
| double | GetSumChangeRatesOtherProcesses () const |
Protected Attributes | |
| const float * | _splitFraction |
Protected Attributes inherited from Process | |
| string | _name |
| WaterContainer * | _container |
| TimeMachine * | _timeMachine {nullptr} |
| HydroUnit * | _hydroUnit {nullptr} |
| string | _parentBrickName |
| std::vector< std::unique_ptr< Flux > > | _outputs |
| vecDouble | _changeRates |
Fixed-ratio outflow split: drains the container content to two targets.
outflow_1 = f × S / Δt outflow_2 = (1 − f) × S / Δt
f is the split fraction [-] going to the first target. Used as the single process of a pass-through storage to partition an inflow at a fixed ratio (e.g. the PREVAH SLOWCOMP groundwater recharge split of 8/9 to SLZ2 and 1/9 to SLZ3). Because it claims the whole content, it cannot share a container with another process (IsValid() rejects that).
|
inlinenodiscardoverridevirtual |
Get the change rates of the process.
The returned reference points to a reusable per-process buffer that is overwritten on the next call; consume it before calling again.
Bypasses the empty-container shortcut of the base class (as ProcessRoutingHBV does): the split typically drains the whole content within the timestep, which would zero the rates at later solver stages. GetRates() clamps at zero content, and the container constraints prevent any negative content.
Reimplemented from Process.
|
overrideprotectedvirtual |
Get the rates of the process.
Implementations must store their result via StoreRates() (or directly in the _changeRates buffer) and return the reference, to avoid allocating on the hot path.
Implements Process.
|
inlinenodiscard |
Get the fraction of the outflow sent to the first target.
|
nodiscardoverridevirtual |
Check that everything is correctly defined.
Requires exactly two outputs and, as it drains the whole container content, it is incompatible with any sibling process drawing from the same container.
Reimplemented from ProcessOutflow.
|
static |
Register the process parameters and forcing in the settings model.
| modelSettings | The settings model to register the parameters in. |
|
overridevirtual |
Assign the parameters to the process.
| processSettings | settings of the process containing the parameters. |
Reimplemented from Process.