|
|
string | _name |
| |
|
WaterContainer * | _container |
| |
|
TimeMachine * | _timeMachine {nullptr} |
| |
|
std::vector< std::unique_ptr< Flux > > | _outputs |
| |
|
vecDouble | _changeRates |
| |
◆ AddTargetBrickWithWeights()
| virtual void Process::AddTargetBrickWithWeights |
( |
Brick * | , |
|
|
const std::vector< Brick * > & | ) |
|
inlinevirtual |
Add a target brick together with the bricks whose area fractions weight the flux toward it (used by processes that fan out to several targets).
- Parameters
-
| target | the target brick. |
| weightSources | the bricks (land covers) whose area fractions weight the flux. |
Reimplemented in ProcessCapillaryHBV.
◆ ApplyChange()
| void Process::ApplyChange |
( |
int | connectionIndex, |
|
|
double | rate, |
|
|
double | timeStepInDays ) |
Apply the change rates to the process.
- Parameters
-
| connectionIndex | index of the connection. |
| rate | change rates. |
| timeStepInDays | time step in days. |
◆ AttachFluxOut()
| void Process::AttachFluxOut |
( |
std::unique_ptr< Flux > | flux | ) |
|
|
inline |
Attach outgoing flux.
- Parameters
-
| flux | outgoing flux (ownership transferred) |
◆ AttachForcing()
| virtual void Process::AttachForcing |
( |
Forcing * | | ) |
|
|
inlinevirtual |
Attach forcing to the process.
- Parameters
-
| forcing | forcing to attach. |
Reimplemented in ProcessETExponential, ProcessETGR4J, ProcessETHBV, ProcessETLinear, ProcessETOpenWater, ProcessETPowerLaw, ProcessETSocont, ProcessInterceptionGR4J, ProcessLateralSnowRedistributionFrey, ProcessMeltCemaNeige, ProcessMeltDegreeDay, ProcessMeltDegreeDayAspect, ProcessMeltTemperatureIndex, ProcessProductionGR4J, ProcessRefreezeDegreeDay, and ProcessSublimationPET.
◆ Factory()
Factory method to create a process.
- Parameters
-
| processSettings | settings of the process. |
| brick | the related brick. |
- Returns
- the created process.
◆ Finalize()
| virtual void Process::Finalize |
( |
| ) |
|
|
inlinevirtual |
◆ GetChangeRates()
| const vecDouble & Process::GetChangeRates |
( |
| ) |
|
|
nodiscardvirtual |
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.
- Returns
- vector of change rates.
Reimplemented in ProcessRoutingGR6J, and ProcessRoutingHBV.
◆ GetConnectionCount()
| virtual int Process::GetConnectionCount |
( |
| ) |
const |
|
nodiscardpure virtual |
◆ GetName()
| const string & Process::GetName |
( |
| ) |
const |
|
inline |
Get the name of the process.
- Returns
- name of the process.
◆ GetOutputFlux()
| Flux * Process::GetOutputFlux |
( |
size_t | index | ) |
const |
|
inline |
Get an outgoing flux by its index.
- Parameters
-
- Returns
- pointer to the flux.
◆ GetOutputFluxCount()
| int Process::GetOutputFluxCount |
( |
| ) |
const |
|
inline |
Get the number of outgoing fluxes.
- Returns
- number of outgoing fluxes.
◆ GetParameterValuePointer()
| const float * Process::GetParameterValuePointer |
( |
const ProcessSettings & | processSettings, |
|
|
std::string_view | name ) |
|
static |
Get the value pointer of a parameter.
- Parameters
-
| processSettings | settings of the process containing the parameters. |
| name | name of the parameter to get. |
- Returns
- pointer to the value of the parameter.
◆ GetRates()
| virtual const vecDouble & Process::GetRates |
( |
| ) |
|
|
nodiscardprotectedpure virtual |
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.
- Returns
- reference to the reusable buffer holding the rates.
Implemented in ProcessCapillaryHBV, ProcessETExponential, ProcessETGR4J, ProcessETHBV, ProcessETLinear, ProcessETOpenWater, ProcessETPowerLaw, ProcessETSocont, ProcessInfiltrationGR4J, ProcessInfiltrationHBV, ProcessInfiltrationSocont, ProcessInterceptionGR4J, ProcessLateralSnowRedistributionFrey, ProcessLateralSnowSlide, ProcessMeltCemaNeige, ProcessMeltDegreeDay, ProcessMeltDegreeDayAspect, ProcessMeltTemperatureIndex, ProcessOutflowDirect, ProcessOutflowLinear, ProcessOutflowOverflow, ProcessOutflowRest, ProcessOutflowSnowHolding, ProcessOutflowThreshold, ProcessPercolationConstant, ProcessPercolationGR4J, ProcessProductionGR4J, ProcessRefreezeDegreeDay, ProcessRoutingGR4J, ProcessRoutingGR6J, ProcessRoutingHBV, ProcessRunoffHBV, ProcessRunoffSocont, ProcessSublimationConstant, ProcessSublimationPET, ProcessTransformSnowToIceConstant, and ProcessTransformSnowToIceSwat.
◆ GetStateVariables()
| virtual vecDoublePt Process::GetStateVariables |
( |
| ) |
|
|
inlinevirtual |
Get pointers to the state variables.
- Returns
- vector of pointers to the state variables.
◆ GetSumChangeRatesOtherProcesses()
| double Process::GetSumChangeRatesOtherProcesses |
( |
| ) |
const |
|
nodiscardprotected |
Get the sum of change rates from other processes.
- Returns
- sum of change rates from other processes.
◆ GetValuePointer()
| double * Process::GetValuePointer |
( |
std::string_view | name | ) |
|
|
nodiscardvirtual |
◆ GetWaterContainer()
Get the water container associated with the process.
- Returns
- pointer to the water container.
◆ HasOutputFluxes()
| bool Process::HasOutputFluxes |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Check if the process has any output fluxes.
- Returns
- true if the process has at least one output flux.
◆ HasParameter()
| bool Process::HasParameter |
( |
const ProcessSettings & | processSettings, |
|
|
std::string_view | name ) |
|
staticnodiscard |
Check if the process has a parameter with the provided name.
- Parameters
-
| processSettings | settings of the process containing the parameters. |
| name | name of the parameter to check. |
- Returns
- true if the process has a parameter with the provided name.
◆ HasWaterContainer()
| bool Process::HasWaterContainer |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Check if the process has a water container.
- Returns
- true if the process has a water container.
◆ IsLateralProcess()
| virtual bool Process::IsLateralProcess |
( |
| ) |
const |
|
inlinenodiscardvirtualnoexcept |
◆ IsValid()
| virtual bool Process::IsValid |
( |
| ) |
const |
|
nodiscardpure virtual |
Check that everything is correctly defined.
- Returns
- true if everything is correctly defined.
Implemented in ProcessCapillaryHBV, ProcessET, ProcessETExponential, ProcessETGR4J, ProcessETHBV, ProcessETLinear, ProcessETOpenWater, ProcessETPowerLaw, ProcessETSocont, ProcessInfiltration, ProcessInfiltrationHBV, ProcessInterceptionGR4J, ProcessLateral, ProcessLateralSnowRedistributionFrey, ProcessLateralSnowSlide, ProcessMelt, ProcessMeltCemaNeige, ProcessMeltDegreeDay, ProcessMeltDegreeDayAspect, ProcessMeltTemperatureIndex, ProcessOutflow, ProcessOutflowDirect, ProcessOutflowSnowHolding, ProcessOutflowThreshold, ProcessProductionGR4J, ProcessRefreezeDegreeDay, ProcessRoutingHBV, ProcessRunoffHBV, ProcessSublimation, ProcessSublimationConstant, ProcessSublimationPET, and ProcessTransform.
◆ LinksMultipleTargets()
| virtual bool Process::LinksMultipleTargets |
( |
| ) |
const |
|
inlinenodiscardvirtual |
Check if the process links several target bricks (instead of a single one).
- Returns
- true if the process links several target bricks.
Reimplemented in ProcessCapillaryHBV.
◆ NeedsTargetBrickLinking()
| virtual bool Process::NeedsTargetBrickLinking |
( |
| ) |
const |
|
inlinenodiscardvirtual |
◆ RegisterSettings()
| bool Process::RegisterSettings |
( |
SettingsModel * | modelSettings, |
|
|
const string & | processType ) |
|
staticnodiscard |
Register the parameters and the needed forcing for the process.
- Parameters
-
| modelSettings | settings of the model. |
| processType | type of process. |
- Returns
- true if everything is correctly defined.
◆ Reset()
◆ SetHydroUnitProperties()
| void Process::SetHydroUnitProperties |
( |
HydroUnit * | unit, |
|
|
Brick * | brick ) |
|
virtual |
◆ SetName()
| void Process::SetName |
( |
const string & | name | ) |
|
|
inline |
Set the name of the process.
- Parameters
-
◆ SetParameters()
Assign the parameters to the process.
- Parameters
-
| processSettings | settings of the process containing the parameters. |
Reimplemented in ProcessCapillaryHBV, ProcessETExponential, ProcessETHBV, ProcessETPowerLaw, ProcessInfiltrationHBV, ProcessInfiltrationSocont, ProcessLateralSnowRedistributionFrey, ProcessLateralSnowSlide, ProcessMeltCemaNeige, ProcessMeltDegreeDay, ProcessMeltDegreeDayAspect, ProcessMeltTemperatureIndex, ProcessOutflowLinear, ProcessOutflowOverflow, ProcessOutflowSnowHolding, ProcessOutflowThreshold, ProcessPercolationConstant, ProcessRefreezeDegreeDay, ProcessRoutingGR4J, ProcessRoutingGR6J, ProcessRoutingHBV, ProcessRunoffHBV, ProcessRunoffSocont, ProcessSublimationConstant, ProcessSublimationPET, ProcessTransformSnowToIceConstant, and ProcessTransformSnowToIceSwat.
◆ SetTargetBrick()
| virtual void Process::SetTargetBrick |
( |
Brick * | | ) |
|
|
inlinevirtual |
◆ SetTimeMachine()
| void Process::SetTimeMachine |
( |
TimeMachine * | timeMachine | ) |
|
|
inline |
Set the time machine (non-owning reference). Required by processes that depend on the current simulation date.
- Parameters
-
| timeMachine | pointer to the time machine. |
◆ StoreInOutgoingFlux()
| void Process::StoreInOutgoingFlux |
( |
double * | rate, |
|
|
int | index ) |
|
virtual |
Store the water corresponding to the change rates in the outgoing fluxes.
- Parameters
-
| rate | change rates. |
| index | index of the flux. |
Reimplemented in ProcessOutflowOverflow.
◆ StoreRates()
| const vecDouble & Process::StoreRates |
( |
std::initializer_list< double > | rates | ) |
|
|
inlineprotected |
Store change rates in the reusable buffer and return a reference to it.
Reuses the buffer's capacity (no heap allocation after the first call), which matters because this is on the per-timestep solver hot path.
- Parameters
-
| rates | the change rates to store. |
- Returns
- reference to the reusable buffer holding the rates.
◆ ToAtmosphere()
| virtual bool Process::ToAtmosphere |
( |
| ) |
const |
|
inlinenodiscardvirtual |
Check if the process sends water to the atmosphere.
- Returns
- true if the process sends water to the atmosphere.
Reimplemented in ProcessET, and ProcessSublimation.
◆ Validate()
| void Process::Validate |
( |
| ) |
const |
|
virtual |
Validate that everything 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/processes/Process.h
- /github/workspace/core/src/processes/Process.cpp