hydrobricks
Loading...
Searching...
No Matches
Process Class Referenceabstract
Inheritance diagram for Process:
ProcessET ProcessInfiltration ProcessMelt ProcessOutflow ProcessTransform ProcessETSocont ProcessInfiltrationSocont ProcessMeltDegreeDay ProcessMeltDegreeDayAspect ProcessMeltTemperatureIndex ProcessOutflowDirect ProcessOutflowLinear ProcessOutflowOverflow ProcessOutflowPercolation ProcessOutflowRestDirect ProcessRunoffSocont ProcessTransformSnowToIce

Public Member Functions

 Process (WaterContainer *container)
 
void Reset ()
 
virtual bool IsOk ()=0
 
virtual void SetHydroUnitProperties (HydroUnit *unit, Brick *brick)
 
virtual void SetParameters (const ProcessSettings &processSettings)
 
virtual void AttachForcing (Forcing *)
 
void AttachFluxOut (Flux *flux)
 
vector< Flux * > GetOutputFluxes ()
 
int GetOutputFluxesNb ()
 
virtual bool ToAtmosphere ()
 
virtual bool NeedsTargetBrickLinking ()
 
virtual int GetConnectionsNb ()=0
 
virtual vecDouble GetChangeRates ()
 
virtual void StoreInOutgoingFlux (double *rate, int index)
 
void ApplyChange (int connectionIndex, double rate, double timeStepInDays)
 
virtual void Finalize ()
 
virtual vecDoublePt GetStateVariables ()
 
virtual double * GetValuePointer (const string &name)
 
string GetName ()
 
void SetName (const string &name)
 
WaterContainerGetWaterContainer ()
 
virtual void SetTargetBrick (Brick *)
 

Static Public Member Functions

static ProcessFactory (const ProcessSettings &processSettings, Brick *brick)
 
static bool RegisterParametersAndForcing (SettingsModel *modelSettings, const string &processType)
 
static bool HasParameter (const ProcessSettings &processSettings, const string &name)
 
static float * GetParameterValuePointer (const ProcessSettings &processSettings, const string &name)
 

Protected Member Functions

double GetSumChangeRatesOtherProcesses ()
 
virtual vecDouble GetRates ()=0
 

Protected Attributes

string m_name
 
WaterContainerm_container
 
vector< Flux * > m_outputs
 

Member Function Documentation

◆ ApplyChange()

void Process::ApplyChange ( int connectionIndex,
double rate,
double timeStepInDays )

Apply the change rates to the process.

Parameters
connectionIndexindex of the connection.
ratechange rates.
timeStepInDaystime step in days.

◆ AttachFluxOut()

void Process::AttachFluxOut ( Flux * flux)
inline

Attach outgoing flux.

Parameters
fluxoutgoing flux

◆ AttachForcing()

virtual void Process::AttachForcing ( Forcing * )
inlinevirtual

Attach forcing to the process.

Parameters
forcingforcing to attach.

Reimplemented in ProcessETSocont, ProcessMeltDegreeDay, ProcessMeltDegreeDayAspect, and ProcessMeltTemperatureIndex.

◆ Factory()

Process * Process::Factory ( const ProcessSettings & processSettings,
Brick * brick )
static

Factory method to create a process.

Parameters
processSettingssettings of the process.
brickthe related brick.
Returns
the created process.

◆ Finalize()

virtual void Process::Finalize ( )
inlinevirtual

Finalize the process.

◆ GetChangeRates()

vecDouble Process::GetChangeRates ( )
virtual

Get the change rates of the process.

Returns
vector of change rates.

◆ GetConnectionsNb()

virtual int Process::GetConnectionsNb ( )
pure virtual

Get the number of connections to the process.

Returns
number of connections to the process.

Implemented in ProcessET, ProcessInfiltration, ProcessMelt, ProcessOutflow, and ProcessTransform.

◆ GetName()

string Process::GetName ( )
inline

Get the name of the process.

Returns
name of the process.

◆ GetOutputFluxes()

vector< Flux * > Process::GetOutputFluxes ( )
inline

Get the outgoing fluxes.

Returns
vector of pointers to the outgoing fluxes.

◆ GetOutputFluxesNb()

int Process::GetOutputFluxesNb ( )
inline

Get the number of outgoing fluxes.

Returns
number of outgoing fluxes.

