◆ AddAmountToDynamicContentChange()
| void WaterContainer::AddAmountToDynamicContentChange |
( |
double | change | ) |
|
Add the amount of water to the dynamic content change.
- Parameters
-
◆ AddAmountToStaticContentChange()
| void WaterContainer::AddAmountToStaticContentChange |
( |
double | change | ) |
|
Add the amount of water to the static content change.
- Parameters
-
◆ AllowsNegativeContent()
| bool WaterContainer::AllowsNegativeContent |
( |
| ) |
const |
|
inlinenodiscard |
Check if the water container may hold negative content.
- Returns
- true if negative content is allowed.
◆ ApplyConstraints()
| void WaterContainer::ApplyConstraints |
( |
double | timeStep | ) |
|
|
virtual |
Apply the constraints to the water container.
- Parameters
-
Reimplemented in IceContainer.
◆ AttachFluxIn()
| void WaterContainer::AttachFluxIn |
( |
Flux * | flux | ) |
|
|
inline |
Attach incoming flux (non-owning; caller retains ownership).
- Parameters
-
| flux | incoming flux (non-owning reference, owned by process) |
◆ AttachFluxInOwned()
| void WaterContainer::AttachFluxInOwned |
( |
std::unique_ptr< Flux > | flux | ) |
|
|
inline |
Attach incoming flux and take ownership of it. Used for forcing fluxes that are not owned by any process.
- Parameters
-
| flux | incoming flux (ownership transferred) |
◆ BookIncomingFluxes()
| double WaterContainer::BookIncomingFluxes |
( |
bool | asStatic = false | ) |
|
Book the amounts of the incoming fluxes into the content changes and flag them as booked, so that ApplyConstraints accounts for them through the content instead of adding them a second time as pending inputs. The flag is cleared by Finalize.
- Parameters
-
| asStatic | true to book the amounts as a static change (the incoming amount is then not part of the dynamic state integrated by the solvers), false for a dynamic one. |
- Returns
- the summed amount of the incoming fluxes [mm]
◆ ContentAccessible()
| bool WaterContainer::ContentAccessible |
( |
| ) |
const |
|
virtual |
Check if the water content is accessible.
- Returns
- true if the content (including pending changes) is greater than zero.
Reimplemented in IceContainer.
◆ Finalize()
| void WaterContainer::Finalize |
( |
| ) |
|
Finalize the water container computation.
◆ GetContentPointer()
| double * WaterContainer::GetContentPointer |
( |
| ) |
|
|
inline |
Get the water content value pointer.
- Returns
- pointer to the water content value
◆ GetContentWithChanges()
| double WaterContainer::GetContentWithChanges |
( |
| ) |
const |
|
inline |
Get the water content of the current object.
- Returns
- water content [mm]
◆ GetContentWithDynamicChanges()
| double WaterContainer::GetContentWithDynamicChanges |
( |
| ) |
const |
|
inline |
Get the water content of the current object with dynamic changes.
- Returns
- water content [mm]
◆ GetContentWithoutChanges()
| double WaterContainer::GetContentWithoutChanges |
( |
| ) |
const |
|
inline |
Get the water content of the current object without changes.
- Returns
- water content [mm]
◆ GetDynamicContentChanges()
| vecDoublePt WaterContainer::GetDynamicContentChanges |
( |
| ) |
|
|
nodiscard |
Get the dynamic content changes.
- Returns
- dynamic content changes [mm]
◆ GetMaximumCapacity()
| double WaterContainer::GetMaximumCapacity |
( |
| ) |
const |
|
inlinenodiscard |
Get the maximum capacity of the water container.
- Returns
- maximum capacity [mm]
◆ GetParentBrick()
| Brick * WaterContainer::GetParentBrick |
( |
| ) |
const |
|
inline |
Get the parent brick of the water container.
- Returns
- pointer to the parent brick
◆ GetTargetFillingRatio()
| double WaterContainer::GetTargetFillingRatio |
( |
| ) |
const |
|
nodiscard |
Get the filling ratio of the water container.
- Returns
- filling ratio [0-1]
◆ HasIncomingFluxes()
| bool WaterContainer::HasIncomingFluxes |
( |
| ) |
const |
|
inlinenodiscard |
Check if the water container has any incoming fluxes.
- Returns
- true if the water container has at least one incoming flux.
◆ HasInitialState()
| bool WaterContainer::HasInitialState |
( |
| ) |
const |
|
inlinenodiscard |
Check if the water container has a non-zero initial state.
- Returns
- true if the water container has a non-zero initial state.
◆ HasMaximumCapacity()
| bool WaterContainer::HasMaximumCapacity |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Check if the water container has a maximum capacity.
- Returns
- true if the water container has a maximum capacity, false otherwise
◆ HasOverflow()
| bool WaterContainer::HasOverflow |
( |
| ) |
const |
|
inline |
Check if the water container has an overflow process.
- Returns
- true if the water container has an overflow process, false otherwise
◆ HasParentBrick()
| bool WaterContainer::HasParentBrick |
( |
| ) |
const |
|
inlinenodiscard |
Check if the water container has a parent brick.
- Returns
- true if the water container has a parent brick.
◆ IsEmpty()
| bool WaterContainer::IsEmpty |
( |
| ) |
const |
|
inlinenodiscard |
Check if the water container is empty.
- Returns
- true if the water container is empty.
◆ IsInfiniteStorage()
| bool WaterContainer::IsInfiniteStorage |
( |
| ) |
const |
|
inlinenodiscard |
Check if the water container is an infinite storage.
- Returns
- true if the water container is an infinite storage.
◆ IsNotEmpty()
| bool WaterContainer::IsNotEmpty |
( |
| ) |
const |
|
inline |
Check if the water container is not empty.
- Returns
- true if the water container is not empty, false otherwise
◆ IsValid()
| bool WaterContainer::IsValid |
( |
bool | checkProcesses = true | ) |
const |
|
nodiscardvirtual |
Check if the water container is correctly defined.
- Returns
- true if everything is correctly defined.
◆ LinkOverflow()
| void WaterContainer::LinkOverflow |
( |
Process * | overflow | ) |
|
|
inline |
Link the water container to an overflow process.
- Parameters
-
| overflow | pointer to the overflow process |
◆ Reset()
| void WaterContainer::Reset |
( |
| ) |
|
Reset the water container to its initial state.
◆ ResetInputBooking()
| void WaterContainer::ResetInputBooking |
( |
| ) |
|
|
inline |
Flag the incoming amounts as no longer booked into the content changes. Needed by the multi-stage solvers: they book the inputs at the intermediate stages and then drop the dynamic changes again (Processor::ResetState) before constraining the combined rates.
◆ SaveAsInitialState()
| void WaterContainer::SaveAsInitialState |
( |
| ) |
|
Save the initial state of the water container.
◆ SetAllowNegativeContent()
| void WaterContainer::SetAllowNegativeContent |
( |
bool | allow = true | ) |
|
|
inline |
Allow the water content to go negative (no non-negativity constraint).
Required by routing processes that hold a bottomless store whose level can be negative (e.g. the GR6J exponential store). The container content then tracks the full routing storage, including the negative excursion, so the discharge and the water balance stay consistent.
- Parameters
-
| allow | true to allow negative content. |
◆ SetAsInfiniteStorage()
| void WaterContainer::SetAsInfiniteStorage |
( |
| ) |
|
|
inline |
Set the water container as an infinite storage.
◆ SetInitialState()
| void WaterContainer::SetInitialState |
( |
double | value | ) |
|
|
inline |
Set the initial state of the water container.
- Parameters
-
◆ SetMaximumCapacity()
| void WaterContainer::SetMaximumCapacity |
( |
const float * | value | ) |
|
|
inline |
Set the maximum capacity of the water container.
- Parameters
-
| value | maximum capacity [mm] |
◆ SetOutgoingRatesToZero()
| void WaterContainer::SetOutgoingRatesToZero |
( |
| ) |
|
Set the outgoing rates to zero.
◆ SubtractAmountFromDynamicContentChange()
| void WaterContainer::SubtractAmountFromDynamicContentChange |
( |
double | change | ) |
|
Subtract the amount of water from the dynamic content change.
- Parameters
-
| change | amount to subtract [mm] |
◆ SumIncomingAmounts()
| double WaterContainer::SumIncomingAmounts |
( |
| ) |
const |
Sum the amounts delivered this step by the inputs that carry an amount rather than a rate (forcing, static and instantaneous fluxes), as long as the brick has not booked them into its content yet. The counterpart of SumIncomingChangeRates: together they give all the water reaching the container during the step.
- Returns
- the summed incoming amount [mm], or 0 once the inputs are booked.
◆ SumIncomingChangeRates()
| double WaterContainer::SumIncomingChangeRates |
( |
| ) |
const |
Sums the change rates [mm/d] of the dynamic incoming fluxes (skipping the forcing, static and instantaneous inputs). Valid during the change-rate computation phase once the upstream (earlier-declared) bricks have been processed, so their rates are linked to the fluxes. Mirrors the input handling of ApplyConstraints and is used by inflow-dependent outflow processes (the PREVAH SLOWCOMP overflow).
- Returns
- the summed incoming change rate [mm/d].
◆ SumIncomingFluxes()
| double WaterContainer::SumIncomingFluxes |
( |
| ) |
const |
|
virtual |
Sums the water amount from the different fluxes.
- Returns
- sum of the water amount [mm]
◆ UpdateContent()
| void WaterContainer::UpdateContent |
( |
double | value | ) |
|
|
inline |
Update the content of the water container.
- Parameters
-
◆ Validate()
| void WaterContainer::Validate |
( |
| ) |
const |
|
virtual |
Validate that the water container is correctly defined. Throws an exception if validation fails.
- Exceptions
-
The documentation for this class was generated from the following files:
- /github/workspace/core/src/containers/WaterContainer.h
- /github/workspace/core/src/containers/WaterContainer.cpp