hydrobricks
Loading...
Searching...
No Matches
Brick Class Reference
Inheritance diagram for Brick:
LandCover Storage SurfaceComponent GenericLandCover Glacier Urban Vegetation Snowpack

Public Member Functions

virtual void SetParameters (const BrickSettings &brickSettings)
 
virtual void AttachFluxIn (Flux *flux)
 
void AddProcess (Process *process)
 
virtual void Reset ()
 
virtual void SaveAsInitialState ()
 
virtual bool IsOk ()
 
bool NeedsSolver () const
 
virtual bool CanHaveAreaFraction ()
 
virtual bool IsSnowpack ()
 
virtual bool IsGlacier ()
 
virtual bool IsLandCover ()
 
virtual bool IsNull ()
 
virtual void Finalize ()
 
virtual void SetInitialState (double value, const string &type="water")
 
virtual double GetContent (const string &type="water")
 
virtual void UpdateContent (double value, const string &type="water")
 
virtual void UpdateContentFromInputs ()
 
virtual void ApplyConstraints (double timeStep)
 
WaterContainerGetWaterContainer ()
 
ProcessGetProcess (int index)
 
vector< Process * > & GetProcesses ()
 
string GetName ()
 
void SetName (const string &name)
 
virtual vecDoublePt GetDynamicContentChanges ()
 
vecDoublePt GetStateVariableChangesFromProcesses ()
 
int GetProcessesConnectionsNb ()
 
double * GetBaseValuePointer (const string &name)
 
virtual double * GetValuePointer (const string &name)
 

Static Public Member Functions

static BrickFactory (const BrickSettings &brickSettings)
 
static bool HasParameter (const BrickSettings &brickSettings, const string &name)
 
static float * GetParameterValuePointer (const BrickSettings &brickSettings, const string &name)
 

Protected Attributes

string m_name
 
bool m_needsSolver
 
WaterContainerm_water
 
vector< Process * > m_processes
 

Member Function Documentation

◆ AddProcess()

void Brick::AddProcess ( Process * process)
inline

Add a process to the brick.

Parameters
processprocess to add.

◆ ApplyConstraints()

void Brick::ApplyConstraints ( double timeStep)
virtual

Apply the constraints to the water container.

Parameters
timeSteptime step for the simulation.

Reimplemented in GenericLandCover, Glacier, Snowpack, Urban, and Vegetation.

◆ AttachFluxIn()

void Brick::AttachFluxIn ( Flux * flux)
virtual

Attach incoming flux.

Parameters
fluxincoming flux

Reimplemented in Glacier, and Snowpack.

◆ CanHaveAreaFraction()

virtual bool Brick::CanHaveAreaFraction ( )
inlinevirtual

Check if the brick can have an area fraction.

Returns
true if the brick can have an area fraction.

Reimplemented in LandCover, and SurfaceComponent.

◆ Factory()

Brick * Brick::Factory ( const BrickSettings & brickSettings)
static

Factory method to create a brick.

Parameters
brickSettingssettings of the brick.
Returns
the created brick.

◆ Finalize()

void Brick::Finalize ( )
virtual

Finalize the water transfer.

Reimplemented in GenericLandCover, Glacier, Snowpack, Urban, and Vegetation.

◆ GetBaseValuePointer()

double * Brick::GetBaseValuePointer ( const string & name)

Get the pointer to the water container content.

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

◆ GetContent()

double Brick::GetContent ( const string & type = "water")
virtual

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 in Glacier, and Snowpack.

◆ GetDynamicContentChanges()

vecDoublePt Brick::GetDynamicContentChanges ( )
virtual

Get pointers to the state variables.

Returns
vector of pointers to the state variables.

Reimplemented in Glacier, and Snowpack.

◆ GetName()

string Brick::GetName ( )
inline

Get the name of the brick.

Returns
name of the brick.

◆ GetParameterValuePointer()

float * Brick::GetParameterValuePointer ( const BrickSettings & brickSettings,
const string & name )
static

Get the pointer to the parameter value.

Parameters
brickSettingssettings of the brick containing the parameters.
namename of the parameter.
Returns
pointer to the parameter value.

◆ GetProcess()

Process * Brick::GetProcess ( int index)

Get a process by its index.

Parameters
indexindex of the process.
Returns
pointer to the process.

◆ GetProcesses()

vector< Process * > & Brick::GetProcesses ( )
inline

Get all processes of the brick.

Returns
vector of pointers to the processes.

◆ GetProcessesConnectionsNb()

int Brick::GetProcessesConnectionsNb ( )

Get the number of connections of the processes.

Returns
number of connections of the processes.

◆ GetStateVariableChangesFromProcesses()

vecDoublePt Brick::GetStateVariableChangesFromProcesses ( )

Get the changes in state variables from processes.

Returns
vector of pointers to the changes in state variables.

◆ GetValuePointer()

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

Get the pointer to the water container content.

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

Reimplemented in Glacier, and Snowpack.

◆ GetWaterContainer()

WaterContainer * Brick::GetWaterContainer ( )

Get the water container.

Returns
pointer to the water container.

◆ HasParameter()

bool Brick::HasParameter ( const BrickSettings & brickSettings,
const string & name )
static

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

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

◆ IsGlacier()

virtual bool Brick::IsGlacier ( )
inlinevirtual

Check if the brick is a glacier.

Returns
true if the brick is a glacier.

Reimplemented in Glacier.

◆ IsLandCover()

virtual bool Brick::IsLandCover ( )
inlinevirtual

Check if the brick is a land cover.

Returns
true if the brick is a land cover.

Reimplemented in LandCover.

◆ IsNull()

virtual bool Brick::IsNull ( )
inlinevirtual

Check if the brick is null (e.g., if the area fraction is null).

Returns
true if the brick is null.

Reimplemented in LandCover, and SurfaceComponent.

◆ IsOk()

bool Brick::IsOk ( )
virtual

Check that everything is correctly defined.

Returns
true is everything is correctly defined.

Reimplemented in Glacier, and Snowpack.

◆ IsSnowpack()

virtual bool Brick::IsSnowpack ( )
inlinevirtual

Check if the brick is a snowpack.

Returns
true if the brick is a snowpack.

Reimplemented in Snowpack.

◆ NeedsSolver()

bool Brick::NeedsSolver ( ) const
inline

Define if the brick needs to be handled by the solver.

Returns
true if the brick needs to be handled by the solver.

◆ Reset()

void Brick::Reset ( )
virtual

Reset the brick to its initial state.

Reimplemented in Glacier, and Snowpack.

◆ SaveAsInitialState()

void Brick::SaveAsInitialState ( )
virtual

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

Reimplemented in Glacier, and Snowpack.

◆ SetInitialState()

void Brick::SetInitialState ( double value,
const string & type = "water" )
virtual

Set the initial state of the water container.

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

Reimplemented in Glacier, and Snowpack.

◆ SetName()

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

Set the name of the brick.

Parameters
namenew name of the brick.

◆ SetParameters()

void Brick::SetParameters ( const BrickSettings & brickSettings)
virtual

Assign the parameters to the brick element.

Parameters
brickSettingssettings of the brick containing the parameters.

Reimplemented in GenericLandCover, Glacier, Snowpack, Storage, Urban, and Vegetation.

◆ UpdateContent()

void Brick::UpdateContent ( double value,
const string & type = "water" )
virtual

Update the content of the water container.

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

Reimplemented in Glacier, and Snowpack.

◆ UpdateContentFromInputs()

void Brick::UpdateContentFromInputs ( )
virtual

Update the content of the water container from the inputs.

Reimplemented in Glacier, and Snowpack.


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