|
Oakfield API Documentation 1.0.0
Numerical core APIs
|
Coordinate/index generator operator. More...
#include "oakfield/operator_split.h"#include "oakfield/operators/stimulus/coords.h"#include <stdbool.h>#include <stddef.h>#include <stdint.h>

Go to the source code of this file.
Classes | |
| struct | SimCoordinateOperatorConfig |
| Configuration parameters for the coordinate generator operator. More... | |
Typedefs | |
| typedef enum SimCoordinateMode | SimCoordinateMode |
| Coordinate source mode. | |
| typedef enum SimCoordinateNormalizeMode | SimCoordinateNormalizeMode |
| Normalization mode for coordinate values. | |
| typedef struct SimCoordinateOperatorConfig | SimCoordinateOperatorConfig |
| Configuration parameters for the coordinate generator operator. | |
Enumerations | |
| enum | SimCoordinateMode { SIM_COORD_MODE_INDEX = 0 , SIM_COORD_MODE_COORD } |
| Coordinate source mode. More... | |
| enum | SimCoordinateNormalizeMode { SIM_COORD_NORMALIZE_NONE = 0 , SIM_COORD_NORMALIZE_UNIT , SIM_COORD_NORMALIZE_CENTERED , SIM_COORD_NORMALIZE_SIGNED } |
| Normalization mode for coordinate values. More... | |
Functions | |
| SimResult | sim_add_coordinate_operator (struct SimContext *context, const SimCoordinateOperatorConfig *config, size_t *out_index) |
| Register a coordinate generator operator with the provided configuration. | |
| SimResult | sim_coordinate_config (struct SimContext *context, size_t operator_index, SimCoordinateOperatorConfig *out_config) |
| Retrieve the configuration currently bound to a coordinate operator. | |
| SimResult | sim_coordinate_update (struct SimContext *context, size_t operator_index, const SimCoordinateOperatorConfig *config) |
| Update an existing coordinate operator in-place. | |
Coordinate/index generator operator.
Writes element index or coordinate-based values into a field, with optional normalization and scaling. Coordinates reuse the stimulus coordinate configuration for axis/angle/radial mappings.
| typedef enum SimCoordinateMode SimCoordinateMode |
Coordinate source mode.
Index mode writes the linear element index. Coordinate mode evaluates the shared stimulus coordinate mapping at each element position.
| enum SimCoordinateMode |
| SimResult sim_add_coordinate_operator | ( | struct SimContext * | context, |
| const SimCoordinateOperatorConfig * | config, | ||
| size_t * | out_index | ||
| ) |
Register a coordinate generator operator with the provided configuration.
The implementation copies and normalizes config, resolves the default scale-by-dt policy, and validates that the output field is real double, complex double, or an exact-integer domain supported by the exact affine path. Passing NULL selects index mode on field 0 with gain 1 and bias 0.
| context | Simulation context that will own the operator. | |
| config | Optional coordinate-generator configuration. | |
| [out] | out_index | Optional destination for the registered operator index. |
| SimResult sim_coordinate_config | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| SimCoordinateOperatorConfig * | out_config | ||
| ) |
Retrieve the configuration currently bound to a coordinate operator.
| context | Simulation context containing the operator. | |
| operator_index | Index returned by sim_add_coordinate_operator(). | |
| [out] | out_config | Receives the operator's normalized configuration. |
| SimResult sim_coordinate_update | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| const SimCoordinateOperatorConfig * | config | ||
| ) |
Update an existing coordinate operator in-place.
Passing NULL for config keeps the current configuration and reapplies normalization. A successful update refreshes runtime state, exact-integer affine metadata, symbolic state, and the scheduler plan.
| context | Simulation context containing the operator. |
| operator_index | Index of the coordinate operator to update. |
| config | Optional replacement configuration. |