hydrobricks
Loading...
Searching...
No Matches
WaterContainer Class Reference
Inheritance diagram for WaterContainer:
IceContainer SnowContainer

Public Member Functions

 WaterContainer (Brick *brick)
 
virtual bool IsValid (bool checkProcesses=true) const
 
virtual void Validate () const
 
void SubtractAmountFromDynamicContentChange (double change)
 
void AddAmountToDynamicContentChange (double change)
 
void AddAmountToStaticContentChange (double change)
 
virtual void ApplyConstraints (double timeStep)
 
void SetOutgoingRatesToZero ()
 
void Finalize ()
 
void Reset ()
 
void SaveAsInitialState ()
 
vecDoublePt GetDynamicContentChanges ()
 
bool HasMaximumCapacity () const
 
double GetMaximumCapacity () const
 
void SetMaximumCapacity (const float *value)
 
void SetAsInfiniteStorage ()
 
double GetContentWithChanges () const
 
double GetContentWithDynamicChanges () const
 
double GetContentWithoutChanges () const
 
double * GetContentPointer ()
 
void SetInitialState (double value)
 
void UpdateContent (double value)
 
double GetTargetFillingRatio () const
 
bool IsNotEmpty () const
 
bool HasOverflow () const
 
void LinkOverflow (Process *overflow)
 
void AttachFluxIn (Flux *flux)
 
virtual double SumIncomingFluxes () const
 
virtual bool ContentAccessible () const
 
BrickGetParentBrick () const
 
bool HasIncomingFluxes () const
 
bool IsInfiniteStorage () const
 
bool IsEmpty () const
 
bool HasParentBrick () const
 
bool HasInitialState () const
 

Member Function Documentation

◆ AddAmountToDynamicContentChange()

void WaterContainer::AddAmountToDynamicContentChange ( double change)

Add the amount of water to the dynamic content change.

Parameters
changeamount to add [mm]

◆ AddAmountToStaticContentChange()

void WaterContainer::AddAmountToStaticContentChange ( double change)

Add the amount of water to the static content change.

Parameters
changeamount to add [mm]

◆ ApplyConstraints()

void WaterContainer::ApplyConstraints ( double timeStep)
virtual

Apply the constraints to the water container.

Parameters
timeSteptime step [s]

Reimplemented in IceContainer.

◆ AttachFluxIn()

void WaterContainer::AttachFluxIn ( Flux * flux)
inline

Attach incoming flux.

Parameters
fluxincoming flux (non-owning reference, owned by process)

◆ ContentAccessible()

bool WaterContainer::ContentAccessible ( ) const
virtual

Check if the water content is accessible.

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 ( )

Get the dynamic content changes.

Returns
dynamic content changes [mm]

◆ GetMaximumCapacity()

double WaterContainer::GetMaximumCapacity ( ) const
inline

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

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
inlinenodiscard

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
virtual

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
overflowpointer to the overflow process

◆ Reset()

void WaterContainer::Reset ( )

Reset the water container to its initial state.

◆ SaveAsInitialState()

void WaterContainer::SaveAsInitialState ( )

Save the initial state of the water container.

◆ 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
valueinitial state [mm]

◆ SetMaximumCapacity()

void WaterContainer::SetMaximumCapacity ( const float * value)
inline

Set the maximum capacity of the water container.

Parameters
valuemaximum 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
changeamount to subtract [mm]

◆ 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
valuenew content [mm]

◆ Validate()

void WaterContainer::Validate ( ) const
virtual

Validate that the water container is correctly defined. Throws an exception if validation fails.

Exceptions
ModelConfigErrorif validation fails.

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