hydrobricks
Loading...
Searching...
No Matches
Glacier Class Reference
Inheritance diagram for Glacier:
LandCover Brick

Public Member Functions

void Reset () override
 
void SaveAsInitialState () override
 
void SetParameters (const BrickSettings &brickSettings) override
 
void AttachFluxIn (Flux *flux) override
 
bool IsValid (bool checkProcesses=true) const override
 
WaterContainerGetIceContainer () const
 
void Finalize () override
 
void SetInitialState (double value, ContentType type) override
 
double GetContent (ContentType type) const override
 
void UpdateContent (double value, ContentType type) override
 
void UpdateContentFromInputs () override
 
void ApplyConstraints (double timeStep) override
 
vecDoublePt GetDynamicContentChanges () override
 
double * GetValuePointer (const string &name) override
 
void SurfaceComponentAdded (SurfaceComponent *brick) override
 
bool HasIce () const
 
- Public Member Functions inherited from LandCover
bool CanHaveAreaFraction () const override
 
double GetAreaFraction () const
 
double * GetAreaFractionPointer ()
 
void SetAreaFraction (double value)
 
bool IsLandCover () const override
 
bool IsNull () const override
 
- Public Member Functions inherited from Brick
void AddProcess (std::unique_ptr< Process > process)
 
virtual void Validate () const
 
bool NeedsSolver () const
 
BrickCategory GetCategory () const
 
bool HasProcesses () const
 
bool HasHydroUnit () const
 
WaterContainerGetWaterContainer () const
 
size_t GetProcessCount () const
 
ProcessGetProcess (size_t index) const
 
const string & GetName () const
 
void SetName (const string &name)
 
HydroUnitGetHydroUnit () const
 
void SetHydroUnit (HydroUnit *hydroUnit)
 
vecDoublePt GetStateVariableChangesFromProcesses ()
 
int GetProcessConnectionCount () const
 
double * GetBaseValuePointer (const string &name)
 

Protected Attributes

std::unique_ptr< IceContainer_ice
 
- Protected Attributes inherited from LandCover
double _areaFraction
 
- Protected Attributes inherited from Brick
string _name
 
bool _needsSolver
 
BrickCategory _category
 
std::unique_ptr< WaterContainer_water
 
std::vector< std::unique_ptr< Process > > _processes
 
HydroUnit_hydroUnit
 

Additional Inherited Members

- Static Public Member Functions inherited from Brick
static BrickFactory (const BrickSettings &brickSettings)
 
static BrickFactory (BrickType type)
 
static bool HasParameter (const BrickSettings &brickSettings, const string &name)
 
static const float * GetParameterValuePointer (const BrickSettings &brickSettings, const string &name)
 

Member Function Documentation

◆ ApplyConstraints()

void Glacier::ApplyConstraints ( double timeStep)
overridevirtual

Apply the constraints to the water container.

Parameters
timeSteptime step for the simulation.

Reimplemented from Brick.

◆ AttachFluxIn()

void Glacier::AttachFluxIn ( Flux * flux)
overridevirtual

Attach incoming flux.

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

Reimplemented from Brick.

◆ Finalize()

void Glacier::Finalize ( )
overridevirtual

Finalize the water transfer.

Reimplemented from Brick.

◆ GetContent()

double Glacier::GetContent ( ContentType type) const
overridevirtual

Get the content of the water container.

Parameters
typethe type of content to get.
Returns
the content of the water container.

Reimplemented from Brick.

◆ GetDynamicContentChanges()

vecDoublePt Glacier::GetDynamicContentChanges ( )
overridevirtual

Get pointers to the state variables.

Returns
vector of pointers to the state variables.

Reimplemented from Brick.

◆ GetIceContainer()

WaterContainer * Glacier::GetIceContainer ( ) const

Get the ice container of the glacier.

Returns
The ice container of the glacier.

◆ GetValuePointer()

double * Glacier::GetValuePointer ( const string & name)
overridevirtual

Get the pointer to the water container content.

Parameters
namename of the container type (e.g., "water", "ice", or "snow").

Reimplemented from Brick.

◆ HasIce()

bool Glacier::HasIce ( ) const
nodiscard

Check if the glacier has ice.

Returns
True if the glacier has ice, false otherwise.

◆ IsValid()

bool Glacier::IsValid ( bool checkProcesses = true) const
nodiscardoverridevirtual

Check that everything is correctly defined.

Returns
true if everything is correctly defined.

Reimplemented from Brick.

◆ Reset()

void Glacier::Reset ( )
overridevirtual

Reset the brick to its initial state.

Reimplemented from Brick.

◆ SaveAsInitialState()

void Glacier::SaveAsInitialState ( )
overridevirtual

Save the current state of the brick as the initial state.

Reimplemented from Brick.

◆ SetInitialState()

void Glacier::SetInitialState ( double value,
ContentType type )
overridevirtual

Set the initial state of the water container.

Parameters
valueinitial state value.
typetype of the content.

Reimplemented from Brick.

◆ SetParameters()

void Glacier::SetParameters ( const BrickSettings & brickSettings)
overridevirtual

Assign the parameters to the brick element.

Parameters
brickSettingssettings of the brick containing the parameters.

Reimplemented from Brick.

◆ SurfaceComponentAdded()

void Glacier::SurfaceComponentAdded ( SurfaceComponent * brick)
overridevirtual

Called when a new surface component is added to the land cover.

Parameters
brickThe surface component that was added.

Reimplemented from LandCover.

◆ UpdateContent()

void Glacier::UpdateContent ( double value,
ContentType type )
overridevirtual

Update the content of the water container.

Parameters
valuenew content value.
typetype of the content

Reimplemented from Brick.

◆ UpdateContentFromInputs()

void Glacier::UpdateContentFromInputs ( )
overridevirtual

Update the content of the water container from the inputs.

Reimplemented from Brick.


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