◆ GetParameterValuePointer()

float * Process::GetParameterValuePointer ( const ProcessSettings & processSettings,
const string & name )
static

Get the value pointer of a parameter.

Parameters
processSettingssettings of the process containing the parameters.
namename of the parameter to get.
Returns
pointer to the value of the parameter.

◆ GetRates()

◆ GetStateVariables()

virtual vecDoublePt Process::GetStateVariables ( )
inlinevirtual

Get pointers to the state variables.

Returns
vector of pointers to the state variables.

◆ GetSumChangeRatesOtherProcesses()

double Process::GetSumChangeRatesOtherProcesses ( )
protected

Get the sum of change rates from other processes.

Returns
sum of change rates from other processes.

◆ GetValuePointer()

double * Process::GetValuePointer ( const string & name)
virtual

Get the value pointer for a given element.

Parameters
namename of the element to get.
Returns
pointer to the value of the given element.

Reimplemented in ProcessET, ProcessInfiltration, ProcessMelt, ProcessOutflow, and ProcessTransform.

◆ GetWaterContainer()

WaterContainer * Process::GetWaterContainer ( )
inline

Get the water container associated with the process.

Returns
pointer to the water container.

◆ HasParameter()

bool Process::HasParameter ( const ProcessSettings & processSettings,
const string & name )
static

Check if the process has a parameter with the provided name.

Parameters
processSettingssettings of the process containing the parameters.
namename of the parameter to check.
Returns
true if the process has a parameter with the provided name.

◆ IsOk()

virtual bool Process::IsOk ( )
pure virtual

Check that everything is correctly defined.

Returns
true is everything is correctly defined.

Implemented in ProcessET, ProcessETSocont, ProcessInfiltration, ProcessMelt, ProcessMeltDegreeDay, ProcessMeltDegreeDayAspect, ProcessMeltTemperatureIndex, ProcessOutflow, and ProcessTransform.

◆ NeedsTargetBrickLinking()

virtual bool Process::NeedsTargetBrickLinking ( )
inlinevirtual

Check if the process needs to link the target brick.

Returns
true if the process needs to link the target brick.

Reimplemented in ProcessInfiltration.

◆ RegisterParametersAndForcing()

bool Process::RegisterParametersAndForcing ( SettingsModel * modelSettings,
const string & processType )
static

Register the parameters and the needed forcing for the process.

Parameters
modelSettingssettings of the model.
processTypetype of process.
Returns
true if everything is correctly defined.

◆ Reset()

void Process::Reset ( )

Reset all the fluxes connected to the process.

◆ SetHydroUnitProperties()

void Process::SetHydroUnitProperties ( HydroUnit * unit,
Brick * brick )
virtual

Set the properties of the hydro unit.

Parameters
unitthe related hydro unit.
brickthe related brick.

Reimplemented in ProcessMeltDegreeDayAspect, and ProcessRunoffSocont.

◆ SetName()

void Process::SetName ( const string & name)
inline

Set the name of the process.

Parameters
namename of the process.

◆ SetParameters()

void Process::SetParameters ( const ProcessSettings & processSettings)
virtual

Assign the parameters to the process.

Parameters
processSettingssettings of the process containing the parameters.

Reimplemented in ProcessInfiltrationSocont, ProcessMeltDegreeDay, ProcessMeltDegreeDayAspect, ProcessMeltTemperatureIndex, ProcessOutflowLinear, ProcessOutflowOverflow, ProcessOutflowPercolation, ProcessRunoffSocont, and ProcessTransformSnowToIce.

◆ SetTargetBrick()

virtual void Process::SetTargetBrick ( Brick * )
inlinevirtual

Set the target brick for the process.

Parameters
bricktarget brick.

Reimplemented in ProcessInfiltration.

◆ StoreInOutgoingFlux()

void Process::StoreInOutgoingFlux ( double * rate,
int index )
virtual

Store the water corresponding to the change rates in the outgoing fluxes.

Parameters
ratechange rates.
indexindex of the flux.

Reimplemented in ProcessOutflowOverflow.

◆ ToAtmosphere()

virtual bool Process::ToAtmosphere ( )
inlinevirtual

Check if the process sends water to the atmosphere.

Returns
true if the process sends water to the atmosphere.

Reimplemented in ProcessET.


The documentation for this class was generated from the following files: