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

Public Member Functions

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

Protected Attributes

double _areaFraction
 
double _initialAreaFraction
 
- 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 std::unique_ptr< BrickFactory (const BrickSettings &brickSettings)
 
static std::unique_ptr< BrickFactory (BrickType type)
 
static bool HasParameter (const BrickSettings &brickSettings, std::string_view name)
 
static const float * GetParameterValuePointer (const BrickSettings &brickSettings, std::string_view name)
 

Member Function Documentation

◆ CanHaveAreaFraction()

bool LandCover::CanHaveAreaFraction ( ) const
inlinenodiscardoverridevirtual

Check if the brick can have an area fraction.

Returns
true if the brick can have an area fraction.

Reimplemented from Brick.

◆ GetAreaFraction()

double LandCover::GetAreaFraction ( ) const
inline

Get the area fraction of the land cover.

Returns
The area fraction of the land cover.

◆ GetAreaFractionPointer()

double * LandCover::GetAreaFractionPointer ( )
inline

Get a pointer to the area fraction of the land cover.

Returns
A pointer to the area fraction of the land cover.

◆ IsLandCover()

bool LandCover::IsLandCover ( ) const
inlinenodiscardoverridevirtual

Check if the brick is a land cover.

Returns
true if the brick is a land cover.

Reimplemented from Brick.

◆ IsNull()

bool LandCover::IsNull ( ) const
inlinenodiscardoverridevirtual

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

Returns
true if the brick is null.

Reimplemented from Brick.

◆ Reset()

void LandCover::Reset ( )
overridevirtual

Reset the brick to its initial state.

Also restores the area fraction to the initial extent (set at build time via SetInitialAreaFraction), so that land-cover changes (e.g. glacier evolution) are rolled back when the model is re-run.

Reimplemented from Brick.

◆ RestoreInitialAreaFraction()

void LandCover::RestoreInitialAreaFraction ( )
inline

Restore the area fraction to the initial extent without touching the stored content (used after the spin-up phase, where the warmed-up states are kept but the extents must match the declared initial ones).

◆ SaveAsInitialState()

void LandCover::SaveAsInitialState ( )
overridevirtual

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

Also stores the current area fraction as the initial extent to restore on reset.

Reimplemented from Brick.

◆ SetAreaFraction()

void LandCover::SetAreaFraction ( double value)

Set the area fraction of the land cover.

Parameters
valueThe area fraction to set.

◆ SetInitialAreaFraction()

void LandCover::SetInitialAreaFraction ( double value)
inline

Set the initial area fraction (the extent restored on every reset). Set once at build time, when the land cover fractions are assigned.

Parameters
valueThe initial area fraction to store.

◆ SurfaceComponentAdded()

void LandCover::SurfaceComponentAdded ( SurfaceComponent * brick)
virtual

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

Parameters
brickThe surface component that was added.

Reimplemented in Glacier.


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