|
|
std::unique_ptr< Solver > | _solver |
| |
|
ModelHydro * | _model |
| |
|
int | _solvableConnectionCount |
| |
|
int | _directConnectionCount |
| |
|
vecDoublePt | _stateVariableChanges |
| |
|
vector< Brick * > | _iterableBricks |
| |
|
axd | _changeRatesNoSolver |
| |
|
axd | _ratesBeforeSweep |
| |
◆ ApplyRates()
| void Processor::ApplyRates |
( |
const axd & | rates, |
|
|
double | timeStepInDays ) |
Apply the provided change rates: transfer the water between the bricks and accumulate the resulting content changes over the time step.
- Parameters
-
| rates | The change rate values to apply. |
| timeStepInDays | The time step in days. |
◆ ConnectToElementsToSolve()
| void Processor::ConnectToElementsToSolve |
( |
| ) |
|
Connect the processor to the elements to solve.
◆ ConstrainRates()
| void Processor::ConstrainRates |
( |
axd & | rates, |
|
|
double | timeStepInDays ) |
Link the provided rates to the outgoing fluxes and enforce the storage constraints, evaluated at the current state.
- Parameters
-
| rates | The rate values to constrain (modified in place through the flux links). |
| timeStepInDays | The time step in days. |
◆ EnforceConstraints()
| void Processor::EnforceConstraints |
( |
axd & | rates, |
|
|
double | timeStepInDays ) |
Sweep the brick storage constraints over the linked rates until they are stable (fixpoint iteration), so that the result does not depend on the brick iteration order. The fluxes must already be linked to the provided rates.
- Parameters
-
| rates | The rate values to constrain (modified in place through the flux links). |
| timeStepInDays | The time step in days. |
◆ EvaluateRates()
| void Processor::EvaluateRates |
( |
axd & | rates, |
|
|
double | timeStepInDays, |
|
|
bool | applyConstraints = true ) |
Evaluate the change rates of all solvable processes at the current state.
Rates are per day, independent of the time step. When applyConstraints is true, the rates are linked to the outgoing fluxes and the storage constraints (e.g., maximum capacity, no negative content) are enforced brick by brick during the sweep.
- Parameters
-
| rates | The vector receiving the rates (sized to GetSolvableConnectionCount()); must outlive any subsequent constraint application, as fluxes keep pointers into it. |
| timeStepInDays | The time step in days (used by the constraints). |
| applyConstraints | Option to apply the constraints. |
◆ FinalizeTimeStep()
| void Processor::FinalizeTimeStep |
( |
| ) |
|
Finalize the solvable bricks: commit the accumulated content changes.
◆ GatherState()
| void Processor::GatherState |
( |
axd & | state | ) |
const |
Gather the current state variable values into the provided vector.
The state variables are the dynamic content changes relative to the start of the time step (all zeros at step start, after the previous Finalize).
- Parameters
-
◆ GetDirectConnectionCount()
| int Processor::GetDirectConnectionCount |
( |
| ) |
const |
|
inline |
Get the number of direct connections.
- Returns
- the number of direct connections.
◆ GetSolvableBricks()
| const vector< Brick * > & Processor::GetSolvableBricks |
( |
| ) |
const |
|
inline |
Get the bricks handled by the solver, in processing (declaration) order.
- Returns
- the solvable bricks.
◆ GetSolvableConnectionCount()
| int Processor::GetSolvableConnectionCount |
( |
| ) |
const |
|
inline |
Get the number of solvable connections.
- Returns
- the number of solvable connections.
◆ GetStateVariableCount()
| int Processor::GetStateVariableCount |
( |
| ) |
const |
|
nodiscard |
Get the number of state variables.
- Returns
- the number of state variables.
◆ Initialize()
Initialize the processor with the solver settings.
- Parameters
-
| solverSettings | settings of the solver. |
◆ ProcessTimeStep()
| bool Processor::ProcessTimeStep |
( |
double | timeStepInDays | ) |
|
Process the time step.
- Parameters
-
| timeStepInDays | The time step in days. |
- Returns
- true if the time step was processed successfully, false otherwise.
◆ ResetState()
| void Processor::ResetState |
( |
| ) |
|
Reset all state variables to zero (the start-of-step state).
◆ ScatterState()
| void Processor::ScatterState |
( |
const axd & | state | ) |
|
Scatter the provided values into the state variables.
- Parameters
-
◆ SetModel()
Set the model.
- Parameters
-
The documentation for this class was generated from the following files:
- /github/workspace/core/src/base/Processor.h
- /github/workspace/core/src/base/Processor.cpp