|
Oakfield API Documentation 1.0.0
Numerical core APIs
|
Soft energy / lambda regulation (thermostat) operator. More...
#include "oakfield/operator_split.h"

Go to the source code of this file.
Classes | |
| struct | ThermostatOperatorConfig |
| Configuration for the thermostat operator. More... | |
Typedefs | |
| typedef enum ThermostatMode | ThermostatMode |
| Thermostat regulation mode. | |
| typedef struct ThermostatOperatorConfig | ThermostatOperatorConfig |
| Configuration for the thermostat operator. | |
Enumerations | |
| enum | ThermostatMode { THERMOSTAT_NONE = 0 , THERMOSTAT_SOFT_LAMBDA = 1 , THERMOSTAT_ADD = 2 , THERMOSTAT_MULT = 3 } |
| Thermostat regulation mode. More... | |
Functions | |
| SimResult | sim_add_thermostat_operator (struct SimContext *context, const ThermostatOperatorConfig *config, size_t *out_index) |
| Register a thermostat operator instance. | |
| SimResult | sim_thermostat_config (struct SimContext *context, size_t operator_index, ThermostatOperatorConfig *out_config) |
| Copy the current thermostat configuration from a registered operator. | |
| SimResult | sim_thermostat_update (struct SimContext *context, size_t operator_index, const ThermostatOperatorConfig *config) |
| Replace the configuration of a registered thermostat operator. | |
Soft energy / lambda regulation (thermostat) operator.
| typedef enum ThermostatMode ThermostatMode |
Thermostat regulation mode.
THERMOSTAT_SOFT_LAMBDA adjusts lambda_eff from the measured mean energy. THERMOSTAT_ADD and THERMOSTAT_MULT apply additive or multiplicative relaxation toward either E_target or an optional per-point memory field.
| typedef struct ThermostatOperatorConfig ThermostatOperatorConfig |
Configuration for the thermostat operator.
The operator updates internal scalars such as lambda_eff and optionally uses a memory target field for additive or multiplicative regulation modes.
| enum ThermostatMode |
Thermostat regulation mode.
THERMOSTAT_SOFT_LAMBDA adjusts lambda_eff from the measured mean energy. THERMOSTAT_ADD and THERMOSTAT_MULT apply additive or multiplicative relaxation toward either E_target or an optional per-point memory field.
| SimResult sim_add_thermostat_operator | ( | struct SimContext * | context, |
| const ThermostatOperatorConfig * | config, | ||
| size_t * | out_index | ||
| ) |
Register a thermostat operator instance.
| context | Simulation context that will own the operator. | |
| config | Optional thermostat configuration; NULL selects normalized defaults. | |
| [out] | out_index | Optional destination for the registered operator index. |
| SimResult sim_thermostat_config | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| ThermostatOperatorConfig * | out_config | ||
| ) |
Copy the current thermostat configuration from a registered operator.
| context | Simulation context containing the operator. | |
| operator_index | Index returned by sim_add_thermostat_operator(). | |
| [out] | out_config | Receives the normalized configuration. |
| SimResult sim_thermostat_update | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| const ThermostatOperatorConfig * | config | ||
| ) |
Replace the configuration of a registered thermostat operator.
config is required. A successful update normalizes the replacement, resets lambda/cache state, refreshes symbolic metadata, and invalidates the scheduler plan.
| context | Simulation context containing the operator. |
| operator_index | Index of the thermostat operator to update. |
| config | Replacement thermostat configuration. |