hydrobricks
Loading...
Searching...
No Matches
Snowpack Class Reference
Inheritance diagram for Snowpack:
SurfaceComponent Brick

Public Member Functions

void Reset () override
 
void SaveAsInitialState () override
 
void SetParameters (const BrickSettings &brickSettings) override
 
void AttachFluxIn (Flux *flux) override
 
bool IsOk () override
 
WaterContainerGetSnowContainer ()
 
bool IsSnowpack () override
 
void Finalize () override
 
void SetInitialState (double value, const string &type) override
 
double GetContent (const string &type) override
 
void UpdateContent (double value, const string &type) override
 
void UpdateContentFromInputs () override
 
void ApplyConstraints (double timeStep) override
 
vecDoublePt GetDynamicContentChanges () override
 
double * GetValuePointer (const string &name) override
 
bool HasSnow ()
 
- Public Member Functions inherited from SurfaceComponent
bool CanHaveAreaFraction () override
 
double GetAreaFraction () const
 
void SetAreaFraction (double value)
 
bool IsNull () override
 
virtual void SetParent (LandCover *parent)
 
- Public Member Functions inherited from Brick
void AddProcess (Process *process)
 
bool NeedsSolver () const
 
virtual bool IsGlacier ()
 
virtual bool IsLandCover ()
 
WaterContainerGetWaterContainer ()
 
ProcessGetProcess (int index)
 
vector< Process * > & GetProcesses ()
 
string GetName ()
 
void SetName (const string &name)
 
vecDoublePt GetStateVariableChangesFromProcesses ()
 
int GetProcessesConnectionsNb ()
 
double * GetBaseValuePointer (const string &name)
 

Protected Attributes

SnowContainerm_snow
 
- Protected Attributes inherited from SurfaceComponent
LandCoverm_parent
 
double m_areaFraction
 
- Protected Attributes inherited from Brick
string m_name
 
bool m_needsSolver
 
WaterContainerm_water
 
vector< Process * > m_processes
 

Additional Inherited Members

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

Member Function Documentation

◆ ApplyConstraints()

void Snowpack::ApplyConstraints ( double timeStep)
overridevirtual

Apply the constraints to the water container.

Parameters
timeSteptime step for the simulation.

Reimplemented from Brick.

◆ AttachFluxIn()

void Snowpack::AttachFluxIn ( Flux * flux)
overridevirtual

Attach incoming flux.

Parameters
fluxincoming flux

Reimplemented from Brick.

◆ Finalize()

void Snowpack::Finalize ( )
overridevirtual

Finalize the water transfer.

Reimplemented from Brick.

◆ GetContent()

double Snowpack::GetContent ( const string & type)
overridevirtual

Get the content of the water container.

Parameters
typetype of the content (e.g., "water", "ice", or "snow").
Returns
content of the water container.

Reimplemented from Brick.

◆ GetDynamicContentChanges()

vecDoublePt Snowpack::GetDynamicContentChanges ( )
overridevirtual

Get pointers to the state variables.

Returns
vector of pointers to the state variables.

Reimplemented from Brick.

◆ GetSnowContainer()

WaterContainer * Snowpack::GetSnowContainer ( )

Get the snow container.

Returns
A pointer to the snow container.

◆ GetValuePointer()

double * Snowpack::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.

◆ HasSnow()

bool Snowpack::HasSnow ( )

Check if the snowpack has snow.

Returns
True if the snowpack has snow, false otherwise.

◆ IsOk()

bool Snowpack::IsOk ( )
overridevirtual

Check that everything is correctly defined.

Returns
true is everything is correctly defined.

Reimplemented from Brick.

◆ IsSnowpack()

bool Snowpack::IsSnowpack ( )
inlineoverridevirtual

Check if the brick is a snowpack.

Returns
true if the brick is a snowpack.

Reimplemented from Brick.

◆ Reset()

void Snowpack::Reset ( )
overridevirtual

Reset the brick to its initial state.

Reimplemented from Brick.

◆ SaveAsInitialState()

void Snowpack::SaveAsInitialState ( )
overridevirtual

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

Reimplemented from Brick.

◆ SetInitialState()

void Snowpack::SetInitialState ( double value,
const string & type )
overridevirtual

Set the initial state of the water container.

Parameters
valueinitial state value.
typetype of the content (e.g., "water", "ice", or "snow").

Reimplemented from Brick.

◆ SetParameters()

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

Assign the parameters to the brick element.

Parameters
brickSettingssettings of the brick containing the parameters.

Reimplemented from Brick.

◆ UpdateContent()

void Snowpack::UpdateContent ( double value,
const string & type )
overridevirtual

Update the content of the water container.

Parameters
valuenew content value.
typetype of the content (e.g., "water", "ice", or "snow").

Reimplemented from Brick.

◆ UpdateContentFromInputs()

void Snowpack::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: