|
|
string | _name |
| |
|
bool | _needsSolver |
| |
|
BrickCategory | _category |
| |
|
std::unique_ptr< WaterContainer > | _water |
| |
|
std::vector< std::unique_ptr< Process > > | _processes |
| |
|
HydroUnit * | _hydroUnit |
| |
◆ AddProcess()
| void Brick::AddProcess |
( |
std::unique_ptr< Process > | process | ) |
|
|
inline |
Add a process to the brick.
- Parameters
-
| process | process to add (ownership transferred). |
◆ ApplyConstraints()
| void Brick::ApplyConstraints |
( |
double | timeStep | ) |
|
|
virtual |
◆ AttachFluxIn()
| void Brick::AttachFluxIn |
( |
Flux * | flux | ) |
|
|
virtual |
Attach incoming flux.
- Parameters
-
| flux | incoming flux (non-owning reference, owned by process) |
Reimplemented in Glacier, and Snowpack.
◆ CanHaveAreaFraction()
| virtual bool Brick::CanHaveAreaFraction |
( |
| ) |
const |
|
inlinenodiscardvirtual |
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() [1/2]
| Brick * Brick::Factory |
( |
BrickType | type | ) |
|
|
static |
Factory method to create a brick.
- Parameters
-
- Returns
- the created brick.
◆ Factory() [2/2]
Factory method to create a brick.
- Parameters
-
| brickSettings | settings of the brick. |
- Returns
- the created brick.
◆ Finalize()
◆ GetBaseValuePointer()
| double * Brick::GetBaseValuePointer |
( |
const string & | name | ) |
|
Get the pointer to the water container content.
- Parameters
-
| name | name of the container type (e.g., "water", "ice", or "snow"). |
◆ GetCategory()
| BrickCategory Brick::GetCategory |
( |
| ) |
const |
|
inlinenodiscard |
Get the category of the brick.
- Returns
- the category of the brick.
◆ GetContent()
| double Brick::GetContent |
( |
ContentType | type | ) |
const |
|
virtual |
Get the content of the water container.
- Parameters
-
| type | the type of content to get. |
- Returns
- the 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.
◆ GetHydroUnit()
Get the hydro unit associated with the brick.
- Returns
- pointer to the hydro unit.
◆ GetName()
| const string & Brick::GetName |
( |
| ) |
const |
|
inline |
Get the name of the brick.
- Returns
- name of the brick.
◆ GetParameterValuePointer()
| const float * Brick::GetParameterValuePointer |
( |
const BrickSettings & | brickSettings, |
|
|
const string & | name ) |
|
static |
Get the pointer to the parameter value.
- Parameters
-
| brickSettings | settings of the brick containing the parameters. |
| name | name of the parameter. |
- Returns
- pointer to the parameter value.
◆ GetProcess()
| Process * Brick::GetProcess |
( |
size_t | index | ) |
const |
Get a process by its index.
- Parameters
-
| index | index of the process. |
- Returns
- pointer to the process.
◆ GetProcessConnectionCount()
| int Brick::GetProcessConnectionCount |
( |
| ) |
const |
Get the number of process connections in the brick.
- Returns
- number of process connections.
◆ GetProcessCount()
| size_t Brick::GetProcessCount |
( |
| ) |
const |
|
inlinenodiscard |
Get the number of processes in the brick.
- Returns
- number of 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
-
| name | name of the container type (e.g., "water", "ice", or "snow"). |
Reimplemented in Glacier, and Snowpack.
◆ GetWaterContainer()
Get the water container.
- Returns
- pointer to the water container.
◆ HasHydroUnit()
| bool Brick::HasHydroUnit |
( |
| ) |
const |
|
inlinenodiscard |
Check if the brick has a hydro unit associated with it.
- Returns
- true if the brick has a hydro unit.
◆ HasParameter()
| bool Brick::HasParameter |
( |
const BrickSettings & | brickSettings, |
|
|
const string & | name ) |
|
static |
Check if the brick has a parameter with the provided name.
- Parameters
-
| brickSettings | settings of the brick containing the parameters. |
| name | name of the parameter to check. |
- Returns
- true if the brick has a parameter with the provided name.
◆ HasProcesses()
| bool Brick::HasProcesses |
( |
| ) |
const |
|
inlinenodiscard |
Check if the brick has any processes.
- Returns
- true if the brick has at least one process.
◆ IsLandCover()
| virtual bool Brick::IsLandCover |
( |
| ) |
const |
|
inlinenodiscardvirtual |
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 |
( |
| ) |
const |
|
inlinenodiscardvirtual |
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.
◆ IsValid()
| bool Brick::IsValid |
( |
bool | checkProcesses = true | ) |
const |
|
nodiscardvirtual |
Check that everything is correctly defined.
- Returns
- true if everything is correctly defined.
Reimplemented in Glacier, and Snowpack.
◆ NeedsSolver()
| bool Brick::NeedsSolver |
( |
| ) |
const |
|
inlinenodiscard |
Define if the brick needs to be handled by the solver.
- Returns
- true if the brick needs to be handled by the solver.
◆ Reset()
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.
◆ SetHydroUnit()
| void Brick::SetHydroUnit |
( |
HydroUnit * | hydroUnit | ) |
|
|
inline |
Set the hydro unit associated with the brick.
- Parameters
-
| hydroUnit | pointer to the hydro unit. |
◆ SetInitialState()
| void Brick::SetInitialState |
( |
double | value, |
|
|
ContentType | type ) |
|
virtual |
Set the initial state of the water container.
- Parameters
-
| value | initial state value. |
| type | type of the content. |
Reimplemented in Glacier, and Snowpack.
◆ SetName()
| void Brick::SetName |
( |
const string & | name | ) |
|
|
inline |
Set the name of the brick.
- Parameters
-
| name | new name of the brick. |
◆ SetParameters()
◆ UpdateContent()
| void Brick::UpdateContent |
( |
double | value, |
|
|
ContentType | type ) |
|
virtual |
Update the content of the water container.
- Parameters
-
| value | new content value. |
| type | type of the content |
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.
◆ Validate()
| void Brick::Validate |
( |
| ) |
const |
|
virtual |
Validate that everything is correctly defined. Throws an exception if validation fails.
- Exceptions
-
The documentation for this class was generated from the following files:
- /github/workspace/core/src/bricks/Brick.h
- /github/workspace/core/src/bricks/Brick.cpp