hydrobricks
Loading...
Searching...
No Matches
Flux Class Referenceabstract
Inheritance diagram for Flux:
FluxForcing FluxSimple FluxToAtmosphere FluxToBrick FluxToOutlet FluxToBrickInstantaneous

Public Member Functions

virtual bool IsValid () const =0
 
virtual void Validate () const
 
virtual void Reset ()
 
virtual double GetAmount ()=0
 
virtual void UpdateFlux (double amount)
 
void LinkChangeRate (double *rate)
 
double * GetChangeRatePointer ()
 
double * GetAmountPointer ()
 
virtual bool IsForcing () const
 
virtual bool IsInstantaneous () const
 
void SetAsStatic ()
 
bool IsStatic () const
 
bool NeedsWeighting () const
 
void NeedsWeighting (bool value)
 
void SetFractionUnitArea (double value)
 
void SetFractionLandCover (double value)
 
void UpdateFractionTotal ()
 
ContentType GetType () const
 
void SetType (const ContentType type)
 
bool HasChangeRate () const
 
bool HasModifier () const
 

Protected Attributes

double _amount {}
 
double * _changeRate {}
 
bool _static {}
 
bool _needsWeighting {}
 
double _fractionUnitArea {1.0}
 
double _fractionLandCover {1.0}
 
double _fractionTotal {1.0}
 
Modifier_modifier {}
 
ContentType _type {ContentType::Water}
 

Member Function Documentation

◆ GetAmount()

virtual double Flux::GetAmount ( )
pure virtual

Get the amount of water outgoing the flux.

Returns
the amount of water outgoing the flux

Implemented in FluxForcing, FluxSimple, FluxToAtmosphere, FluxToBrick, FluxToBrickInstantaneous, and FluxToOutlet.

◆ GetAmountPointer()

double * Flux::GetAmountPointer ( )
inline

Get the amount of water outgoing the flux.

Returns
the amount of water outgoing the flux

◆ GetChangeRatePointer()

double * Flux::GetChangeRatePointer ( )
inline

Get the change rate value pointer.

Returns
the change rate value pointer.

◆ GetType()

ContentType Flux::GetType ( ) const
inline

Get the flux type.

Returns
the flux type.

◆ HasChangeRate()

bool Flux::HasChangeRate ( ) const
inlinenodiscard

Check if the flux has a change rate linked.

Returns
true if the flux has a change rate pointer.

◆ HasModifier()

bool Flux::HasModifier ( ) const
inlinenodiscard

Check if the flux has a modifier.

Returns
true if the flux has a modifier.

◆ IsForcing()

virtual bool Flux::IsForcing ( ) const
inlinevirtual

Check if the flux is a forcing.

Returns
true if the flux is a forcing.

Reimplemented in FluxForcing.

◆ IsInstantaneous()

virtual bool Flux::IsInstantaneous ( ) const
inlinevirtual

Check if the flux is instantaneous.

Returns
true if the flux is instantaneous.

Reimplemented in FluxToBrickInstantaneous.

◆ IsStatic()

bool Flux::IsStatic ( ) const
inlinenodiscard

Check if the flux is static.

Returns
true if the flux is static.

◆ IsValid()

virtual bool Flux::IsValid ( ) const
nodiscardpure virtual

Check that everything is correctly defined.

Returns
true if everything is correctly defined.

Implemented in FluxForcing, FluxSimple, FluxToAtmosphere, FluxToBrick, FluxToBrickInstantaneous, and FluxToOutlet.

◆ LinkChangeRate()

void Flux::LinkChangeRate ( double * rate)
inline

Link the flux to a change rate value pointer.

Parameters
ratethe change rate value pointer.

◆ NeedsWeighting() [1/2]

bool Flux::NeedsWeighting ( ) const
inlinenodiscard

Check if the flux needs weighting.

Returns
true if the flux needs weighting.

◆ NeedsWeighting() [2/2]

void Flux::NeedsWeighting ( bool value)
inline

Set the flux as needing weighting.

Parameters
valuetrue if the flux needs weighting.

◆ Reset()

void Flux::Reset ( )
virtual

Reset the flux to its initial state.

◆ SetAsStatic()

void Flux::SetAsStatic ( )
inline

Set the flux as static.

◆ SetFractionLandCover()

void Flux::SetFractionLandCover ( double value)
inline

Set the fraction of the land cover.

Parameters
valuethe fraction of the land cover.

◆ SetFractionUnitArea()

void Flux::SetFractionUnitArea ( double value)
inline

Set the fraction of the unit area.

Parameters
valuethe fraction of the unit area.

◆ SetType()

void Flux::SetType ( const ContentType type)
inline

Set the flux type.

Parameters
typethe flux type.

◆ UpdateFlux()

void Flux::UpdateFlux ( double amount)
virtual

Set the water amount of the flux.

Parameters
amountthe water amount of the flux.

Reimplemented in FluxSimple, FluxToBrick, and FluxToBrickInstantaneous.

◆ UpdateFractionTotal()

void Flux::UpdateFractionTotal ( )
inline

Update the fraction total.

◆ Validate()

void Flux::Validate ( ) const
virtual

Validate that everything is correctly defined. Throws an exception if validation fails.

Exceptions
ModelConfigErrorif validation fails.

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